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

Open Telemetry and Docker #315

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Open Telemetry and Docker #315

wants to merge 6 commits into from

Conversation

mdemare
Copy link
Collaborator

@mdemare mdemare commented Jun 25, 2024

Docker compose setup in which to run api, worker, redis and prometheus.

After starting the dev docker container:
api produces metrics on http://localhost:9464/metrics
worker produces metrics on http://localhost:9465/metrics
prometheus runs on http://localhost:9090/

api and worker also produce metrics on their old endpoints. The plan is to move these metrics to the new endpoints, but that hasn't happened yet.

@mdemare
Copy link
Collaborator Author

mdemare commented Jun 25, 2024

docker-compose up geeft de volgende error bij mij:

api-1         | [otel.javaagent 2024-06-25 11:16:04:750 +0000] [main] INFO io.opentelemetry.javaagent.tooling.VersionLogger - opentelemetry-javaagent - version: 2.2.0
api-1         | #
api-1         | # A fatal error has been detected by the Java Runtime Environment:
api-1         | #
api-1         | #  SIGSEGV (0xb) at pc=0x00007ffffe94ae5e, pid=1, tid=19
api-1         | #
api-1         | # JRE version: OpenJDK Runtime Environment (11.0.14+9) (build 11.0.14+9-post-Debian-1deb11u1)
api-1         | # Java VM: OpenJDK 64-Bit Server VM (11.0.14+9-post-Debian-1deb11u1, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
api-1         | # Problematic frame:
api-1         | # V  [libjvm.so+0x62ae5e]
api-1         | #
api-1         | # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
api-1         | #
api-1         | # An error report file with more information is saved as:
api-1         | # //hs_err_pid1.log
api-1         | #
api-1         | # If you would like to submit a bug report, please visit:
api-1         | #   https://bugs.debian.org/openjdk-11
api-1         | #
api-1         |
api-1         | [error occurred during error reporting (), id 0xb, SIGSEGV (0xb) at pc=0x00007fffff61d602]
api-1         |
api-1 exited with code 127

@mdemare mdemare force-pushed the opentelemetry branch 5 times, most recently from d456dc3 to 48144f0 Compare June 25, 2024 12:17
@joodie joodie requested a review from remvee June 26, 2024 07:06
Makefile Outdated
rm -rf classes target

opentelemetry-javaagent.jar:
curl -L https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar -o $@
Copy link
Collaborator

Choose a reason for hiding this comment

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

Lijkt me niet heel verstandig "latest" te gebruiken omdat het maken van een docker image nog minder deterministisch maakt. Tegelijkertijd moeten we dan wel gaan tracken welke versie van opentelemetry we gebruiken. Is het niet mogelijk deze jar in onze uberjar op te nemen en daarmee een duidelijk dependency te hebben?

Dockerfile Show resolved Hide resolved
@@ -0,0 +1,41 @@
# my global config
Copy link
Collaborator

Choose a reason for hiding this comment

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

Onzinnige comment.


#rule_files:
# - "first.rules"
# - "my/*.rules"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Dead code? Als dit een zinnig snippet is, documenteren.

service: prometheus
# - targets: ["host.docker.internal:8080"]
# labels:
# service: eduhub-gateway
Copy link
Collaborator

Choose a reason for hiding this comment

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

Dead code? Als dit een zinnig snippet is, documenteren.

COPY --from=builder /app/target/eduhub-rio-mapper.jar /eduhub-rio-mapper.jar
# Make sure there is an opentelemetry agent in the workdir in case docker-compose
# starts up a process with -javaagent in the JAVA_TOOL_OPTIONS
COPY --from=builder /app/vendor/opentelemetry-javaagent-2.2.0.jar /opentelemetry-javaagent.jar
Copy link
Collaborator

Choose a reason for hiding this comment

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

Liever geen binaries in de repo en volgens mij wordt deze al gedownload in de makefile (latest weliswaar maar daar heb ik al overgeklaagd)

@mdemare mdemare force-pushed the opentelemetry branch 3 times, most recently from 910d9fc to 8dae8d9 Compare July 11, 2024 12:43
mdemare and others added 5 commits August 2, 2024 15:43
Use distroless/java as the docker base image again

Also: build local docker image in compose, fix some settings

Ensure host truststore, keystore and clients config are used when
running system in docker.
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