Skip to content

Distributed Tracing integration with SDK builds. #2741

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

Open
wants to merge 83 commits into
base: main
Choose a base branch
from

Conversation

LarryOsterman
Copy link
Member

@LarryOsterman LarryOsterman commented Jun 30, 2025

Added distributed tracing policy and example service client integration.

PR Changes:

  1. Implemented RequestInstrumentationPolicy to add spans for HTTP operations.
  2. Implemented PublicApiInstrumentationPolicy to add spans for public APIs.
  3. Added public struct PublicApiInstrumentationInformation which expresses information used to create Public API spans.
  4. Integrated RequestInstrumentationPolicy and PublicApiInstrumentationPolicy to azure_core pipeline creation.
    1. Changed the azure_core::ClientOptions::deconstruct() method to deconstruct to a typespec_client_core::ClientOptions and a azure_core::CoreClientOptions (which is crate-private).
    2. Added http::Method::as_str() to return a string slice with the name of the HTTP method.
  5. Added span support for header propagation.
  6. PR feedback from previous PR (removed Span::add_event, removed AttributeValue::U64 and replaced it with AttributeValue::F64),

Bug fix: Propagate retry policy options from client options to retry policy.

@github-actions github-actions bot added the Azure.Core The azure_core crate label Jun 30, 2025
@LarryOsterman LarryOsterman force-pushed the larryo/opentelemetry_prototype_implementation branch from 32c2ac1 to baccb1b Compare June 30, 2025 22:38
Copy link
Member

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

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

Left some cosmetic comments, look great in general!

@LarryOsterman LarryOsterman requested a review from heaths July 14, 2025 23:36
@LarryOsterman
Copy link
Member Author

@heaths @lmolkova @analogrelay @RickWinter At this point, I think I'm done with this PR, let me know what you think about it.

Copy link
Member

@analogrelay analogrelay left a comment

Choose a reason for hiding this comment

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

Still working my way through most of azure_core_opentelemetry but wrapping up my day and wanted to get some of the comments out there. Almost entirely style/idiom stuff, with a few other thoughts on the proc macro and attribute key storage. Looking good! I like the proc macros!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core The azure_core crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement proc macros to simplify the authoring experience for Distributed Tracing Implement Distributed Tracing conventions for Azure SDK clients.
4 participants