consider eliding span.sync=false because it is the typical case
See original GitHub issuetl;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.:
From chat discussion (this came up when discussing elastic/apm-agent-nodejs#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.”
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (11 by maintainers)
Top GitHub Comments
[Alan]
Alan, would you object to language that a “typical” Node.js traced span is async? I.e. we get away from using the term “default”.
tl;dr: My votes are to (a) close this issue (i.e. have the Node.js APM agent report what it knows and not attempt to only report what it thinks is “interesting”) and (b) continue with https://github.com/elastic/kibana/issues/109661 (though I would say “when interesting”, rather than “when relevant”).
span.sync
. I don’t think we need to get into it now, however. (FWIW, my naive read of the Python APM agent code is thatspan.sync
is setFalse
whenasyncio
is used, and otherwise is almost always left blank, i.e. almost never setTrue
.)Closing. Alan had no objections.