-
Notifications
You must be signed in to change notification settings - Fork 171
Publish jar for cel extension #2516
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
Conversation
03af983 to
47c43e0
Compare
|
|
||
| tasks { | ||
| shadowJar { | ||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied this from the GCP auth extension as-is
https://github.com/open-telemetry/opentelemetry-java-contrib/blob/5809da024bf450aa388d37a7ca2c398c2ca2cac0/gcp-auth-extension/build.gradle.kts
zeitlinger
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that also what the example does.
it's then copied in https://github.com/grafana/grafana-opentelemetry-java/blob/bad369155b754fdb36887fc2082bb283ecdb76be/Dockerfile#L62
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- image: https://github.com/open-telemetry/opentelemetry-operator/pkgs/container/opentelemetry-operator%2Fautoinstrumentation-java
- why: the docker layer can be cached and renovate knows how to update
| # 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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
|
@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. 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
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. |
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