-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Traces Documentation] Clarification on events vs span attributes #4184
Comments
Using your example, I'll say that:
And yeah, attributes can absolutely contain data you don't know during span creation. The downside to that is you can't use those attribute vales when making SDK sampling decisions but that's pretty much it. |
Okay, I created #4185 |
@cartermp Awesome, thanks so much for the help!! Super appreciated. That all makes sense to me. And for what it's worth, the pull request looks good to me (but I assume I can't approve :P). (Though, do let me know if there's something I can do to help get the pull request approved). Thanks again! |
Great, glad to hear it! |
I'll start with the motivating example. Consider a span that is responsible for publishing a bunch of messages. Should the number of failed publishes and successful publishes be attributes on the span, or should there be an event (named something like
FinishedAllPublishAttempts
) with those attributes attached?More generally, can the documentation at https://opentelemetry.io/docs/concepts/signals/traces/#attributes clarify if it's best practice for span attributes to only include information known at the start of the span? Or is it fine if the span contains attributes with information known only after the span is almost complete?
The text was updated successfully, but these errors were encountered: