Skip to content

Simplify telemetry getter ownership across five instrumentations - #21567

Open
trask wants to merge 2 commits into
otelbot/instruction-audit-46095846922from
copilot/otelbotinstruction-audit-46095846922
Open

trask wants to merge 2 commits into
otelbot/instruction-audit-46095846922from
copilot/otelbotinstruction-audit-46095846922

Conversation

@trask

@trask trask commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Simplify telemetry getter ownership in the changes deferred from PR #21563, without changing propagation or emitted telemetry.

  • Camel, Pulsar, and AWS Lambda: Construct getters during instrumenter setup and reuse extractor-owned getters for batch records.
  • Spring Integration: Construct the consumer getter during setup and reuse an interceptor-owned getter.
  • Spring WebFlux: Share route lookup through a static helper and retain coverage for missing, wildcard, and context-path routes.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-11-28 18:16 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Should this be with the author? Comment /dashboard route:author to route it back.
  • Anything wrong — including the routing? Report it with what you expected; it helps us improve the dashboard.

@trask trask changed the title [WIP] Simplify telemetry getter for Camel 2.20 javaagent Simplify telemetry getter ownership across five instrumentations Nov 28, 2026
@trask
trask requested a balanced review from Copilot November 28, 2026 03:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the getter-ownership cleanup.

No open issues 🎉

What changed in this PR

Completes the getter-ownership cleanup deferred from #21563 across five instrumentations, preserving propagation and emitted telemetry.

Changes:

  • Replaces singleton getters with instances constructed during instrumenter setup.
  • Reuses component-owned getters in batch extractors and the Spring Integration interceptor.
  • Shares WebFlux route lookup through a static helper and adds route edge-case coverage.
File Description
WebfluxServerHttpAttributesGetterTest.java Tests missing, wildcard, and context-path routes.
WebfluxServerHttpAttributesGetter.java Replaces the singleton and extracts shared route lookup.
TelemetryProducingWebFilter.java Uses the shared route helper.
SpringWebfluxServerTelemetryBuilder.java Constructs the HTTP attributes getter during setup.
TracingChannelInterceptor.java Reuses an interceptor-owned message getter.
SpringIntegrationTelemetryBuilder.java Constructs the consumer getter during setup.
MessageHeadersGetter.java Converts the singleton enum to an instantiable class.
PulsarSingletons.java Creates receive and process getters during setup.
PulsarBatchRequestSpanLinksExtractor.java Reuses an extractor-owned getter for batch records.
MessageTextMapGetter.java Converts the singleton enum to an instantiable class.
CamelSingletons.java Houses and constructs the Camel request getter.
CamelPropagationUtil.java Removes the relocated getter and its accessor.
SqsMessageTextMapGetter.java Replaces singleton access with package-private construction.
SqsEventSpanLinksExtractor.java Reuses an extractor-owned SQS getter.
AwsLambdaSqsInstrumenterFactory.java Constructs the selected-message processing getter during setup.

Review effort: Balanced

@trask
trask marked this pull request as ready for review November 28, 2026 03:33
@trask
trask requested a review from a team as a code owner November 28, 2026 03:33
trask and others added 2 commits November 28, 2026 10:14
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@trask
trask force-pushed the copilot/otelbotinstruction-audit-46095846922 branch from e30ec51 to 116a27b Compare November 28, 2026 18:14

This branch has not been deployed

No deployments
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