Skip to content

Conversation

@jaydeluca
Copy link
Member

A question came up in slack around whether this should be added as a dependency to the application classpath or if it's an agent extension, so I wanted to make this more clear

@jaydeluca jaydeluca requested a review from a team as a code owner October 22, 2025 10:10
To use:

* Add a dependency on `io.opentelemetry.contrib:opentelemetry-cel-sampler:<version>`
* See the [extension documentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/examples/extension/README.md#build-and-add-extensions) for how to add extensions when using the java agent.
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this module has an external dependency it can't just be added as an extension. User would first need to merge everything into single jar or also pass the cel jar as an extension (haven't tried that but since all the extensions are in the same class loader passing the dependencies as extensions should work). We could make this simpler by publishing shaded jars like in

See also https://github.com/open-telemetry/opentelemetry-java-contrib/blob/5809da024bf450aa388d37a7ca2c398c2ca2cac0/gcp-auth-extension/README.md#with-opentelemetry-java-agent

Copy link
Contributor

Choose a reason for hiding this comment

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

@laurit Good point. I will have a look into this. Definitly an improvement.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants