Skip to content

add X-Trace-Id and traceparent headers to all HTTP calls#306

Draft
adamkorynta wants to merge 1 commit intomainfrom
feature/add_trace_header
Draft

add X-Trace-Id and traceparent headers to all HTTP calls#306
adamkorynta wants to merge 1 commit intomainfrom
feature/add_trace_header

Conversation

@adamkorynta
Copy link
Copy Markdown
Collaborator

this will allow for log correlation from CDA for all logs emitted from a single request

See: USACE/cwms-data-api#1682

this will allow for log correlation from CDA for all logs emmitted from a single request
Copy link
Copy Markdown
Collaborator

@MikeNeilson MikeNeilson left a comment

Choose a reason for hiding this comment

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

While not nothing, the value should be per session, not per request. Or at least within a Span.

example desire:

  1. User clicked Extract (in HEC-RTS)
  2. Generate initial x-trace-id/traceparent
  3. All HTTP requests get those headers (and like ALL HTTP REQUESTS is valid here, but we can focus on CDAC)
  4. Additionally local logs would use the same x-trace-id/traceparent
  5. ...Profit. (actually somewhat serious there, should take far less time to correlate log entries and figure what the heck is going on for any given situation)

@adamkorynta
Copy link
Copy Markdown
Collaborator Author

I think if we're wanting a session id, we should add in a X-Client-Identifier header that is constant for the full session. For the case of extract, I'll then pull in the opentelemetry api on the client side for propagating real traceparent identifiers.

@adamkorynta
Copy link
Copy Markdown
Collaborator Author

It looks like OpenTelemetry uses baggage: https://opentelemetry.io/docs/concepts/signals/baggage for the client id rather than a custom header.

@adamkorynta adamkorynta marked this pull request as draft May 5, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants