-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If SpanData is immutable, setting Tracer's Resource on it before exporting will require an allocation #68
Comments
I read through the comments in issue PR69 and couldn't exactly see what the recommended action is here. Why should SpanData be considered immutable before passing it to an exporter? I've read through the Java repository and couldn't find an implementation of |
@bogdandrutu pointed that in OpenTelemetry now there is one more abstraction - This changes things comparing to the OpenCensus. And at this point I'm not even sure why we need getters on I will keep an issue open with this caveat. If SpanData is not used by exporters - it probably should not have any getters. |
What if the exporter doesn't use Protobuf? And why even have |
In JavaScript it's not even really possible to make something completely immutable, and to make it somewhat immutable is really heavyweight. Same for going from/to Protobuf. |
There are a few design principles we were following:
So |
Where does this requirement ("Span life cycle must allow to create traces (and default SDK) where in-process timestamps of Spans are guaranteed to be consistent. ") come from? It's incompatible with OpenTracing, to begin with. It assumes that every exporter wants this SpanData format, which I view as a good default but will not address every need we have. I would suggest that if you want guaranteed consistent timestamps (and let's be honest, there's no such thing in the real world), then you should allow the user to supply their timestamp and the system to provide one as well. |
In some cases you want to rebuild an entire trace from metadata generated from a different process. For example this is how apollo-tracing works. In this case you need to be able to control everything, including timing.
Makes sense, but I'm still not sure I understand what is the role of
I agree with this. In my opinion, every package should have a replaceable input/internal/output. While this is difficult to achieve, it will ensure it's possible to mix and match OTel packages with vendor-specific packages when needed. |
To agree with @rochdev, the caller should be able to override all |
|
Update versioning information
if SpanData is immutable, Tracer will need to create a new
SpanData
with theTracer
'sResource
set before passing it to the exporter. Which requires a new allocation. Creating issue:The text was updated successfully, but these errors were encountered: