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

New component: Headers Setter extension for exporters #12922

Closed
kovrus opened this issue Aug 3, 2022 · 0 comments · Fixed by #12892
Closed

New component: Headers Setter extension for exporters #12922

kovrus opened this issue Aug 3, 2022 · 0 comments · Fixed by #12892
Assignees
Labels
Accepted Component New component has been sponsored

Comments

@kovrus
Copy link
Member

kovrus commented Aug 3, 2022

The purpose and use-cases of the new component

The headers_setter extension implements configauth.GRPCClientAuthenticator
and is used to set requests headers in gRPC / HTTP exporters with values
provided via extension configurations or requests metadata (context).

Use cases include but are not limited to enabling multi-tenancy for observability
backends such as Tempo, Mimir, Loki and others by setting the X-Scope-OrgID
header to the value extracted from the context.

Once the extension implementation #12892 is accepted and merged, this extension can address the following issues:

Example configuration for the component

Example configuration of the component:

extensions:
  headers_setter:
    headers:
      - key: X-Scope-OrgID
        from_context: tenant_id
      - key: User-ID
        value: some_user_id

Example of the new component usage to address multi-tenancy use case in Grafana Loki:

extensions:
  headers_setter:
    headers:
      - key: X-Scope-OrgID
        from_context: tenant_id

receivers:
  otlp:
    protocols:
      http:
        include_metadata: true

processors:
  nop:

exporters:
  loki:
    labels:
      resource:
        container_id: ""
        container_name: ""
    endpoint: https://localhost:<port>/loki/api/v1/push
    auth:
      authenticator: headers_setter

service:
  extensions: [ headers_setter ]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [nop]
      exporters: [loki]

Telemetry data types supported

Signal agnostic.

Is this a vendor-specific component? If so, are you proposing to contribute this as a representative of the vendor?

It is not a vendor-specific component.

Sponsor (Optional)

@jpkrohling #12892 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Component New component has been sponsored
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants