Skip to content

Initial W3C Traceparent and otel integration.#1800

Merged
MikeNeilson merged 7 commits into
developfrom
task/handle-mdc
Jul 1, 2026
Merged

Initial W3C Traceparent and otel integration.#1800
MikeNeilson merged 7 commits into
developfrom
task/handle-mdc

Conversation

@MikeNeilson

Copy link
Copy Markdown
Contributor

Summary

Setup appropriate Servlet Filter and baseline OpenTelemetry setup to handle parsing and propagation of the W3C TraceParent header.

NOTE: intentionally not setting up the otel agent at this time. Nor am I'm worried about thread propagation (I'm certain that's not behaving correctly). This is intended to be the most minimal change to support and have the w3c trace parent header and have the trace id and span id values. And setting up some basic integration with open telemetry.

Related Issue

Closes #1697

Validation

Manually verified that a context is either generated, or propagated (e.g. from user provided context) if valid.

Added specific traceparent to integration test for manual verification.

Checklist

  • AI tools used

Comment thread cwms-data-api/src/main/java/cwms/cda/ApiServlet.java Outdated
Comment thread cwms-data-api/src/main/java/cwms/cda/servlet/W3CTraceFilter.java
Comment thread cwms-data-api/src/main/java/cwms/cda/servlet/W3CTraceFilter.java Outdated
Comment thread cwms-data-api/src/main/java/cwms/cda/servlet/W3CTraceFilter.java Outdated

@MikeNeilson MikeNeilson left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Good things to fix.

Comment thread cwms-data-api/src/main/java/cwms/cda/servlet/W3CTraceFilter.java Outdated
Comment thread cwms-data-api/src/main/java/cwms/cda/servlet/W3CTraceFilter.java Outdated
Comment thread cwms-data-api/src/main/java/cwms/cda/servlet/W3CTraceFilter.java
Comment thread cwms-data-api/src/main/java/cwms/cda/ApiServlet.java Outdated
@MikeNeilson MikeNeilson merged commit b6a82fe into develop Jul 1, 2026
16 of 19 checks passed
@MikeNeilson MikeNeilson deleted the task/handle-mdc branch July 1, 2026 19:57
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.

Support W3C TraceContext

2 participants