Skip to content

feat: Add OpenTelemetry integration for API service #2251

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

Merged
merged 1 commit into from
Aug 12, 2025

Conversation

adamantike
Copy link
Contributor

Description
This change introduces OpenTelemetry dependencies, and uses opentelemetry-instrument auto-instrumentation to allow users to configure OpenTelemetry settings via environment variables [1].

The only custom environment variable added is
OTEL_SERVICE_NAME_PREFIX, which allows users to set a prefix different than romm (default) for the generated service names. We need to use different services names for api, worker, and watcher.

The instrumentation of RQ workers and file watcher will be added in subsequent pull requests.

[1] https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/

Checklist

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

@adamantike adamantike requested review from gantoine and zurdi15 August 12, 2025 03:02
Copy link

trunk-io bot commented Aug 12, 2025

Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information.

This change introduces OpenTelemetry dependencies, and uses
`opentelemetry-instrument` auto-instrumentation to allow users to
configure OpenTelemetry settings via environment variables [1].

The only custom environment variable added is
`OTEL_SERVICE_NAME_PREFIX`, which allows users to set a prefix to the
service names included by RomM to differentiate between `api`, `worker`,
and `watcher` services.

The instrumentation of RQ workers and file watcher will be added in
subsequent pull requests.

[1] https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
@adamantike adamantike force-pushed the feat/opentelemetry-integration branch from 2ca63b9 to 652df5d Compare August 12, 2025 12:24
Copy link
Member

@gantoine gantoine left a comment

Choose a reason for hiding this comment

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

🔥

@adamantike adamantike merged commit 92e11be into master Aug 12, 2025
7 checks passed
@adamantike adamantike deleted the feat/opentelemetry-integration branch August 12, 2025 12:56
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.

2 participants