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

otlp resource attribute promotion and UTF-8 for Prometheus 3.0 in helm chart #5020

Open
jmohoric101 opened this issue Nov 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@jmohoric101
Copy link

Is your feature request related to a problem ?

Per the documentation; The prometheus configuration file needs to be updated to allow for otlp attributes to promote. For prometheus below 3.x.x you need to add attributes to promote and for above 3.x.x you need to update the translation strategy. https://prometheus.io/docs/guides/opentelemetry/#promoting-resource-attributes. The Helm Chart needs updated to allow for this.

Describe the solution you'd like.

To illustrate, the Prometheus config goes in an otlp section at top level, and might look like this:

global:
  scrape_interval: 15s
  scrape_timeout: 15s

otlp:
  promote_resource_attributes: ["env", "service.name"]

storage:
  tsdb:
    out_of_order_time_window: 10m

Describe alternatives you've considered.

none

Additional context.

Here is a link to an issue on the prometheus repo. https://github.com/prometheus/prometheus/issues/14580

@jmohoric101 jmohoric101 added the enhancement New feature or request label Nov 25, 2024
@Pionerd
Copy link

Pionerd commented Dec 28, 2024

Please be aware that you can already enable it using the additionalArgs, only make sure you use the camelCase structure:

        additionalConfig:
          otlp:
            # No support yet for `keep_identifying_resource_attributes` in the Prometheus Operator
            # keep_identifying_resource_attributes: true
            # Recommended attributes to be promoted to labels.
            promoteResourceAttributes:
              - service.instance.id
              - service.name
              - service.namespace
              - cloud.availability_zone
              - cloud.region
              - container.name
              - deployment.environment.name
              - k8s.cluster.name
              - k8s.container.name
              - k8s.cronjob.name
              - k8s.daemonset.name
              - k8s.deployment.name
              - k8s.job.name
              - k8s.namespace.name
              - k8s.pod.name
              - k8s.replicaset.name
              - k8s.statefulset.name
            translationStrategy: "NoUTF8EscapingWithSuffixes"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants