-
Notifications
You must be signed in to change notification settings - Fork 771
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
Make SpanData tiny again #465
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - one query regarding TracerConfiguration.
resource, | ||
status, | ||
endTimestamp, | ||
DefaultConfiguration); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be carful about using a default here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, good point. I was weighting different options.
For any legit use of OTel, default configuration should be reasonable and should not be an issue (it just limits number of attributes to 32, events to 128, links to 32).
Configuration provides safe limits on the links/attributes/events count and the requirement to have them is to prevent unlimited consumption of memory by OTel. Spec does not yet provide expected behavior regarding these limits. Current implementation is inherited from OpenCensus/OTel Java.
One concern I had is that if someone called SpanData with enormous list of events or attributes, OTel limitations would not really help the app, but at least OTel would not be the one responsible for the memory consumption :)
I guess what we can do is expose static TracerConfiguration propoerty with public setter on SpanData with default value.
Alternative is to wait for the spec to formalize requirements what behavior is expected and which limits should be used and whether they have to be configurable at all.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can leave it as is with the DefaultConfiguration
and wait for spec to finalise. We can always go back to add static setter if it becomes an issue.
This reverts commit aec4d53.
Fix #456