quickwit icon indicating copy to clipboard operation
quickwit copied to clipboard

add node_id to emited spans

Open trinity-1686a opened this issue 1 month ago • 2 comments

Description

add the node_id to emitted spans, making traces easier to interpret

How was this PR tested?

spin a one node cluster, make it trace to itself, and verify the new field is shown in jaeger

trinity-1686a avatar Nov 17 '25 10:11 trinity-1686a

This is a recurring pattern and issue. We want to emit some logs / metrics / traces containing info from the node config but it is loaded after setting up, sometimes immutable (hello metrics crate), logs / metrics / traces exporters.

Can we consider:

  1. start the process
  2. init logs / metrics / traces exporters with sensible defaults
  3. load node config
  4. overwrite logs / metrics / traces exporters ?

I know it sucks to have to do this refactor when we just wanted to add a new tag but that would make the codebase healthier.

guilload avatar Nov 17 '25 14:11 guilload

We can also ensure the trace is set up with EnvResourceDetector and rely on OTEL_RESOURCE_ATTRIBUTES to achieve what we want for what we're doing at the kennel.

guilload avatar Nov 17 '25 14:11 guilload