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 11 commits into
base: main
Choose a base branch
from
Open

Open Telemetry and Docker #315

wants to merge 11 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/

See docker-compose.yml for the required env vars to setup the open telemetry agent. OTEL_EXPORTER_PROMETHEUS_ENDPOINT is used to set the host and port of the metrics endpoint.

The existing metrics have been migrated to the worker metrics. They look like this:

# TYPE rio_mapper_active_and_queued_job_count gauge
rio_mapper_active_and_queued_job_count{otel_scope_name="steffan-westcott.clj-otel",otel_scope_version="0.2.7",queue_name="demo04.test.surfeduhub.nl"} 0.0
rio_mapper_active_and_queued_job_count{otel_scope_name="steffan-westcott.clj-otel",otel_scope_version="0.2.7",queue_name="demo06.test.surfeduhub.nl"} 0.0
rio_mapper_active_and_queued_job_count{otel_scope_name="steffan-westcott.clj-otel",otel_scope_version="0.2.7",queue_name="endpoint01.sandbox.jomco.nl"} 1.0
# TYPE rio_mapper_http_requests_total counter
rio_mapper_http_requests_total{institution_name="'t Univeersiteitje",otel_scope_name="steffan-westcott.clj-otel",otel_scope_version="0.2.7",schac_home="endpoint01.sandbox.jomco.nl",status="started"} 1.0

@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 Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
dev-infra/prometheus.yml Outdated Show resolved Hide resolved
dev-infra/prometheus.yml Outdated Show resolved Hide resolved
dev-infra/prometheus.yml Outdated Show resolved Hide resolved
@mdemare mdemare requested a review from remvee July 8, 2024 13:11
Dockerfile Outdated Show resolved Hide resolved
@mdemare mdemare force-pushed the opentelemetry branch 3 times, most recently from 910d9fc to 8dae8d9 Compare July 11, 2024 12:43
Dockerfile Outdated Show resolved Hide resolved
project.clj Show resolved Hide resolved
src/nl/surf/eduhub_rio_mapper/config.clj Outdated Show resolved Hide resolved
src/nl/surf/eduhub_rio_mapper/config.clj Show resolved Hide resolved
src/nl/surf/eduhub_rio_mapper/worker.clj Outdated Show resolved Hide resolved
Copy link
Contributor

@joodie joodie left a comment

Choose a reason for hiding this comment

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

een klein puntje nog

src/nl/surf/eduhub_rio_mapper/endpoints/metrics.clj Outdated Show resolved Hide resolved
@mdemare mdemare force-pushed the opentelemetry branch 2 times, most recently from 3ed5412 to 5ad4123 Compare December 18, 2024 12:34
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