Git Product home page Git Product logo

Comments (4)

github-actions avatar github-actions commented on July 17, 2024

Pinging code owners:

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

from opentelemetry-collector-contrib.

wildum avatar wildum commented on July 17, 2024

Hi, I tried it with the following config, and the native histograms are exposed just like they are exposed by my app:

receivers:
    prometheus:
      config:
        scrape_configs:
          - job_name: 'otel-collector'
            scrape_interval: 5s
            static_configs:
              - targets: ['localhost:9001']

exporters:
  prometheus:
    endpoint: "localhost:9010"
    const_labels:
      test_name: v1

service:
  pipelines:
    metrics:
      receivers: [prometheus]
      exporters: [prometheus]
  telemetry:
    logs:
      level: debug

Native histogram metrics exposed by my app:
golang_native_histogram_bucket{address="0.0.0.0",port="9001",le="+Inf"} 1523
golang_native_histogram_sum{address="0.0.0.0",port="9001"} 773369.1551833635
golang_native_histogram_count{address="0.0.0.0",port="9001"} 1523

Native histogram metrics exposed by the prometheus exporter:
golang_native_histogram_bucket{address="0.0.0.0",instance="localhost:9001",job="otel-collector",port="9001",test_name="v1",le="+Inf"} 1284
golang_native_histogram_sum{address="0.0.0.0",instance="localhost:9001",job="otel-collector",port="9001",test_name="v1"} 656156.1718255163
golang_native_histogram_count{address="0.0.0.0",instance="localhost:9001",job="otel-collector",port="9001",test_name="v1"} 1284

Could you share your full setup?

from opentelemetry-collector-contrib.

krisztianfekete avatar krisztianfekete commented on July 17, 2024

Are you sure these are native histograms? They look like regular ones to me. The required options are seemingly missing from your receiver config: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md#prometheus-native-histograms, so my guess is that you're falling back to the legacy ones here.

EDIT: I added them to the original post, so it's easier to reproduce.

from opentelemetry-collector-contrib.

wildum avatar wildum commented on July 17, 2024

Ah you are right, I was missing the scape_protocols, I can reproduce it now, thanks :)

from opentelemetry-collector-contrib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.