Repository navigation
Conversation
Pull request dashboard statusWaiting on reviewers · refreshed 2026-10-20 23:31 UTC Review the latest changes. Status above doesn't look right?
|
There was a problem hiding this comment.
🟢 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
1452123 to
730abc8
Compare
| .satisfies( | ||
| spanData -> | ||
| assertThat( | ||
| spanData.getInstrumentationScopeInfo().getSchemaUrl()) |
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
Applied the helper substitutions across all 24 assertions in commit 49380c50; expected URLs and null expectations are unchanged.
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>
7f27643 to
fe1ebec
Compare
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.