Skip to content

lokiexporter: Empty logs sended from otel collector #2529

Closed
@gillg

Description

Describe the bug
Otel Collector receive logs from fluent-bit, process them as batch, and export them to console + loki.
On console everything seems good, but on loki they are "empty"

image
All my logs have no "body" or any attributes.

Console exporter output :

LogRecord open-telemetry/opentelemetry-collector#7
Timestamp: 1614706050024387900
Severity:
ShortName:
Body: <Unknown OpenTelemetry attribute value type "NULL">
Attributes:
     -> RecordNumber: INT(134181)
     -> TimeGenerated: STRING(2021-03-02 18:27:29 +0100)
     -> TimeWritten: STRING(2021-03-02 18:27:29 +0100)
     -> EventID: INT(403)
     -> EventType: STRING(Information)
     -> EventCategory: INT(4)
     -> Channel: STRING(Windows PowerShell)
     -> SourceName: STRING(PowerShell)
     -> ComputerName: STRING([OBFUSCATED])
     -> Data: STRING()
     -> Sid: STRING()
     -> Message: STRING(Engine state is changed from Available to Stopped.

Details:
        NewEngineState=Stopped
        PreviousEngineState=Available

        SequenceNumber=15
[OBFUSCATED]
)
     -> StringInserts: STRING([OBFUSCATED])
     -> hostname: STRING([OBFUSCATED])
     -> instance: STRING([OBFUSCATED])
     -> job: STRING(winlog)
     -> fluent.tag: STRING(winevent.log)

Steps to reproduce

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
  fluentforward:
    endpoint: 0.0.0.0:8006

exporters:
  logging:
  loki:
    endpoint: http://loki:3100/loki/api/v1/push
    # Whitelist of labels. If you try to push an unlisted label the entier log will be dropped
    labels:
      attributes:
        severity: ""
        Type: "severity"
        EventType: ""
        hostname: "instance"
        instance: ""
        job: ""
        #fluent.tag: "job"

processors:
  batch:

extensions:
  health_check:

service:
  extensions: [health_check]
  pipelines:
    logs:
      receivers: [otlp, fluentforward]
      processors: [batch]
      exporters: [logging, loki]

What did you expect to see?
Logs on loki...
Exemple with fluent-bit > fluetnd > loki
image

What did you see instead?
See above

What version did you use?
Loki : grafana/loki:master (2.1.0+)
Otel collector: otel/opentelemetry-collector-contrib:latest

Metadata

Assignees

Labels

bugSomething isn't workingexporter/lokiLoki Exporter

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions