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

add Java Elastic distribution for Ad and Fraud services #16

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

rogercoll
Copy link
Collaborator

@rogercoll rogercoll commented May 21, 2024

Changes

Add Elastic Dockerfiles (Dockerfile.elastic) that uses the Elastic's Java agent distribution for the Ad and Fraud detection services. Those Dockerfiles are a copy of the upstream version but replacing the Java agent.
The idea is to later parametrize the Dockerfile file used in the docker-compose.yml to point to our custom Dockerfile using the new .env.override file.

  • Dependabot will be configured in a future PR to maintain the agent version up-to-date.

Alternatives

  • Modify the Dockerfile used in the upstream version:
    • Pros: no need to make to parametrize Dockerfile (upstream changes)
    • Cons:
      • Merge conflicts

Merge Requirements

For new features contributions please make sure you have completed the following
essential items:

  • CHANGELOG.md updated to document new feature additions
  • Appropriate documentation updates in the docs
  • Appropriate Helm chart updates in the helm-charts

Maintainers will not merge until the above have been completed. If you're unsure
which docs need to be changed ping the
@open-telemetry/demo-approvers.

@rogercoll rogercoll force-pushed the add_java_distribution branch from 491b27a to 2fefde5 Compare May 21, 2024 11:27
@elastic-apm-tech elastic-apm-tech force-pushed the main branch 3 times, most recently from df64111 to 81f0ea1 Compare June 3, 2024 08:27
@rogercoll rogercoll force-pushed the add_java_distribution branch from c41e903 to 1a4f4c0 Compare June 3, 2024 08:44
@elastic-apm-tech elastic-apm-tech force-pushed the main branch 2 times, most recently from 7684417 to 05ad940 Compare June 5, 2024 09:28
@rogercoll rogercoll force-pushed the add_java_distribution branch from 1a4f4c0 to 48e4547 Compare June 5, 2024 09:35
Copy link

cla-checker-service bot commented Jun 5, 2024

💚 CLA has been signed

@rogercoll rogercoll force-pushed the add_java_distribution branch 2 times, most recently from fd46d86 to 23d74cd Compare June 5, 2024 09:43
@rogercoll rogercoll changed the title replace Java agent with Elastic distribution add Java Elastic distribution for Ad and Fraud services Jun 5, 2024
@rogercoll rogercoll marked this pull request as ready for review June 5, 2024 09:56
@elastic-apm-tech elastic-apm-tech force-pushed the main branch 2 times, most recently from c86cdc0 to af6fa16 Compare June 6, 2024 15:27
@rogercoll rogercoll force-pushed the add_java_distribution branch from 23d74cd to 719b57a Compare June 7, 2024 08:05
@rogercoll rogercoll requested a review from a team June 7, 2024 08:06
Comment on lines +19 to +25
ARG version=0.3.2
WORKDIR /usr/src/app/

COPY --from=builder /usr/src/app/ ./
ADD --chmod=644 https://repo1.maven.org/maven2/co/elastic/otel/elastic-otel-javaagent/$version/elastic-otel-javaagent-$version.jar /usr/src/app/opentelemetry-javaagent.jar
ENV JAVA_TOOL_OPTIONS=-javaagent:/usr/src/app/opentelemetry-javaagent.jar
ENV ELASTIC_OTEL_INFERRED_SPANS_ENABLED=true
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Gathers and includes the Java Agent distribution

Copy link
Member

Choose a reason for hiding this comment

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

In the future we might have a docker image you could just copy from, which makes the update process even easier as dependabot can handle it.

Comment on lines +19 to +25
ARG version=0.3.2
WORKDIR /usr/src/app/

COPY --from=builder /usr/src/app/ ./
ADD --chmod=644 https://repo1.maven.org/maven2/co/elastic/otel/elastic-otel-javaagent/$version/elastic-otel-javaagent-$version.jar /usr/src/app/opentelemetry-javaagent.jar
ENV JAVA_TOOL_OPTIONS=-javaagent:/usr/src/app/opentelemetry-javaagent.jar
ENV ELASTIC_OTEL_INFERRED_SPANS_ENABLED=true
Copy link
Member

Choose a reason for hiding this comment

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

In the future we might have a docker image you could just copy from, which makes the update process even easier as dependabot can handle it.

@rogercoll rogercoll force-pushed the add_java_distribution branch from 719b57a to 816c758 Compare June 7, 2024 13:30
@rogercoll rogercoll merged commit 7321814 into elastic:main Jun 7, 2024
2 of 3 checks passed
@rogercoll rogercoll deleted the add_java_distribution branch June 7, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants