Repository navigation
Conversation
Provide known operation and origin attributes when streaming spans are created so sampling and span-start callbacks can inspect them. Co-Authored-By: OpenAI Codex <noreply@openai.com>
buenaflor
left a comment
There was a problem hiding this comment.
Thanks for the contribution
This fixes the reported call sites, but known attributes are still set after creation in:
- Core HTTP client: method and sanitized URL.
- Dio adapter/transformer: origin and method; adapter URL.
- gRPC: origin, RPC system/service/method, request metadata.
- Drift, Hive, Isar: origin and database metadata.
- Sqflite executor/database/batch/open/factory paths: origin and applicable database metadata.
- Supabase: origin and database/request metadata.
- File sync/async wrappers: origin, async flag, and file path.
Could we migrate these too - and double check that we didnt miss any other spots?
Pass origin and known integration data through the instrumentation span factory so streaming lifecycle callbacks observe them at creation. Co-Authored-By: OpenAI Codex <noreply@openai.com>
|
Addressed in I migrated the core HTTP client, Dio adapter/transformer, gRPC, Drift, Hive, Isar, Sqflite executor/database/batch/open/factory paths, Supabase, and file sync/async wrappers. I also scanned every I added a factory regression that verifies operation, origin, arbitrary data, and the sync marker are visible in |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4044 +/- ##
==========================================
+ Coverage 88.17% 88.30% +0.13%
==========================================
Files 347 348 +1
Lines 12951 12950 -1
==========================================
+ Hits 11420 11436 +16
+ Misses 1531 1514 -17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Exercise the legacy synchronous marker, double attribute conversion, and the static GraphQL root origin. Restore the private synchronous marker constant so existing marker behavior is not counted as newly changed code.\n\nCo-Authored-By: OpenAI Codex <noreply@openai.com>
buenaflor
left a comment
There was a problem hiding this comment.
Looks good to me. Could you rebase onto main to resolve the conflicts please
📜 Description
Provide
sentry.op,sentry.origin, and integration data that is already known when streaming instrumentation spans are created. This makes the attributes available to root sampling decisions and span-start lifecycle callbacks, while preserving the existing final attributes and static tracing behavior.The internal instrumentation span factory now accepts an optional origin, data, and synchronous marker and supplies them to
startInactiveSpan. GraphQL root spans do the same directly. HTTP, Dio, gRPC, Drift, Hive, Isar, Sqflite, Supabase, and file instrumentation now pass their known attributes at creation.💡 Motivation and Context
Streaming spans previously received their operation and origin immediately after creation. As a result,
tracesSamplerandOnSpanStartV2callbacks could not inspect values that the integration already knew.Fixes #3990
💚 How did you test it?
sentry.opandsentry.origin, plus factory coverage for arbitrary known data and the synchronous marker.dart analyze --fatal-warningspassed for all ten affected packages.git diff --checkpassed.📝 Checklist
sendDefaultPiiis enabled🔮 Next steps
None.