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

[exporter/loki] Promote nested attribute to label #16475

Closed
nlamirault opened this issue Nov 24, 2022 · 2 comments · Fixed by #16615
Closed

[exporter/loki] Promote nested attribute to label #16475

nlamirault opened this issue Nov 24, 2022 · 2 comments · Fixed by #16615
Assignees
Labels
enhancement New feature or request exporter/loki Loki Exporter receiver/fluentforward

Comments

@nlamirault
Copy link

Component(s)

exporter/loki, receiver/fluentforward

What happened?

Description

I would like to have some labels into Grafana/Loki UI.
But i've got only exporter label and OPTLP value

Steps to Reproduce

Expected Result

Actual Result

Collector version

v0.64.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04") : K3S
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

exporters:
      logging:
        verbosity: normal
      loki:
        endpoint: http://loki-gateway.logging.svc.cluster.local:80/loki/api/v1/push
        headers:
          X-Scope-OrgID: homelab
        tls:
          insecure: true
    extensions:
      health_check: null
      memory_ballast:
        size_in_percentage: 20
      pprof:
        endpoint: :1888
      zpages:
        endpoint: :55679
    processors:
      attributes:
        actions:
        - action: insert
          key: loki.attribute.labels
          value: kubernetes.namespace_name
        - action: insert
          key: loki.attribute.labels
          value: kubernetes.pod_name
        - action: insert
          key: loki.attribute.labels
          value: kubernetes.pod_id
        - action: insert
          key: loki.attribute.labels
          value: kubernetes.container_name
        - action: insert
          key: loki.attribute.labels
          value: kubernetes.container_id
        - action: insert
          key: loki.attribute.labels
          value: kubernetes.host
      batch:
        send_batch_max_size: 1000
        send_batch_size: 800
        timeout: 15s
      memory_limiter:
        check_interval: 5s
        limit_percentage: 90
        spike_limit_percentage: 30
      resource:
        attributes:
        - action: insert
          key: collector.name
          value: ${KUBE_POD_NAME}
    receivers:
      fluentforward:
        endpoint: 0.0.0.0:24224
      otlp:
        protocols:
          grpc: null
          http: null
    service:
      extensions:
      - health_check
      - memory_ballast
      - pprof
      - zpages
      pipelines:
        logs:
          exporters:
          - logging
          - loki
          processors:
          - batch
          - memory_limiter
          - resource
          - attributes
          receivers:
          - fluentforward
      telemetry:
        logs:
          encoding: json
          level: info
        metrics:
          address: 0.0.0.0:8888
          level: detailed

Log output

No response

Additional context

2022-11-24_17-06
2022-11-24_17-05

@nlamirault nlamirault added bug Something isn't working needs triage New item requiring triage labels Nov 24, 2022
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@jpkrohling
Copy link
Member

Based on the conversation on Slack, the problem is that nested attributes cannot be used as labels.

@jpkrohling jpkrohling changed the title Loki Exporter : extract labels [exporter/loki] Promote nested attribute to label Nov 24, 2022
@jpkrohling jpkrohling added enhancement New feature or request and removed bug Something isn't working needs triage New item requiring triage labels Nov 24, 2022
@jpkrohling jpkrohling self-assigned this Dec 5, 2022
jpkrohling referenced this issue in jpkrohling/opentelemetry-collector-contrib Dec 5, 2022
Fixes #16475

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
jpkrohling referenced this issue in jpkrohling/opentelemetry-collector-contrib Dec 15, 2022
Fixes #16475

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
jpkrohling added a commit that referenced this issue Dec 15, 2022
Fixes #16475

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exporter/loki Loki Exporter receiver/fluentforward
Projects
None yet
2 participants