Skip to content

Align OTLP signal-specific properties with common fallback configuration#50461

Open
somiljain2006 wants to merge 5 commits into
spring-projects:mainfrom
somiljain2006:otlp-configuration-harmonization
Open

Align OTLP signal-specific properties with common fallback configuration#50461
somiljain2006 wants to merge 5 commits into
spring-projects:mainfrom
somiljain2006:otlp-configuration-harmonization

Conversation

@somiljain2006

Copy link
Copy Markdown

Fixes #47962

Fix OTLP common property fallback handling. Align OTLP logging and tracing fallback behavior when resolving
common and signal-specific configuration properties. This change removes strict transport assertions from connection
details implementations since the effective transport may now be determined through fallback resolution between signal-specific and common OTLP properties.

Also adds regression tests covering:

  • common transport fallback
  • signal-specific transport override
  • common timeout fallback
  • signal-specific timeout override
  • common compression fallback
  • signal-specific compression override
  • connect-timeout fallback behavior
  • endpoint precedence
  • header merging behavior

@somiljain2006
somiljain2006 force-pushed the otlp-configuration-harmonization branch from 7710e2f to ef4c20c Compare May 18, 2026 20:00
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 18, 2026
@somiljain2006
somiljain2006 force-pushed the otlp-configuration-harmonization branch from b67ca48 to 9b14d8b Compare May 18, 2026 20:10
Signed-off-by: somiljain2006 <somil16022006@gmail.com>
Signed-off-by: somiljain2006 <somil16022006@gmail.com>
Signed-off-by: somiljain2006 <somil16022006@gmail.com>
Signed-off-by: somiljain2006 <somil16022006@gmail.com>
@somiljain2006
somiljain2006 force-pushed the otlp-configuration-harmonization branch from 9b14d8b to 9d575d7 Compare May 18, 2026 20:12
@wilkinsona
wilkinsona requested a review from mhalbritter June 28, 2026 11:37
@mhalbritter mhalbritter self-assigned this Jul 15, 2026
@mhalbritter

Copy link
Copy Markdown
Contributor

Hello,

thanks for the PR.

the newly created class OtlpProperties creates the impression that all of the contained properties are always applicable, but that's not the case, isn't it?

The endpoint is used as a fallback, which is fine. The headers are merged, which is fine too.

The timeout is only used as a fallback for metrics via Micrometer, but org.springframework.boot.micrometer.metrics.autoconfigure.export.properties.PushRegistryProperties#readTimeout has a default value of 10s, therefore the fallback is never used. Same problem with connectTimeout. It's missing from tracing and logging completely.

transport is used as a fallback in tracing and logging, but not in metrics. That's because it's not possible to use gRPC transport with Micrometer, it only supports http.

compression doesn't seem to be used anywhere?

All in all, I don't think extracting all the common properties you did will work, either because not all signals support all settings or we have defaults in place, which renders the fallback obsolete.

It could work for endpoint and headers, though. In your PR, you append /v1/metrics to the base path for metrics, but this is missing for tracing and logging.

Do you want to rework the PR to just target endpoint and headers?

@mhalbritter mhalbritter added the status: waiting-for-feedback We need additional information before we can continue label Jul 15, 2026
@mhalbritter

Copy link
Copy Markdown
Contributor

Compression could work, too, if we drop the default values in the specific classes (OtlpMetricsProperties, OtlpTracingProperties and OtlpLoggingProperties).

for timeouts, i don't think this works as OTel uses connect timeout and timeout, while micrometer uses connect timeout and read timeout. I guess timeout from otlp is overall timeout (including connection timeout), while Micrometer's is not including connect timeout.

@mhalbritter mhalbritter 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.

See above.

Signed-off-by: somiljain2006 <somil16022006@gmail.com>
@somiljain2006
somiljain2006 force-pushed the otlp-configuration-harmonization branch from b5e9ffb to eaded03 Compare July 15, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make it easier to configure OTLP exports

3 participants