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

Better support for histogram metrics #3492

Open
kasia-kujawa opened this issue Jan 11, 2024 · 0 comments
Open

Better support for histogram metrics #3492

kasia-kujawa opened this issue Jan 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kasia-kujawa
Copy link
Contributor

Now to extract _sum and count for histogram metics it is need to make following changes in configuration, for example for jvm_gc_collection_seconds metric

sumologic:
  metrics:
    collector:
      otelcol:
        config:
          merge:
            processors:
              transform/extract_sum_count_from_histograms:
                error_mode: ignore
                metric_statements:
                - context: metric
                  statements:
                  - extract_sum_metric(true) where IsMatch(name, "^(jvm_gc_collection_seconds|apiserver_request_duration_seconds|coredns_dns_request_duration_seconds|kubelet_runtime_operations_duration_seconds)$")
                  - extract_count_metric(true) where IsMatch(name, "^(jvm_gc_collection_seconds|apiserver_request_duration_seconds|coredns_dns_request_duration_seconds|kubelet_runtime_operations_duration_seconds)$")

metadata:                   
  metrics:
    config:
      merge:
        processors:
          filter/drop_unnecessary_metrics:
            error_mode: ignore
            metrics:
              metric:
              - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*")
              - IsMatch(name, "^(jvm_gc_collection_seconds|apiserver_request_duration_seconds|coredns_dns_request_duration_seconds|kubelet_runtime_operations_duration_seconds)$")

Related pull request in which this basic support for histogram metrics was added: #3192

I would be good to have easier mechanism to extract _sum and _count` for example by providing list of regular expressions for histogram metrics in the values.yaml

@kasia-kujawa kasia-kujawa added the enhancement New feature or request label Jan 11, 2024
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

1 participant