Fix: OTelLinksResponse.count over-counts and writes a removed dropped field#4346
Fix: OTelLinksResponse.count over-counts and writes a removed dropped field#4346justin212407 wants to merge 1 commit into
Conversation
… field Signed-off-by: justin212407 <charlesjustin2124@gmail.com>
|
@justin212407 is attempting to deploy a commit to the agenta projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe PR modifies the OpenTelemetry span ingestion response to report only accepted links in the response count and removes the dropped field from the response object, changing the API semantics for reporting span ingestion outcomes. ChangesSpan Ingestion Response Semantics
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Pull request overview
Fixes incorrect OTelLinksResponse.count semantics in the tracing ingest endpoint so the response count reflects only spans successfully accepted/published (i.e., the number of returned links), and removes a stale dropped=... kwarg that no longer exists on the response model.
Changes:
- Update
/tracing/spans/ingestresponsecounttolen(links)(accepted spans only), instead oflen(links) + len(dropped). - Remove the stale
dropped=...argument when constructingOTelLinksResponse.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fixes: #4318
Summary
Fix silent over-counting in tracing ingest responses where
OTelLinksResponse.countincluded dropped spans instead of only accepted spans.Changes
dropped=...kwarg (field was removed from model but was still being set)Behavior
Before
Nspans withKfailures returned:count = NN-Kentries inlinksAfter
countnow accurately reflects only accepted spansTesting
Verified locally.
Acceptance Validation
QA Follow-up
/tracing/spans/ingestwith mixed valid/invalid span batches returns correctcount/tracing/traces/ingestpath using the same patternsDemo
Files Changed
router.pyingest_spans(line ~303)Checklist
ruff format+ruff check)