-
-
Notifications
You must be signed in to change notification settings - Fork 226
Closed
Labels
FeatureNew feature or requestNew feature or requestGood First IssueGood for newcomersGood for newcomersProduct: Tracing
Description
Relates to getsentry/team-sdks#95
See getsentry/team-sdks#95 (comment) for more details.
Current Behavior
- We currently map
extratodatain our SDK - When serializing
SentryTransaction, the extra data gets written toextra. TheITransactionTracerinherits fromIHasExtraso this makes sense.
sentry-dotnet/src/Sentry/SentryTransaction.cs
Line 404 in 7024f37
writer.WriteDictionaryIfNotEmpty("extra", _extra, logger);
Problem
The current inheritance structure prevents us from correctly mapping:
- Transaction data to
contexts.trace.data - Span data to
span.data
Proposed Solution
Instead of modifying the inheritance structure for transactions and spans (which would be hacky), we should:
- Add
SetDatamethods to bothTransactionTracerandSpanTracer - Keep existing
SetExtrafunctionality- This allows users to quickly add contexts without creating a full context
- Note: We do not support arbitrary key-value pairs on the context
Technical Details
- Transaction data should map to:
contexts.trace.data- Implementation via ITraceContext so this gets written in the correct place automatically with
sentry-dotnet/src/Sentry/SentryTransaction.cs
Line 398 in 7024f37
writer.WriteSerializableIfNotNull("contexts", _contexts.NullIfEmpty(), logger);
- Implementation via ITraceContext so this gets written in the correct place automatically with
- Span data should map to:
span.data
bruno-garcia
Metadata
Metadata
Assignees
Labels
FeatureNew feature or requestNew feature or requestGood First IssueGood for newcomersGood for newcomersProduct: Tracing
Projects
Status
Done