elastic / elastic/ecs-logging-nodejs
stop setting `span.id`, set `transaction.id` for log correlation
Open
agent-nodejs
- Dominant language
- JavaScript
- Stars
- 69
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
I noticed in https://github.com/elastic/apm-agent-nodejs/pull/3399 discussion that, while the ecs-logging-nodejs libs are currently setting `span.id` or `transaction.id` for log-correlation, the ecs-logging spec (https://github.com/elastic/ecs-logging/blob/main/spec/spec.json) only mentions setting `transaction.id`. So it appears these libs have this wrong.
TODO:
- [ ] Confirm whether log-correlation works for log records that set `trace.id` and `span.id`. I.e. are these libs breaking log correlation for some log records?
- [ ] Change to conform to the spec (and what the Java APM agent is doing).
Contributor guide
Assessment
This issue has not been assessed yet.