Skip to content

Commit b9f114e

Browse files
OpenTelemetry fixes from PR (#2888)
Fixes #2853 Fixes #2850 Fixes #2827 Fixes to OpenTelemetry issues raised by @heaths from the OpenTelemetry PR. --------- Co-authored-by: Copilot <[email protected]>
1 parent dc3e291 commit b9f114e

File tree

15 files changed

+251
-307
lines changed

15 files changed

+251
-307
lines changed

Cargo.lock

Lines changed: 58 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/distributed-tracing-for-rust-service-clients.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ For the Rust implementation, if a tracer provider is configured, ALL http operat
8686

8787
## Implementation details
8888

89-
To provide for requirement #1, if a customer provides a value for the `azure_core::ClientOptions::request_instrumentation` structure, the Azure Core HTTP pipeline will add a `PublicApiInstrumentationPolicy` to the pipeline which is responsible for creating the public API outer span.
89+
To provide for requirement #1, if a customer provides a value for the `azure_core::ClientOptions::instrumentation` structure, the Azure Core HTTP pipeline will add a `PublicApiInstrumentationPolicy` to the pipeline which is responsible for creating the public API outer span.
9090

91-
To provide for requirement #2, if a customer provides a `azure_core::ClientOptions::request_instrumentation` the `azure_core` HTTP pipeline will add a `RequestInstrumentationPolicy` to the pipeline which is responsible for creating the required HTTP request span to the pipeline.
91+
To provide for requirement #2, if a customer provides a `azure_core::ClientOptions::instrumentation` the `azure_core` HTTP pipeline will add a `RequestInstrumentationPolicy` to the pipeline which is responsible for creating the required HTTP request span to the pipeline.
9292

9393
This implementation means that operations like Long Running Operations (Pollers) and Pageable Operations (Pagers) will all have a Public API span created by the `PublicApiInstrumentationPolicy` and a HTTP Request span created by the `RequestInstrumentationPolicy`.
9494

@@ -218,7 +218,7 @@ pub fn new(
218218
vec!["https://vault.azure.net/.default"],
219219
));
220220
+ let tracer =
221-
+ if let Some(tracer_options) = &options.client_options.request_instrumentation {
221+
+ if let Some(tracer_options) = &options.client_options.instrumentation {
222222
+ tracer_options
223223
+ .tracer_provider
224224
+ .as_ref()

sdk/core/azure_core/src/http/options/request_instrumentation.rs renamed to sdk/core/azure_core/src/http/options/instrumentation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::sync::Arc;
55

66
/// Policy options to enable distributed tracing.
77
#[derive(Clone, Debug, Default)]
8-
pub struct RequestInstrumentationOptions {
8+
pub struct InstrumentationOptions {
99
/// Set the tracer provider for distributed tracing.
1010
pub tracer_provider: Option<Arc<dyn crate::tracing::TracerProvider>>,
1111
}

0 commit comments

Comments
 (0)