elastic / apm-agent-nodejs

https://www.elastic.co/guide/en/apm/agent/nodejs/current/index.html
BSD 2-Clause "Simplified" License
584 stars 225 forks source link

add W3C baggage support #2102

Open trentm opened 3 years ago

trentm commented 3 years ago

https://w3c.github.io/baggage/

Along with 'traceparent' and 'tracestate', we could have the Node.js APM agent (and, of course, the other agents):

  1. propagate the baggage header; and
  2. provide APIs to add/get/remote baggage

At time of writing, the baggage spec is still a "First Public Working Draft (FPWD)" so priority is probably lower. One concrete possible use case (not definitive yet) is this Kibana issue -- https://github.com/elastic/kibana/issues/97934 -- to attempt to propagate info on a Kibana action (front end or back end) all the way through to an Elasticsearch slowlogs entry. https://github.com/elastic/kibana/issues/97934#issuecomment-854257718 is a description of the idea.

pgayvallet commented 4 months ago

Will this realistically be prioritized at any point? this is still a requierement for https://github.com/elastic/kibana/issues/101708.

trentm commented 4 months ago

@pgayvallet It is unlikely that this will be prioritized. The focus is currently on OpenTelemetry: both the upstream github.com/open-telemetry repos and our distribution at https://github.com/elastic/elastic-otel-node/tree/main/packages/opentelemetry-node#readme, and both of which support baggage.

I think a better longer-term bet would be to consider moving Kibana's self-instrumentation to using OTel. However, granted that would be some effort.

pgayvallet commented 4 months ago

Yeah I agree it would make sense.

cc @lukeelmers: would it be worth opening an issue in the Kibana repo to discuss about OTel instrumentation for Kibana?