sentry-dotnet
sentry-dotnet copied to clipboard
Rename Span.extras to Span.data
Context: https://github.com/getsentry/sentry-cocoa/pull/932#discussion_r570807351
https://develop.sentry.dev/sdk/event-payloads/span/
if it's a breaking change, fine to do in the next major bump.
We could add data
and set [Obsolete]
on extra
and remove it on the next major.
Currently extras
are also copied from current scope. Should something like this happen to data
? We don't have data
on scope.
@bruno-garcia @marandaneto
looks like data
is missing on Java, not sure if it's been removed or not, see https://github.com/getsentry/sentry-java/blob/bc10b2b70d328241b7c4a5dba32d97ad42d7687c/sentry/src/main/java/io/sentry/SpanContext.java
@maciejwalkowiak knows maybe?
iirc it's not been added because it'd be exposed to the transaction interface which does not have a data
field.
@Tyrrrz Span.data
!= Scope.extras
afaik, if they are being copied over, It's a bug probably, not sure.
the way how I see it is either we copy extras from Scope to the data field or we'd need to expose a span.setData(x, y)
extra
is part of the Event payload https://develop.sentry.dev/sdk/event-payloads/
@marandaneto ah, it was a brainfart on my part, the extras
are only copied from scope on transactions, not spans. Scratch my question.
no worries, the Java issue is https://github.com/getsentry/sentry-java/issues/1233
Another question:
Since we currently have ITransaction
and since ITransaction
extends ISpan
, what should we do? Adding data
to ISpan
will make it also appear on ITransaction
. Considering we're trying to make this non-breaking by also not removing extra
on ISpan
, this will result in both extra
and data
appearing on both ITransaction
and ISpan
.
I think we should wait with this change for when we drop ITransaction
entirely (v4.0?). Otherwise, it will be very confusing in my opinion.
@Tyrrrz that's exactly the reason why we've not added to Java, if its the case on .NET too, we can do it once we get rid of ITransaction
Yep, I think we should wait.
We're not going to do this.