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 Externalize Configuration for spanName #1056

Open
jmontanari opened this issue Sep 28, 2023 · 0 comments
Open

Maven-Extension Externalize Configuration for spanName #1056

jmontanari opened this issue Sep 28, 2023 · 0 comments

Comments

@jmontanari
Copy link

Component(s)

maven-extension

Is your feature request related to a problem? Please describe.

I have been trying to flush out the maven-extension in a Jenkins Environment trying to use in coordination with the jenkins openTelemetry plugin to Sync up a transaction between the 2 tools.

Found a few issues during flushing out usecases.

The transaction name is not unique to each build instance . IE build 1 vrs 2 would generate the same transaction if the version was a snapshot. IE 1.0-SNAPSHOT

Similar problem our build system happens to run multiple maven commands out of a sub folder during a build which changes the artifactID for the transaction. This has potential to overload an existing transaction name that was created from the compiling of the modules. IE something like mvn test, mvn verify within the same module would generate the same transaction.

Looks like the logic for the spanName is more or less hard coded around line 153 in io.opentelemetry.maven.OtelExecutionListener.java:

Describe the solution you'd like

I think it makes sense to build in the logic for spanName to be able to pull from an ENV/System property and default if nothing is specified. This would let each execution the ability to define custom transaction names

Couple poc examples i thought could make sense separate. Each one of these could hypothetically be run out of the same maven module but have different transactions. Today these would be assigned the same transaction name.

mvn test -Dotel.instrumentation.maven.span_name="Test ${env.BUILD_TAG}"
mvn Integration-test -Dotel.instrumentation.maven.span_name="IntegrationTest ${env.BUILD_TAG}"
mvn frontend:npm@npm-test  -Dotel.instrumentation.maven.span_name="UI Test ${env. BUILD_TAG}"

Describe alternatives you've considered

No response

Additional context

No response

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

No branches or pull requests

4 participants