-
Notifications
You must be signed in to change notification settings - Fork 40.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use unknown_service as default application name for OpenTelemetry #38219
Conversation
Hey, thanks for the issue and the PR. In the OpenTelemetry SDK, they use this as the default: private static final Resource MANDATORY =
create(Attributes.of(SERVICE_NAME, "unknown_service:java")); I wonder if we should use our default at all. What do you think of this change? SdkTracerProvider otelSdkTracerProvider(Environment environment, ObjectProvider<SpanProcessor> spanProcessors,
Sampler sampler) {
String applicationName = environment.getProperty("spring.application.name");
Resource springResource = Resource.create((applicationName != null) ? Attributes.of(ResourceAttributes.SERVICE_NAME, applicationName) : Attributes.empty());
// ... That would only set the service name if the application name is set, otherwise it will use OTels SDK defaults. |
Micrometer is not using OTEL SDK's so metrics will be using |
Could be, that would be a question for the Micrometer team, I'll point them to that issue. Let's see what they say. |
So, OTels default of I lean towards making the Boot default The only thing I'm worried is that this is a breaking change if users haven't set |
I think it should be 3.2 at the very earliest and probably wait until 3.3 given where we are in 3.2's schedule. |
I believe for metric users moving from 3.1 to 3.2 will be a breaking change. As per this code and this code, I believe if For tracing yes, it might be a breaking change given that in 3.1 "application" was used a fallback value. |
We need to adjust the name in |
Thank you very much and congratulations on your first contribution 🎉! |
Fixes #38218