You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not something I'm super sold into but given that we will have to introduce breaking changes in 3.x for OpenTelemetry support, why not break a bit more? 😄
There is a lot of overlap in the API and state kept inside a SpanBuilder and a Span so, why should we even have them? SpanBuilder instances cannot be reused and are not thread safe, so we only create SpanBuilder instances for them to be immediately turned into a Span and get thrown away. I believe we could skip SpanBuilder instances altogether and go straight for Span and save on the extra allocations.
This of course needs some deeper impact analysis, but the idea has been in my head for long and wanted to share it and gather opinions.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is not something I'm super sold into but given that we will have to introduce breaking changes in 3.x for OpenTelemetry support, why not break a bit more? 😄
There is a lot of overlap in the API and state kept inside a
SpanBuilder
and aSpan
so, why should we even have them?SpanBuilder
instances cannot be reused and are not thread safe, so we only createSpanBuilder
instances for them to be immediately turned into aSpan
and get thrown away. I believe we could skipSpanBuilder
instances altogether and go straight forSpan
and save on the extra allocations.This of course needs some deeper impact analysis, but the idea has been in my head for long and wanted to share it and gather opinions.
Beta Was this translation helpful? Give feedback.
All reactions