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

feat: [WIP] Support OpenTelemetry #10710

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft

feat: [WIP] Support OpenTelemetry #10710

wants to merge 30 commits into from

Conversation

hangy
Copy link
Member

@hangy hangy commented Aug 17, 2024

What

Add OpenTelemetry::SDK and some automatic instrumentation to the Perl code to forward traces to a configure otel collector. Also uses the nginx container with otel support to include it in the whole trace. Additionally we use the LWP::UserAgent integration to trace HTTP calls, which might turn out helpful with off-query, and with Keycloak. MongoDB is traced using the monitoring_callback.

Related issue(s) and discussion

hangy added 14 commits July 14, 2024 11:13
This commit updates the Dockerfile.frontend to use the nginx:stable-otel image instead of the nginx:stable image. This change is made to integrate OpenTelemetry into the frontend container.
This commit modifies the Apache2 configuration file to include the necessary PerlPostReadRequestHandler and PerlCleanupHandler directives for integrating OpenTelemetry into the request handling process. Additionally, a new Perl module, ProductOpener::Apache2PostRequestHandler, is added to handle the response and end the current span. This change improves tracing and monitoring capabilities in the application.
This commit updates the OpenTelemetry dependencies in the `cpanfile` to use the latest versions. Specifically, it updates `OpenTelemetry::SDK` to version 0.024 and `OpenTelemetry::Exporter::OTLP` to version 0.017. This update ensures that the application is using the most recent features and improvements provided by OpenTelemetry.

jjatria/perl-opentelemetry-sdk#16
This commit updates the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable in the `.env` file and `modperl.conf` to use the new endpoint `http://otel-collector:4318`. This change ensures that the application is sending telemetry data to the correct endpoint for OpenTelemetry export with HTTP instead of GRPC, as the Perl module doesn't understand GRPC, yet.
This commit updates the `OTEL_SERVICE_NAME` and `OTEL_RESOURCE_ATTRIBUTES` environment variables in the `.env` file, `modperl.conf`, and `default.conf.template` to reflect the changes made for OpenTelemetry integration. These updates ensure that the application is correctly configured to send telemetry data to the designated service and with the appropriate resource attributes.
@github-actions github-actions bot added Data import 🖼️ Images 🪶 Apache We use Apache as a server to run Open Food Facts NGINX 🐋 Docker https://docker-curriculum.com/ dependencies Pull requests that update a dependency file 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis Display Products Tags 📨 Mail 📨 Emails - Brevo 🥗 Ingredients labels Aug 17, 2024
@github-actions github-actions bot added the 💥 Merge Conflicts 💥 Merge Conflicts label Nov 18, 2024
@github-actions github-actions bot removed the 💥 Merge Conflicts 💥 Merge Conflicts label Nov 25, 2024
@github-actions github-actions bot added the 💥 Merge Conflicts 💥 Merge Conflicts label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪶 Apache We use Apache as a server to run Open Food Facts Data import dependencies Pull requests that update a dependency file Display 🐋 Docker https://docker-curriculum.com/ 📨 Emails - Brevo 🖼️ Images 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis 🥗 Ingredients 📨 Mail 💥 Merge Conflicts 💥 Merge Conflicts NGINX 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers Products Tags
Projects
Status: In progress
Status: In progress
Development

Successfully merging this pull request may close these issues.

1 participant