Skip to content

Conversation

@jaydeluca
Copy link
Member

@jaydeluca jaydeluca commented Dec 10, 2025

Description:

@laurit pointed out that we are not publishing a jar for the new cel sampler.

I've added the extension jar creation here, as well as an integration test.

Testing:

Integration tests that use a basic app and package and test the CEL sampler functionality

cc @dol

@jaydeluca jaydeluca marked this pull request as ready for review December 10, 2025 17:44
@jaydeluca jaydeluca requested a review from a team as a code owner December 10, 2025 17:44

tasks {
shadowJar {
/**
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@zeitlinger zeitlinger left a comment

Choose a reason for hiding this comment

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

great 😀

WORKDIR /usr/src/app/

# renovate: datasource=github-releases depName=open-telemetry/opentelemetry-java-instrumentation
ENV OPENTELEMETRY_JAVA_INSTRUMENTATION_VERSION=v2.22.0
Copy link
Member

Choose a reason for hiding this comment

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

using FROM is more cache friendly and renovate works out of the box

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

i might be misunderstanding something, but what would i be using as the base image using "FROM"? this is pulling the agent

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

the grafana one is pulling a docker image, it is not pulling the agent directly.

Doing something like this doesn't work/make sense since it isn't a container:

ARG OPENTELEMETRY_JAVA_INSTRUMENTATION_VERSION=v2.22.0
FROM github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/$OPENTELEMETRY_JAVA_INSTRUMENTATION_VERSION/opentelemetry-javaagent.jar as agent

I'm not aware of a container I could use to pull with the agent, and I'm not sure if it would be beneficial compared to just pulling it directly like this?

Copy link
Member

Choose a reason for hiding this comment

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

# Based on: https://github.com/jdx/mise/discussions/4461
windows_executable_extensions = ["sh"]
windows_default_file_shell_args = "bash"
unix_default_file_shell_args = "bash"
Copy link
Member

Choose a reason for hiding this comment

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

what's that needed for?

Copy link
Member Author

Choose a reason for hiding this comment

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

was getting this:

[oats-tests] $ ~/work/opentelemetry-java-contrib/opentelemetry-java-contrib/.mise/tasks/oats-tests.sh
/home/runner/work/opentelemetry-java-contrib/opentelemetry-java-contrib/.mise/tasks/oats-tests.sh: 4: set: Illegal option -o pipefail

@dol
Copy link
Contributor

dol commented Dec 10, 2025

@jaydeluca Sorry, for being late to the party. I was experimenting the last few days on a proper setup on how to distribute the shadow jar of the cel-sampler, which took longer than expected.
As per legal requirement, the license agreement of the distributed dependencies should be checked before each release or dependency update. The PR #2518 tries to detect the licenses of all direct and transient dependencies and compares it to an allow list.
It also adds the SBOM and all the third party license agreement to the uber/shadow jar. This way all the legal obligations should be met.

Your PR adds the shadowJar bundling capability and an integration test to the cel-sampler. I agree, that an end2end integration test is missing. As

val integrationTestUserCreds by registering(JvmTestSuite::class) {
already provides a good base for an integration test, I would take a similar approach and would do an implementation in pure Gradle and Java. From a developer perspective it's now required to have the docker, docker compose and mise tools installed to run the integration tests.
This might spark an overall discussion on how to do end2end tests. Eg. #2119 follows a slightly different approach.

For the shadowJar bundling I would wait how the discussion in #2518 unfolds. Depending on the outcome it would be ideal if the integration tests could based on the proposed shadowJar convention.

@jaydeluca jaydeluca closed this Dec 11, 2025
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