-
Notifications
You must be signed in to change notification settings - Fork 888
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
Consider renaming "EventFormatter" #533
Comments
I wonder if we should just remove lazy Events from the spec. Since the SDK only supports head-based sampling anyway, a check of the |
I think the use cases for such a class are fairly limited, and I have a feeling formatting will not be the reason why you want deferred attributes. But on the other hand, if it is a common enough need, we should have it specified somewhere. As a slightly more complex alternative, one could create a lazy API, and use that for the non-lazy case as well, since that would just be returning back an already-constructed object. |
@Oberon00 lazy Events can be used even with head-based sampling. You can postpone the formatting until the exporter phase. |
This only makes a difference vs checking IsRecording in edge cases tough, like if the BatchSpanProcessor queue is full (and even then only if the implementation does not call toSpanData or equivalent right at the Span.end call). |
@Oberon00 I think |
@bogdandrutu Do you know if any of the language implementation actually implement lazy event creation/EventFormatter? Java, for example, does not and thus actually breaches this MUST requirement. I'd be in favor of removing the lazy event API entirely as well as the lazy link API. I'm not aware of any reason for the inconsistency between links/events attributes and span attributes as there's no lazy |
For lazy events, the current API requires the attribute creation function to be called "EventFormatter":
I feel that the name is a little bit of a misnomer, as there are multiple reasons why event attribute population would be better of lazy (e.g. having to perform some synchronous request to retrieve said values), and formatting may just be one.
As an alternative, I might call it "EventRetriever".
The text was updated successfully, but these errors were encountered: