opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

Collector w/ prometheus receiver on reports that scraping was succesful when there is no component to scrape

Open githubsands opened this issue 3 years ago • 1 comments
trafficstars

Describe the bug Collector w/ prometheus receiver reports metrics and that scraping is successful when component that is suppose to emit metrics does not exist Steps to reproduce Run collector with prometheus receiver with no active component What did you expect to see? No metrics being reported and logs that indicate that. What did you see instead? Scraped metrics and explicit statement of succesful scrapes. What version did you use? v0.55.0 What config did you use? Config: (e.g. the yaml config file)

  prometheus/collectd:
    use_start_time_metric: false
    start_time_metric_regex: '^(.+_)*process_start_time_seconds$'
    config:
      scrape_configs:
        - job_name: 'component-scraper'
          scrape_interval: 5s
          metrics_path: "/metrics"
          static_configs:
            - targets: [":15693"]
exporters:
  logging:
    logLevel: debug
  otlp:
    endpoint: ingest.lightstep.com:443
    headers:
      - lightstep-access-token: ${LIGHTSTEP_ACCESS_TOKEN}
service:
  pipelines:
    metrics:
      receivers: [prometheus/collectd]
      exporters: [logging, otlp]

Environment OS: darwin/amd64 Compiler: go1.18.3 darwin/adm64

Additional context

githubsands avatar Jul 08 '22 19:07 githubsands