Skip to content
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

Fluentbit 3.0 Opentelemetry does not process records correctly #8863

Open
sfc-gh-aivanou opened this issue May 23, 2024 · 2 comments
Open

Fluentbit 3.0 Opentelemetry does not process records correctly #8863

sfc-gh-aivanou opened this issue May 23, 2024 · 2 comments

Comments

@sfc-gh-aivanou
Copy link

sfc-gh-aivanou commented May 23, 2024

Bug Report

Describe the bug
When I am using fluentbit 3.0 with opentelemetry output plugin it ignores all labels set on the record, while fluentbit 2.* sends correct records

To Reproduce

I have simple fluentbit config and opentelemetry config. I send records from fluentbit to opentelemetry and print them on the console.

Example of messages from fluentbit3.0

Resource SchemaURL:
ScopeLogs #0
ScopeLogs SchemaURL:
InstrumentationScope
LogRecord #0
ObservedTimestamp: 1970-01-01 00:00:00 +0000 UTC
Timestamp: 2024-05-23 17:40:18.835805788 +0000 UTC
SeverityText:
SeverityNumber: Unspecified(0)
Body: Str(Log line 1183)
Trace ID:
Span ID:
Flags: 0
	{"kind": "exporter", "data_type": "logs", "name": "logging"}

Example of the message from fluentbit 2.0:

Resource SchemaURL:
Resource attributes:
     -> service.namespace: Str(mylabel)
ScopeLogs #0
ScopeLogs SchemaURL:
InstrumentationScope
LogRecord #0
ObservedTimestamp: 1970-01-01 00:00:00 +0000 UTC
Timestamp: 2024-05-23 17:30:44.778896909 +0000 UTC
SeverityText:
SeverityNumber: Unspecified(0)
Body: Map({"label1":"test","label2":"test2","log":"Log line 609","logtag":"F","stream":"stdout"})
Trace ID:
Span ID:
Flags: 0
	{"kind": "exporter", "data_type": "logs", "name": "logging"}
  • Steps to reproduce the problem:
  1. start fluentbit with simple config:
    [SERVICE]
        log_Level                  info
        storage.sync               normal
        storage.path               /var/log/flb-storage-system-pub/
        storage.checksum           off
        storage.backlog.mem_limit  50M
        storage.max_chunks_up      128
        HTTP_Server                On
        HTTP_Listen                0.0.0.0
        HTTP_PORT                  8888


    @INCLUDE input-*.conf
    @INCLUDE output-*.conf

  input-logs.conf: |
    [INPUT]
        Name              tail
        Path              /var/log/containers/log-test*.log
        Parser            cri
        DB                /var/log/flb_kube_system_pub.db
        Read_from_Head    true
        Mem_Buf_Limit     100MB
        Buffer_Chunk_Size 32k
        Buffer_Max_Size   32k
        Skip_Long_Lines   On
        Refresh_Interval  5

  output-forward.conf: |
    [OUTPUT]
        Name                  opentelemetry
        Match                 *
        Host                  localhost
        Port                  4318

Start fluentbit 0.85 with this config:

  otel-collector-config: |
    receivers:
      otlp:
        protocols:
          http:

    exporters:
      logging:
        loglevel: debug
        sampling_initial: 5
        sampling_thereafter: 200

    service:
      telemetry:
        metrics:
          address: ":8889"
        logs:
          level: "info"
      pipelines:
        logs:
          receivers: [otlp]
          exporters: [logging]

Expected behavior
Message with fluentbit 3.0 completely incompatible with messages from fluentbit 2.0

Your Environment

  • Version used: 3.0.2, 2.2.2
  • Configuration:
  • Environment name and version (e.g. Kubernetes? What version?):
  • Server type and version:
  • Operating System and version:
  • Filters and plugins:

Additional context

@omri-shilton
Copy link

we are also experiencing this

@Hemant0601
Copy link

Any solution on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants