misc: Improve generated traces from common/trace.c #6912
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The integration with opentelemetry was sub-optimal: it was generating jaeger-style traces, with short traceIds and we were considering the entire lifetime as a single trace. This PR changes that to a trace for startup and then a trace for any event that doesn't already have a parent.
We also allow using the
CLN_TRACEPARENT
envvar to attach the startup to a remote / external trace, potentially by whatever started the main process. This is useful to see the startup trace in the wider context of whatever tooling is built around it.Changelog-Added: tracing: It is now possible to inject a parent for the startup trace by setting the
CLN_TRACEPARENT
envvar