A) For preview-2, the azure libraries don’t support anything beyond HTTP based protocols (i.e. EventHubs/ServiceBus are not supported). In practical terms, it also means that we only have to worry about outgoing requests.
B) None of our libraries have a hard dependency on any 3rd part tracing library (including the opentelemetry/opencensus libraries) for preview-2. This includes both code and packaging.
C) Whenever ambient contexts are supported in the language/runtime, our azure libraries support them. Not supporting ambient contexts mean that integrations that rely on said ambient context (e.g. opencensus for python’s requests integration) may not function correctly.
D) We never initiate a trace/create a span context from within our library for outgoing requests. We rely on it having been created based on context passed implicitly or explicitly to us.
Creating a trace means making decisions such as if the trace is sampled in or not.
G) If a trace is active/a valid span context exists (regardless of if it is sampled in or not), a new span is automatically created for the execution of each library method (that makes one or more service requests), and child spans are created for each outgoing request made from within the context of said library method.
- The name of spans wrapping the library method invocation is of the form ..
- The name of spans wrapping the individual outgoing requests is named by the URI path value of the request.
- One span is created per retry attempt if retries occur.
- If a call is made to AAD to refresh a token, it is a separate span.
H) We don’t create links or a parent/child relationship between spans for pages in a paged operation.
I) We don’t create links or a parent/child relationship between spans for polling requests in a long running operation.
The following span attributes are to be set for outgoing service requests (per https://github.com/open-telemetry/opentelemetry-specification/blob/master/semantic-conventions.md):
Attribute | Value |
---|---|
Component | "http" |
http.method | |
http.url | |
http.status_code |
In addition, following attributes are to be set for individual requests:
Attribute | Value | Comment |
---|---|---|
requestId | Client side generated request Id | |
serviceRequestId | Server generated request/correlation id. |
The status for each finished span is to be taken from the list of canonical status codes: https://github.com/open-telemetry/opentelemetry-specification/blob/e9340d74f1ba0b651b3581d6bd5df6a92b772e18/specification/tracing-api.md#status.