-
Notifications
You must be signed in to change notification settings - Fork 115
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
Add spec for 'span.sync' field #802
Conversation
Span execution within a transaction or span can be synchronous (the caller waits for completion), or asynchronous (the caller does not wait | ||
for completion). |
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.
Maybe here we should clarify that the agents should only be able to capture the (a)synchronous "nature" of a specific span, for example when a synchronous or asynchronous API is used.
It might sound obvious, but if an asynchronous span is (mis)used in a synchronous way this can't easily be detected by agents at runtime, so from the user perspective it's only in the "shape" of the trace and the relative position of the blocking or async spans that we can infer if that's an issue or not.
Few examples:
- an asynchronous API is used in a blocking way: having the
async
span making the parent span/transaction longer indicates that refactoring code could help. - starting multiple async tasks from a single span/transaction and then awaiting their completion in a blocking way would not be considered a problem because the async tasks are started in parallel. However, doing the same with a single span would make it fall in the "async API used in a blocking way" described above.
This was discussed a while back for the Node.js APM agent in elastic/apm-agent-nodejs#1881 A result of that discussion was elastic/kibana#109661 (implemented in elastic/kibana#123038) where the APM UI was changed to only show a badge for the "non-typical" case for a given language. This shipped in 8.1. So, I think the current "In UI" block is incorrect. |
yes, you are correct, I've updated the UI part in c08703d to add platform-specific behavior. |
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.
LGTM
We don't currently have any implementation for this field in the .NET agent today. We'd need to research how practical it would be to determine this in our instrumentation, especially outside our profiler-based collections. I'll open an issue for us to track researching this further for the .NET client. |
Adds a small spec for
span.sync
field.This is more a "specification of how it works currently" rather than "specification of how it should work", so feel free to provide input if any agent implementation does not fit what is described here.
CODEOWNERS
)To auto-merge the PR, add
/
schedule YYYY-MM-DD
to the PR description.