Skip to content

Use domain-owned schemas for GenAI and Camel HTTP telemetry - #20750

Open
trask with Copilot wants to merge 8 commits into
copilot/cleanup-schema-url-ownershipfrom
copilot/implement-schema-url-audit-findings
Open

trask with Copilot wants to merge 8 commits into
copilot/cleanup-schema-url-ownershipfrom
copilot/implement-schema-url-audit-findings

Conversation

Copilot AI commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Set GenAI 1.37.0 on OpenAI, Spring AI, and AWS Bedrock spans, operation/token metrics, and logs. Set HTTP 1.41.0 on Camel HTTP operations while preserving custom, database, and messaging behavior.

Uses the domain-owned definitions from #20747 with the existing InstrumenterBuilder.setSchemaUrl(...) API. Bedrock keeps its GenAI schema regardless of the preview mode for supporting RPC attributes. Independent GenAI event loggers set their schemas separately from instrumenters.

Generic RabbitMQ channel operations are excluded because supporting messaging/network attributes do not define a messaging operation. The existing publish, settlement, receive, and processing paths are unchanged.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-10-20 23:31 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.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Copilot AI changed the title [WIP] Implement schema-URL audit findings for OpenAI and others Populate missing GenAI, Camel HTTP, and RabbitMQ scope schema URLs Oct 20, 2026
Copilot AI requested a review from trask October 20, 2026 02:39
@trask
trask requested a balanced review from Copilot October 20, 2026 02:44

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

The targeted schema changes preserve existing selection behavior, include focused regression coverage, and have no unresolved blocking findings.

No open issues 🎉

What changed in this PR

Addresses four schema-URL gaps from #20749 without introducing a blanket fallback or changing telemetry names, shape, or configuration.

Changes:

  • Adds explicit schemas to GenAI instrumenters and independent event loggers.
  • Assigns schemas to Camel HTTP and generic RabbitMQ spans while preserving existing schema selection.
  • Adds exported-telemetry assertions and exception-log/RPC test variants.
File Description
instrumentation/​spring/​spring-ai-1.0/​javaagent/​src/​test/​java/​io/​opentelemetry/​javaagent/​instrumentation/​spring/​ai/​v1_0/​ChatModelTest.java Tests failure-span and exception-log schemas.
instrumentation/​spring/​spring-ai-1.0/​javaagent/​src/​test/​java/​io/​opentelemetry/​javaagent/​instrumentation/​spring/​ai/​v1_0/​AbstractOpenAiChatModelTest.java Checks span, metric, and event-log schemas.
instrumentation/​spring/​spring-ai-1.0/​javaagent/​src/​main/​java/​io/​opentelemetry/​javaagent/​instrumentation/​spring/​ai/​v1_0/​SpringAiSingletons.java Sets Spring AI schemas.
instrumentation/​spring/​spring-ai-1.0/​javaagent/​build.gradle.kts Adds an exception-log test variant.
instrumentation/​rabbitmq-2.7/​javaagent/​src/​test/​java/​io/​opentelemetry/​javaagent/​instrumentation/​rabbitmq/​v2_7/​RabbitMqTest.java Checks channel and publish schemas.
instrumentation/​rabbitmq-2.7/​javaagent/​src/​main/​java/​io/​opentelemetry/​javaagent/​instrumentation/​rabbitmq/​v2_7/​RabbitSingletons.java Applies the messaging schema helper.
instrumentation/​openai/​openai-java-1.1/​testing/​src/​main/​java/​io/​opentelemetry/​instrumentation/​openai/​v1_1/​AbstractOpenAiTest.java Checks exception-log schemas.
instrumentation/​openai/​openai-java-1.1/​testing/​src/​main/​java/​io/​opentelemetry/​instrumentation/​openai/​v1_1/​AbstractEmbeddingsTest.java Checks embedding span and metric schemas.
instrumentation/​openai/​openai-java-1.1/​testing/​src/​main/​java/​io/​opentelemetry/​instrumentation/​openai/​v1_1/​AbstractChatTest.java Checks chat telemetry schemas.
instrumentation/​openai/​openai-java-1.1/​library/​src/​main/​java/​io/​opentelemetry/​instrumentation/​openai/​v1_1/​OpenAITelemetryBuilder.java Sets OpenAI instrumenter and logger schemas.
instrumentation/​camel-2.20/​javaagent/​src/​test/​java/​io/​opentelemetry/​javaagent/​instrumentation/​camel/​v2_20/​CamelProcessMetricsTest.java Tests decorator schema selection and metric schemas.
instrumentation/​camel-2.20/​javaagent/​src/​main/​java/​io/​opentelemetry/​javaagent/​instrumentation/​camel/​v2_20/​decorators/​HttpSpanDecorator.java Exposes the HTTP decorator for classification.
instrumentation/​camel-2.20/​javaagent/​src/​main/​java/​io/​opentelemetry/​javaagent/​instrumentation/​camel/​v2_20/​CamelSingletons.java Selects a schema-bearing HTTP instrumenter.
instrumentation/​aws-sdk/​aws-sdk-2.2/​testing/​src/​main/​java/​io/​opentelemetry/​instrumentation/​awssdk/​v2_2/​AbstractAws2BedrockRuntimeTest.java Checks Bedrock schemas across RPC modes.
instrumentation/​aws-sdk/​aws-sdk-2.2/​library/​src/​main/​java/​io/​opentelemetry/​instrumentation/​awssdk/​v2_2/​internal/​AwsSdkInstrumenterFactory.java Sets the Bedrock event-logger schema.
instrumentation/​aws-sdk/​aws-sdk-2.2/​library/​build.gradle.kts Adds RPC preview and duplicate-mode variants.

Review effort: Balanced

@trask
trask changed the base branch from main to copilot/cleanup-schema-url-ownership October 20, 2026 04:01
@trask trask changed the title Populate missing GenAI, Camel HTTP, and RabbitMQ scope schema URLs Use domain-owned schemas for GenAI and Camel HTTP telemetry Oct 20, 2026
@trask
trask added this pull request to stack #20762 October 20, 2026 05:34
@trask
trask force-pushed the copilot/implement-schema-url-audit-findings branch from 1452123 to 730abc8 Compare October 20, 2026 17:40
Comment thread instrumentation/aws-sdk/aws-sdk-2.2/library/build.gradle.kts Outdated
Copilot AI requested a review from trask October 20, 2026 18:46
@trask
trask marked this pull request as ready for review October 20, 2026 19:19
@trask
trask requested a review from a team as a code owner October 20, 2026 19:19
.satisfies(
spanData ->
assertThat(
spanData.getInstrumentationScopeInfo().getSchemaUrl())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot Update this PR directly to use the existing InstrumentationScopeAssertions.hasScopeSchemaUrl shortcut for all 24 schema-only assertions introduced by this PR. Do not create a follow-up PR as a workaround.

Replace the hand-written satisfies lambdas that read getInstrumentationScopeInfo().getSchemaUrl() with satisfies(hasScopeSchemaUrl(expectedSchemaUrl)), using a static import of io.opentelemetry.instrumentation.testing.util.InstrumentationScopeAssertions.hasScopeSchemaUrl. The helper supports spans, metrics, logs, and null expectations. Preserve every expected schema URL and null expectation, all other assertions, and the existing telemetry coverage.

The 24 replacements are in these files: instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2BedrockRuntimeTest.java (5); instrumentation/camel-2.20/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/camel/v2_20/RestCamelTest.java (4); instrumentation/openai/openai-java-1.1/testing/src/main/java/io/opentelemetry/instrumentation/openai/v1_1/AbstractChatTest.java (5); instrumentation/openai/openai-java-1.1/testing/src/main/java/io/opentelemetry/instrumentation/openai/v1_1/AbstractEmbeddingsTest.java (3); instrumentation/openai/openai-java-1.1/testing/src/main/java/io/opentelemetry/instrumentation/openai/v1_1/AbstractOpenAiTest.java (1); instrumentation/rabbitmq-2.7/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/v2_7/RabbitMqTest.java (1); instrumentation/spring/spring-ai-1.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/spring/ai/v1_0/AbstractOpenAiChatModelTest.java (5).

Acceptance criteria: all 24 assertions use the shared helper instead of manual schema-getter lambdas, with unchanged expected values and coverage. Adjust imports as needed. Keep this test-only cleanup scoped to this PR, preserve all production changes and the existing base branch and draft/ready state, and do not update other PR branches, restack, merge, post replies, or resolve threads. Follow repository formatting and targeted validation instructions.

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.

Applied the helper substitutions across all 24 assertions in commit 49380c50; expected URLs and null expectations are unchanged.

Copilot AI requested a review from trask October 20, 2026 20:49
Copilot AI and others added 8 commits October 20, 2026 15:02
Co-authored-by: trask <218610+trask@users.noreply.github.com>
Co-authored-by: trask <218610+trask@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: trask <218610+trask@users.noreply.github.com>
Co-authored-by: trask <218610+trask@users.noreply.github.com>
Co-authored-by: trask <218610+trask@users.noreply.github.com>
Co-authored-by: trask <218610+trask@users.noreply.github.com>
@trask
trask force-pushed the copilot/implement-schema-url-audit-findings branch from 7f27643 to fe1ebec Compare October 20, 2026 22:02

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