[tracing] Add span event APIs and wrapper#8470
Merged
Merged
Conversation
shs96c
requested changes
Jun 30, 2020
shs96c
left a comment
Member
There was a problem hiding this comment.
This looks great. Thank you. I don't think we need the variant with the timestamp since we never need to futz with that in our own code, so I'd suggest removing it, but this looks good.
99665e3 to
0db9d7f
Compare
diemol
requested changes
Jul 9, 2020
…have 4 type cases. We can iterate on it. [skip ci]
diemol
approved these changes
Jul 10, 2020
titusfortner
pushed a commit
to titusfortner/selenium
that referenced
this pull request
Aug 13, 2020
* [tracing] Add span event APIs and wrapper * [tracing] Add span event APIs with attributes * [tracing] Add EventAttribute Creator and EventAttributeValue class. * [Grid] Removing unneeded dependency [skip ci] * [Grid] Moving type enum because it only applies to EventAttributeValue [skip ci] * [Grid] Simplifying class and method names (the parameter says the type) [skip ci] * [Grid] An attempt to use strong typing, avoid casting, since we only have 4 type cases. We can iterate on it. [skip ci] Co-authored-by: David Burns <david.burns@theautomatedtester.co.uk> Co-authored-by: Diego Molina <diemol@gmail.com> Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updated existing Span interface and OpenTelemetrySpan to add APIs for creating events in the span.
The APIs allow to add attributes to the event in the span. The attributes are stored using a Map. To enable use of single Map while creating event attributes for different data types of attributes (String , long, double, boolean), EventAttribute interface and data types specific implementations are added.
Motivation and Context
The current tracing wrapper around OpenTelemetry does not provide APIs to add events to the spans. This PR provides the APIs to instrument events in the spans with and without attributes. Events are crucial to drill down and triage an issue. Events help in documenting a moment at that timestamp within a span.
Types of changes
Checklist