Allow customization of parent-override behaviour for inferred-spans #1533
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.
Description:
The inferred spans extension sometimes has to insert inferredspans inbetween the parent-child relationship of normal spans for correctness.
This is however not directly possible, that is why we represent this as a span-link on the inferred spans. This PR adds a configuration hook to fully customize this behaviour with a custom handler.
The main reason for adding this is because in our elastic vendor distro of the opentelemetry agent we are still shipping the pre-contribution version of inferred spans. We currently still have to do this, because there these special span links are marked with an
elastic.is_child
instead of justis_child
attribute and older versions of our backend rely on this elastic-specific attribute.With this change we can switch to this contributed version of inferred spans and add the
elastic.is_child
attribute on the span link via the customization hook.