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

Id format changes in W3C mode #1174

Closed
lmolkova opened this issue Dec 11, 2019 · 0 comments · Fixed by #1195
Closed

Id format changes in W3C mode #1174

lmolkova opened this issue Dec 11, 2019 · 0 comments · Fixed by #1195
Assignees
Milestone

Comments

@lmolkova
Copy link
Member

lmolkova commented Dec 11, 2019

In W3C mode we report parentId and Id in the format of |traceId.parentSpanId. and |traceId.spanId. respectively.

This is not needed anymore even for backward compatibility reasons. Compatibility with old versions of Application Insights SDK is handled by ingestion.

Describe the solution you would like

When SDK receives a valid incoming request with

  1. traceparent = 00-traceId-parentId-00, it should track request telemetry
  • request.Context.Operation.Id = traceId // no changes
  • request.Context.Operation.ParentId = parentId // new, was |traceId.parentId.
  • request.Id = new span Id // new, was |traceId.spanId.
  1. no header, it should track request telemetry
  • request.Context.Operation.Id = new traceId // no changes
  • request.Context.Operation.ParentId = null // no changes
  • request.Id = new span Id// new, was |traceId.spanId.
  1. legacy Request-Id header, it should track request telemetry
  • request.Context.Operation.Id = if request-id root part is compatible with trace-id, reuse it, otherwise generate a new one
  • request.Context.Operation.ParentId = headers[Request-Id] // no changes
  • request.Id = new span Id // new, was |traceId.spanId.
  • properties["ai_LegacyRootId"] = if request-id root part is NOT compatible with trace-id, put it here, otherwise keep empty // no changes

Similarly for dependencies

  • dependency.Context.Operation.Id = traceId,
  • dependency.Context.Operation.ParentId = parent span id, // new, was |trace.parent.
  • dependency.Id = new span id, // new, was |trace.span.

When sending Request-Id in outgoing requests it still MUST be formatted in the |TraceId.SpanId. format!

@littleaj littleaj added this to the 2.6.0-BETA.2 milestone Dec 11, 2019
@littleaj littleaj modified the milestones: 2.6.0-BETA.2, 2.6.0-BETA.3 Jan 15, 2020
trask added a commit that referenced this issue Apr 9, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
See #1174
trask added a commit that referenced this issue Apr 10, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
See #1174
@ghost ghost locked as resolved and limited conversation to collaborators Jul 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants