Skip to content

More accurate opentelemetry spring boot starter condition - #465

Merged
skjolber merged 1 commit into
mainfrom
adjustOtelSpringBootStarterCondition
Aug 26, 2026
Merged

More accurate opentelemetry spring boot starter condition#465
skjolber merged 1 commit into
mainfrom
adjustOtelSpringBootStarterCondition

Conversation

@skjolber

Copy link
Copy Markdown
Contributor

Use a class actually in the starter, not just the opentelemetry api.

Copilot AI lite review requested due to automatic review settings August 26, 2026 14:07
@skjolber
skjolber requested review from a team as code owners August 26, 2026 14:07

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.

Pull request overview

Adjusts GCP trace auto-configuration gating so the “fallback” correlation/trace ID integrations only activate when the Spring Boot OpenTelemetry starter auto-config is not present (rather than merely when the OpenTelemetry API is absent/present). This better aligns cloud-logging’s Spring Boot auto-config behavior with the intended dependency signal.

Changes:

  • Updated servlet trace auto-configuration to condition on the absence of Spring Boot’s OpenTelemetrySdkAutoConfiguration.
  • Updated gRPC trace auto-configuration to condition on the absence of Spring Boot’s OpenTelemetrySdkAutoConfiguration.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
gcp/correlation-id-trace-spring-boot-gcp-web/src/main/java/no/entur/logging/cloud/gcp/trace/spring/web/GcpTraceAutoConfiguration.java Tightens the conditional guard to detect the Spring Boot OpenTelemetry starter auto-config class rather than the generic OTel API class.
gcp/correlation-id-trace-spring-boot-gcp-grpc/src/main/java/no/entur/logging/cloud/gcp/trace/spring/grpc/GcpGrpcTraceAutoConfiguration.java Mirrors the same conditional refinement for the gRPC interceptor auto-configuration path.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@skjolber
skjolber merged commit 77b81ab into main Aug 26, 2026
11 checks passed
@skjolber
skjolber deleted the adjustOtelSpringBootStarterCondition branch August 26, 2026 14:16
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