Skip to content

consider eliding span.sync=false because it is the typical case #1881

@trentm

Description

@trentm

tl;dr: Setting span.sync to true or false on every APM span results in unhelpful UI noise in Kibana. Let's only set it when it is "interesting". For Node.js the typical case is that spans are async (most traced work span event loop async operations). That leaves "span.sync==true" as the "interesting" case.

The span.sync field can be true, false, null or not set per the api-server spec.

Here is the Kibana code that adds a SyncBadge to spans in the Waterfall view and the code for the SyncBadge element. I.e. sync: true will showing "blocking" in the ui, sync: false will show "async", sync: null (or not specified) will show nothing. E.g.:

Screen Shot 2020-11-17 at 2 28 08 PM

From chat discussion (this came up when discussing #1878):

"Felix
I remember that we’ve talked about the usefulness of having all spans marked as sync=false in Node.js. Setting sync=false makes the UI add a async flag next to the span name. But as async is the default in Node.js, it would probably make more sense to not set the sync flag in the default async case but only set sync=true when there’s a blocking operation, which makes the UI show a blocking label. This is what the RUM agent is doing."

Metadata

Metadata

Assignees

Labels

agent-nodejsMake available for APM Agents project planning.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions