sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

Rename Span.extras to Span.data

Open marandaneto opened this issue 4 years ago • 8 comments

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.

marandaneto avatar Feb 07 '21 14:02 marandaneto

We could add data and set [Obsolete] on extra and remove it on the next major.

bruno-garcia avatar Mar 31 '21 17:03 bruno-garcia

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

Tyrrrz avatar Apr 07 '21 15:04 Tyrrrz

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 avatar Apr 07 '21 16:04 marandaneto

@marandaneto ah, it was a brainfart on my part, the extras are only copied from scope on transactions, not spans. Scratch my question.

Tyrrrz avatar Apr 07 '21 17:04 Tyrrrz

no worries, the Java issue is https://github.com/getsentry/sentry-java/issues/1233

marandaneto avatar Apr 08 '21 07:04 marandaneto

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 avatar Apr 09 '21 12:04 Tyrrrz

@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

marandaneto avatar Apr 09 '21 13:04 marandaneto

Yep, I think we should wait.

Tyrrrz avatar Apr 09 '21 13:04 Tyrrrz

We're not going to do this.

jamescrosswell avatar Aug 22 '24 07:08 jamescrosswell