Skip to content
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

[Maven extension] cant set service name #183

Closed
delanym opened this issue Jan 12, 2022 · 7 comments
Closed

[Maven extension] cant set service name #183

delanym opened this issue Jan 12, 2022 · 7 comments
Assignees
Labels
Milestone

Comments

@delanym
Copy link

delanym commented Jan 12, 2022

I want to set the service.name to something other than Maven.

.\mvnw.cmd -e clean install --threads 3 -Dotel.traces.exporter=otlp -Dotel.exporter.otlp.endpoint=http://10.1.0.203:4317 -Dotel.instrumentation.maven.mojo.enabled=false -Dmaven.ext.class.path=c:\opt\opentelemetry-maven-extension-1.10.0-20220112.132157-1.jar -Dotel.resource.attributes=service.name=cats,service.namespace=mammals -Dotel.service.name=django

In this line I've set the service name in 2 ways, but neither of them seems to have any effect
https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure

What am I doing wrong?

@cyrille-leclerc
Copy link
Member

cyrille-leclerc commented Jan 12, 2022

@delanym
Copy link
Author

delanym commented Jan 13, 2022

It looks fixed, but it also looks like there's no longer a default "maven".

@cyrille-leclerc
Copy link
Member

@delanym can you please verify it's fixed with v1.10.0?

@delanym
Copy link
Author

delanym commented Jan 19, 2022

@cyrille-leclerc I've checked it on v1.10.0-alpha

@delanym
Copy link
Author

delanym commented Jan 19, 2022

@cyrille-leclerc is it possible to set the service name to the runner when using -T3 etc? Similar to what you get with MAVEN_OPTS="-Dorg.slf4j.simpleLogger.showThreadName=true"

@cyrille-leclerc
Copy link
Member

@cyrille-leclerc is it possible to set the service name to the runner when using -T3 etc? Similar to what you get with MAVEN_OPTS="-Dorg.slf4j.simpleLogger.showThreadName=true"

service.name should be settable using the -Dotel.service.name=my-maven system property

See https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#opentelemetry-resource

@delanym
Copy link
Author

delanym commented Jan 19, 2022

@cyrille-leclerc im asking for something else #209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants