fix(telemetry): use supported OpenTelemetry logging handler - #973
fix(telemetry): use supported OpenTelemetry logging handler#973seonghobae wants to merge 5 commits into
Conversation
|
Warning Review limit reachedNext included review available in 30 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
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 |
|
Review finding — the handler migration itself is directionally correct, but this PR was Ready while its owned production module coverage is explicitly 95%. The LineageWeave maintainer contract requires owned production Test/Edge Case Coverage 100%; a documented 95% gap is therefore a repair finding, not merge-ready evidence. I returned the PR to Draft. Keep the supported |
seonghobae
left a comment
There was a problem hiding this comment.
Exact-head review: the handler migration and the newly added _failure_counter() failure boundary are causal and keep telemetry fail-open. The provider is retained early enough for shutdown ownership if handler setup fails, and the application failure classification is no longer replaceable by a metrics-provider exception. I found no new source-semantics defect in this six-file delta. However, the PR's own current evidence still reports lineageweave/observability.py at 96% statement/branch coverage. Under this repository's owned-production 100% Test/Edge Coverage contract, that is a real verification gap, so keeping this head Draft is correct. Do not convert the focused 32-test GREEN or this COMMENT into merge-ready evidence; close the remaining executable branches with realistic tests, then require fresh exact-head full-suite/security/CodeQL and qualifying independent approval.
The hosted backend suite emitted the deprecated OpenTelemetry SDK
LoggingHandlerwarning. Telemetry setup could also orphan a log provider after handler construction failed, and metric initialization could replace the application's original error.Use the supported logging-instrumentation handler with the existing explicit provider, WARNING threshold, and dedicated bounded logger. Register provider ownership immediately after allocation for normal shutdown cleanup. Include counter acquisition in the existing fail-open metric boundary. Do not introduce global instrumentation, root-handler mutation, or a LogRecord-factory replacement. ADR 0122 remains the governing boundary.
RED → causal repair → exact coverage GREEN
Causal RED assertions reproduced the deprecated handler warning, orphaned provider shutdown, counter-initialization error escape, missing span/propagator branches, unsupported outcome rejection, and partial SDK status support. Historical hosted run
34087122183measured only 96% after 32 tests; an exact-current RED lane34088114733then ran all owned observability test modules and failed--fail-under=100at 97%, identifying the remaining executable branches. Earlier measurement harness failures ran no valid coverage measurement and are not product evidence.Current product head
182d3c9d4c5f2a8ab2d63e77b8a9ced663a183f6adds only causal degraded-SDK/privacy regressions for those branches. Exact-head verification run34088301425, job101636507846, is terminal GREEN: 44 tests passed,lineageweave/observability.pyreports 197 statements / 0 missed and 68 branches / 0 partial at 100%,coverage report --fail-under=100passed without exclusions or denominator reduction, and compileall passed.The two
github-code-qualityinline findings on the newpytest.raisesregression were verified as false positives: the explicit exception is caught by the context manager, execution continues to the span assertions, and theexportervariable is consumed there. The exact 44-test run executes those statements and branch coverage is 100%. Both threads were answered with that evidence and resolved without rewriting working tests merely for the analyzer.Current hosted boundary
Exact-head standard Tests
34088155091are terminal GREEN on182d3c9d4c5f2a8ab2d63e77b8a9ced663a183f6: the PostgreSQL-backed full test suite passed, and frontend lint/test/production build/Storybook passed. Exact-head PROV-O and Ontology Pages are also GREEN.SAST
34088128228, Security34088128243, and CodeQL34088128190are still waiting for runner admission/terminal evidence, and no qualifying independent current-head APPROVE exists.Therefore this is Ready for Review but not merge-ready. Authenticated central security/CodeQL verdicts, independent approval, collector/runtime acceptance, protected merge, deployment, and release remain unproven. Do not substitute the 100% owned-module proof, full repository Tests GREEN, resolved COMMENT threads, predecessor evidence, synthetic status, or no-op head churn for those gates.
Official guidance: https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/logging/logging.html