feat(Otel): Add first structlog events for OTel event pipeline#7237
feat(Otel): Add first structlog events for OTel event pipeline#7237
Conversation
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Docker builds report
|
Add product-meaningful structured log events to support the OTel event pipeline (RFC #6918). These events flow through the StructlogOTelProcessor in flagsmith-common and reach the OTel Collector when OTEL_EXPORTER_OTLP_ENDPOINT is configured. Events added: - code_references.scan.created — adoption signal for CI scanning - code_references.cleanup_issues.created — retention signal for stale flag action - workflows.change_request.committed — governance/workflow adoption signal Also adds OTEL_EXPORTER_OTLP_ENDPOINT to staging task definitions. beep boop
06a1b71 to
cd8209e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7237 +/- ##
=======================================
Coverage 98.29% 98.29%
=======================================
Files 1351 1351
Lines 50747 50767 +20
=======================================
+ Hits 49880 49900 +20
Misses 867 867 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
|
Visual Regression16 screenshots compared. See report for details. |
docs/if required so people know about the feature.Changes
Contributes to #7012
Adds the first product-meaningful structured log events for the OTel event pipeline (RFC). These events flow through
StructlogOTelProcessorin flagsmith-common 3.7.0 and reach the OTel Collector whenOTEL_EXPORTER_OTLP_ENDPOINTis set.Events added:
code_references.scan.createdorganisation.id,code_references.count,feature.countcode_references.cleanup_issues.createdorganisation.id,issues_created.countworkflows.change_request.committedorganisation.id,environment.id,feature_states.countCode references events are backend-only (CI pushes scans, GitHub issues created server-side). Change request committed is a multi-actor flow (requester ≠ approver) that the frontend Amplitude SDK can't reliably attribute.
Adding an event is a one-liner:
The
StructlogOTelProcessornormalises this to an OTel LogRecord withEventName=code_references.scan.createdand dotted attributes (organisation.id,code_references.count).Infra changes (collector config, SG rules, service discovery, env vars) tracked in Flagsmith/pulumi#170.
How did you test this code?
Unit tests using
pytest-structloglogfixture assert the exact event shape for all 3 events.make lintandmake typecheckclean.