Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce ActivitySource events #23192

Merged
merged 44 commits into from
Sep 27, 2021

Conversation

pakrym
Copy link
Contributor

@pakrym pakrym commented Aug 6, 2021

.NET 5 introduced a new way to create distributed tracing activities - ActivitySource. We've been using an older system, DiagnosticSource, to expose distributing tracing data to ApplicationInsights. OpenTelemetry uses ActivitySource to collect its distributing tracing event.

This PR adds ActivitySource support to Azure SDKs. ActivitySource support means that we also support OpenTelemetry. We put ActivitySource support behind an experimental AppContext flag. Many specs that describe the kinds and shapes of OpenTelemetry telemetry spans are still experimental. We don't want customers taking an accidental dependency on names/attributes/parent-child relationships etc.

ActivitySource support is abstracted behind ClientDiagnostics/DiagnosticScope infrastructure the same way as DiagnosticSource was before. Clients authors don't have to make changes to the library code; the entire feature is handled in the shared code.

A bit more details in the upcoming blog post https://github.com/Azure/azure-sdk-blog/pull/168

…itySource-events

# Conflicts:
#	sdk/core/Azure.Core.TestFramework/src/Azure.Core.TestFramework.csproj
…NET5 instead of forcing it on everyone by lifting the reference version.
…itySource-events

# Conflicts:
#	sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridPublisherClient.cs
#	sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs
# Conflicts:
#	sdk/core/Azure.Core/src/Pipeline/Internal/RequestActivityPolicy.cs
Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see anything blocking, but have some concerns about a few areas (see comments).

Copy link
Member

@annelo-msft annelo-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be willing to write a description for the PR so people with affected libraries can understand what the change is and why it's needed?

@pakrym
Copy link
Contributor Author

pakrym commented Sep 20, 2021

Would you be willing to write a description for the PR so people with affected libraries can understand what the change is and why it's needed?

It's the least I can do while tagging the entire world on the PR.

…ySource-events

# Conflicts:
#	eng/Directory.Build.Common.targets
#	sdk/communication/Azure.Communication.CallingServer/src/Azure.Communication.CallingServer.csproj
#	sdk/communication/Azure.Communication.Chat/src/Azure.Communication.Chat.csproj
#	sdk/communication/Azure.Communication.Identity/src/Azure.Communication.Identity.csproj
#	sdk/communication/Azure.Communication.NetworkTraversal/src/Azure.Communication.NetworkTraversal.csproj
#	sdk/communication/Azure.Communication.PhoneNumbers/src/Azure.Communication.PhoneNumbers.csproj
#	sdk/communication/Azure.Communication.Sms/src/Azure.Communication.Sms.csproj
#	sdk/core/Azure.Core.Experimental/tests/Azure.Core.Experimental.Tests.csproj
#	sdk/storage/Azure.Storage.Blobs.Batch/src/Azure.Storage.Blobs.Batch.csproj
#	sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Azure.Storage.Blobs.ChangeFeed.csproj
#	sdk/storage/Azure.Storage.Common/tests/Azure.Storage.Common.Tests.csproj
@pakrym pakrym enabled auto-merge (squash) September 27, 2021 21:38
@pakrym
Copy link
Contributor Author

pakrym commented Sep 27, 2021

/check-enforcer override

@pakrym pakrym merged commit 81df94f into Azure:main Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants