in_opentelemetry: add tag_from_uri support to http2 codepath #8963
+24
−3
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.
For some reason the new HTTP/2 server codepaths in the OpenTelemetry input plugin don't have any support for the
tag_from_uri
plugin option.This PR adds the same
v1_metrics
/v1_logs
/v1_traces
tags that thetag_from_uri
behaviour in the previousflb_downstream
-based non-HTTP/2 codepath.Strictly speaking, this is arguably not fully correct, as the "URI"s in the gRPC cases are more complex:
opentelemetry.proto.collector.metrics.v1.MetricsService/Export
opentelemetry.proto.collector.traces.v1.TracesService/Export
opentelemetry.proto.collector.logs.v1.LogsService/Export
However it's probably a good enough first step given that anyone trying to filter by telemetry signal type would already be using these
v1_metrics
/v1_logs
/v1_traces
tags, and it seems overly complex to have totally different longer tags just for gRPC input.As I said in an earlier comment on #8734, the "proper" fix for this IMO is to switch to a
tag_from_signaltype
option or something like that. But this is more work and might count as a breaking config change. This PR at least brings the same behaviour as the non-HTTP/2 config case to the HTTP/2 config case."Next-step" fix for #8734 (previous PR #8881 only addressed cases where http2 plugin option was set to false).
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
cURL command for testing:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.