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

Compilation issue - io.opentelemetry.semconv.resource.attributes when packaging with maven in Opentelemetry 1.0.0 version #2973

Closed
chandru-kumar opened this issue Mar 3, 2021 · 7 comments
Labels
Bug Something isn't working

Comments

@chandru-kumar
Copy link

chandru-kumar commented Mar 3, 2021

I see compilation issue in io.opentelemetry.semconv.resource.attributes when packaging with maven in Opentelemetry 1.0.0 version, but not in 0.17.1 version

Setup a maven project and execute the Zipkin Example..Example run fine and errorred out while packaging..Below is the error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project opentemetry.example: Compilation failure
[ERROR] /P:/Eclipse Workspace/opentemetry.example/src/main/java/zipkin/example/ExampleConfiguration.java:[15,52] package io.opentelemetry.semconv.resource.attributes does not exist

This issue occurs with 1.0.0 version not in previous versions -0.17.1

opentelemetry-1.0.0 version
pom.xml

Environment
Compiler: (e.g., "Java 8 ")
OS: (e.g., "Windows")

@chandru-kumar chandru-kumar added the Bug Something isn't working label Mar 3, 2021
@anuraaga
Copy link
Contributor

anuraaga commented Mar 3, 2021

Hi @ChandrewR. Semantic attributes are currently not stable so we don't export semantic conventions by default. Do you need to set attributes? Until they stabilize we recommend you inline the keys yourself instead of using our artifact which may have breaking changes at any time. If breaking changes are acceptible to you, you could alternatively add our bom-alpha and semconv artifacts directly to your build. They're called alpha for a reason though :-)

@chandru-kumar
Copy link
Author

Ok..Got it..How can i set the service name without using the Resource attributes? You can refer the Zipkin Example..

@anuraaga
Copy link
Contributor

anuraaga commented Mar 3, 2021

This is definitely an important usability gap you've brought to attention, thanks. For now the best is to define your own AttributeKey.stringKey("service.name") and use it. We do need to come up with an approach for stabilizing this important attribute ASAP though.

@chandru-kumar
Copy link
Author

Yeah..This works until it gets stabilized. Thank you ! @anuraaga

@anuraaga
Copy link
Contributor

anuraaga commented Mar 3, 2021

Great - I've opened the attached spec issue to see how we can proceed on stabilizing this attribute hopefully we can improve it soon.

@jkwatson
Copy link
Contributor

Do we need to keep this issue open?

@anuraaga
Copy link
Contributor

Don't think so - @chandru-kumar we are tracking the ability to stabilize certain attributes in open-telemetry/build-tools#35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants