Hi team, do you know what is missing to support th...
# fluent-bit
s
Hi team, do you know what is missing to support the Content Modifier processor for metrics? I see there is implementation for metrics, but it’s not documented and when I try it in fbit 4.0.3 it errors with
[input:opentelemetry:opentelemetry.0] could not ingest metrics context : -1
p
What's your full config?
s
Copy code
service:
  log_level: trace
  http_server: true
  http_listen: 0.0.0.0
  http_port: 2020
  hot_reload: on

pipeline:
  inputs:
    - name: opentelemetry
      listen: 0.0.0.0
      port: 4318
      tag: envoy.metrics.opentelemetry
      tag_from_uri: false

      processors:
        metrics:
          - name: content_modifier
            context: attributes
            action: rename
            key: "color"
            value: "blue"

  outputs:
    - name : stdout
      match: '*'
      format: json_lines
I got it working with the
labels
processor:
Copy code
pipeline:
  inputs:
    - name: opentelemetry
      listen: 0.0.0.0
      port: 4318
      tag: envoy.metrics.opentelemetry
      tag_from_uri: false

      processors:
        metrics:
          - name: labels
            hash: tags
p
Yeah the docs indicate it only works for logs & traces: https://docs.fluentbit.io/manual/pipeline/processors/content-modifier
The
labels
processor is the way for now if you want to manipulate the labels
s
Right, but I need more modifications than what
labels
allow. I see there is implementation for metrics in the
content_modifier
processor. Are there plans to support it in the future?
p
Yup, just needs the work doing 🙂
s
Great! I’ll let you know if I can contribute to this