-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tag_from_uri in opentelemetry input plugin has no effect #8734
Comments
Moreover, if you use a match rule like e.g. with config:
Running the same curl to default port 4318 yields this in the fluentbit logs
With a
|
I've been digging into the fluentbit C code to try work out what's going on here. It turns out there are two totally different sets of handling code for OpenTelemetry input data. You will see in
The newer The older function has code that respects the It does at least seem that if you switch to the HTTP1 handler, you can at least route logs using the tag mechanism.
...I get:
I may be able to put together a PR for some of this if I get to the end of my digging and can make some code changes that I can validate will work. |
I've got the same problem with my 3.0.3 setup. I have patched the in_opentelemetry plugin to pass the tag with length. Seems to work locally and unit tests pass. |
I was able to get the The issue with this is that... it's arguably not strictly correct, because it will set those same tags in the GRPC cases, which technically have more complex URIs like:
(The non-HTTP2 code path didn't have this issue because... it just didn't support GRPC calls.) IMO what would make more sense is a "tag from signal" option that just sets |
Signed-off-by: Stewart Webb <stewart.james.webb@gmail.com>
So, this issue is not really completed, because the fix in #8881 was only for the older non-HTTP/2 codepath (which is not taken by default anyway because the I've just submitted some PRs for all the work I was doing related to fixing this for the HTTP/2 codepath case, including some actual automated tests for the issue. Some bits still need some cleanup but wanted to at least put what I have done out there first. |
Signed-off-by: Stewart Webb <stewart.james.webb@gmail.com>
Just spotted that
Although for some reason,
|
I can see this issue is officially closed, but per the previous comment (and our experience), it still doesn't work. We need this in order to receive opentelemetry metrics and traces on a single opentelemetry input plugin, and send only the metrics to Grafana Mimir, and the traces to Grafana Tempo. Without this, both output plugins pick up data meant for the other and fail when trying to route to the coreect place. Are there any plans to address this? |
Hi everyone! I am trying to separate telemetry signals too by using the Fluent Bit version: v3.1.8 (released last week) Config:
What results is that no otel is routed anywhere, as none of the tags match. If I add an additional output to the above config as file, with a match all as below:
This outputs one file to the / dir, named "opentelemetry.0" with all of the otel traces,metrics,logs combined. The other outputs are not routed to, as theres no tag match. The documentation here https://docs.fluentbit.io/manual/pipeline/inputs/opentelemetry states:
But this seems to have no effect at all. Am I configuring something wrong? Are there any workarounds available? Unsure why this issue is marked as Closed. Any help would be greatly appreciated! Thanks! :) |
Just to be sure; this was only fixed for the HTTP 1.1 handler. If you're using HTTP2 it could be ignored. Try disable HTTP2 manually on the OTEL [INPUT] section with |
Thanks @shaohme :) I've just tested with the Does anyone know if Looks like there's an open PR for this over here #8963 but unsure if it's actively being worked on. The doco on https://docs.fluentbit.io/manual/pipeline/inputs/opentelemetry should be updated to reflect this limitation as it's unclear. |
Bug Report
Describe the bug
if configuring
tag_from_uri
on the opentelemetry input plugin, tags are not updatedTo Reproduce
given this config:
And this curl
I would expect the message to be tagged with
v1_logs
. However, it's not retagged, the tag is stillopentelemetry.0
Expected behavior
tags should be changed to reflect the uri
Your Environment
cr.fluentbit.io/fluent/fluent-bit
Additional context
without this functionality it is very difficult to route opentelemetry data (for example logs to loki, metrics to prometheus etc) using fluent-bit.
The text was updated successfully, but these errors were encountered: