Skip to content

Conversation

@jaydeluca
Copy link
Member

Fixes #15009

Add ability for users to customize AutoConfiguredOpenTelemetrySdk, and add cache for environment config lookups.

@jaydeluca jaydeluca requested a review from a team as a code owner October 24, 2025 12:26
@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Oct 24, 2025
case "otel.exporter.otlp.logs.headers":
return Optional.of(
mergeWithOtel(otlpExporterProperties.getLogs().getHeaders(), otelSdkMap));
case "otel.exporter.otlp.metrics.headers":
Copy link
Member

Choose a reason for hiding this comment

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

It looks like this is copied from somewhere - and could be extracted into a method

Copy link
Member Author

Choose a reason for hiding this comment

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

i didnt see anywhere else that this is being used, but i extracted it anyway, makes things cleaner

return or(
environment.getProperty(ConfigUtil.normalizeEnvironmentVariableKey(name), Long.class),
otelSdkProperties.getLong(name));
return cachedLongValues
Copy link
Member

Choose a reason for hiding this comment

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

Looks like a generic method could be extracted to shorten this and below methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spring boot starter test native This label can be applied to PRs to trigger them to run native tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance issue in SpringConfigProperties#getInt due to lack of caching

2 participants