Repository navigation
refactor: the app sends traces through the OpenTelemetry Collector - #391
Merged
Merged
Conversation
…stead of straight to Jaeger Every span now reaches the collector, which #389 needs so its connectors can turn spans into metrics before tail sampling drops most of them. Jaeger gets what the collector's existing tail sampling keeps: traces with an error, traces over 1 s and a 10 % sample, 10 to 20 s after they end. The tracing doc also no longer says FastAPI is instrumented in the lifespan, since #388 moved that into create_app.
HardMax71
enabled auto-merge (squash)
October 18, 2026 20:17
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
5 of 17 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Part of #389. Its plan turns spans into metrics with the collector's
signaltometricsconnector, so every span has to pass through the collector first. Today the SDK exports straight to Jaeger (OTLP_TRACES_ENDPOINT = "http://jaeger:4317"), a carry-over from replacing the Jaeger agent settings in #175.Changes
config.toml points
OTLP_TRACES_ENDPOINTathttp://otel-collector:4317. The collector's traces pipeline already rantail_samplinginto Jaeger, but nothing used it, so Jaeger now keeps traces with an error, traces over 1 s and a 10 % sample of the rest, 10 to 20 s after they end. The connector itself comes with the first area PR, since the collector refuses asignaltometricsblock with no metric defined. The tracing doc also stops saying FastAPI is instrumented in the lifespan, which #388 changed.Type of Change
Test Plan
cd backend && uv run pytest tests/unit)cd frontend && npm run test)docker compose exec -T backend sh -c 'uv sync --group test --no-dev --frozen --no-install-project --no-build && pytest tests/e2e')cd frontend && npm run test:e2e)./deploy.sh openapi, then./deploy.sh types), never edited by handValidation: the repo's collector config and Jaeger 2.20.0 ran locally, and the OpenTelemetry SDK sent 20 plain spans and 1 error span to the collector. About 26 s later Jaeger had the error trace and 2 of the 20 plain ones. Tests export no traces (config.test.toml leaves the endpoint empty), so CI doesn't cover this path.
Checklist
pre-commit run --all-filesand all checks passSummary by cubic
Sends traces through the OpenTelemetry Collector instead of exporting them straight to Jaeger, so the collector's
signaltometricsconnector can turn spans into metrics as planned in #389.Jaeger now only receives what the collector's existing tail sampling keeps: traces with errors, traces over 1 second, and a 10% random sample, arriving 10 to 20 seconds after they end. The tracing docs also drop the outdated note that FastAPI is instrumented in the lifespan, which #388 already moved into
create_app.Written for commit acdcf96. Summary will update on new commits.