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]: Attribute used as hint always added as loki label #21045

Closed
jonaskello opened this issue Apr 18, 2023 · 7 comments · Fixed by #27446
Closed

[exporter/loki]: Attribute used as hint always added as loki label #21045

jonaskello opened this issue Apr 18, 2023 · 7 comments · Fixed by #27446
Assignees
Labels
exporter/loki Loki Exporter

Comments

@jonaskello
Copy link
Contributor

Component(s)

exporter/loki

Describe the issue you're reporting

It seems like when I add a hint for org-id using loki.tenant it also becomes added as a loki label. This seems like an unnecessary overhead since it will always have the same value for the same tenant.

For example if I use the k8s.namespace.name resource attribute for loki.tenant it will also add a loki label called k8s_namespace_name which will always have the same value within the tenant.

processors:
  resource/loki_tenant_from_k8s_namespace:
    attributes:
    - action: insert
      key: loki.tenant
      value: k8s.namespace.name

Is automatcially adding a loki label for the loki.tenant hint value expected behavior or do I have a misconfiguration?

@jonaskello jonaskello added the needs triage New item requiring triage label Apr 18, 2023
@github-actions github-actions bot added the exporter/loki Loki Exporter label Apr 18, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

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

@atoulme atoulme removed the needs triage New item requiring triage label Apr 18, 2023
@mar4uk
Copy link
Contributor

mar4uk commented Apr 20, 2023

That's a good question.
Probably we shouldn't promote the resource attribute that was used for loki.tenant hint to the label.
According to the README

In this case the value of the host.name resource attribute is used to group logs by tenant and send requests with the X-Scope-OrgID header set to relevant tenants.

I think setting X-Scope-OrgID should be enough to support multitenancy.
What do you think @kovrus? Do you recall why the promotion resource attribute to the label was introduced in multitenancy support https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/14930/files#diff-a688ab558d42636a615687f62332c493311362ccf58799b795b34cf2a2955604R52-R63?

@jpkrohling
Copy link
Member

Probably an oversight, I agree the tenant should not be automatically promoted to a label.

@github-actions
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label Jul 24, 2023
@mar4uk
Copy link
Contributor

mar4uk commented Jul 24, 2023

still relevant

@github-actions github-actions bot removed the Stale label Jul 25, 2023
@github-actions
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label Sep 25, 2023
@mar4uk
Copy link
Contributor

mar4uk commented Sep 25, 2023

still relevant

@github-actions github-actions bot removed the Stale label Sep 26, 2023
@jpkrohling jpkrohling self-assigned this Oct 5, 2023
jpkrohling added a commit to jpkrohling/opentelemetry-collector-contrib that referenced this issue Oct 5, 2023
Fixes open-telemetry#21045

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
jpkrohling added a commit to jpkrohling/opentelemetry-collector-contrib that referenced this issue Oct 24, 2023
Fixes open-telemetry#21045

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
jpkrohling added a commit that referenced this issue Oct 26, 2023
Fixes #21045

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

---------

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
sigilioso pushed a commit to carlossscastro/opentelemetry-collector-contrib that referenced this issue Oct 27, 2023
…7446)

Fixes open-telemetry#21045

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

---------

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this issue Nov 12, 2023
…7446)

Fixes open-telemetry#21045

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

---------

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
RoryCrispin pushed a commit to ClickHouse/opentelemetry-collector-contrib that referenced this issue Nov 24, 2023
…7446)

Fixes open-telemetry#21045

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

---------

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
exporter/loki Loki Exporter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants