prometheus-community / prometheus-community/stackdriver_exporter

Metrics shown as being retrieved but can't be queried

Open
#437 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
295
Forks
117
Avg merge
9d 14h
Merged PRs (30d)
7

Description

Here's how I run the stackdriver_exporter with debug output:

./stackdriver_exporter --log.level=debug --google.project-ids=my-project --monitoring.metrics-prefixes='networking.googleapis.com/cloud_netslo' --monitoring.drop-delegated-projects --monitoring.filters='networking.googleapis.com/cloud_netslo'
time=2025-05-06T19:25:52.778Z level=INFO source=stackdriver_exporter.go:366 msg="Starting stackdriver_exporter" version="(version=0.18.0, branch=HEAD, revision=3b1a6e9ebb85a176b8ab48639f8e0a2a4a2f7bcf)" build_context="(go=go1.23.5, platform=linux/amd64, user=root@34d306216a55, date=20250117-20:46:30, tags=unknown)" metric_prefixes=[networking.googleapis.com/cloud_netslo] extra_filters=networking.googleapis.com/cloud_netslo projectIDs=[my-project] projectsFilter=""
time=2025-05-06T19:25:52.778Z level=INFO source=stackdriver_exporter.go:219 msg="Creating collector cache" ttl=2h0m0s
time=2025-05-06T19:25:52.778Z level=INFO source=tls_config.go:347 msg="Listening on" address=[::]:9255
time=2025-05-06T19:25:52.778Z level=INFO source=tls_config.go:350 msg="TLS is disabled." http2=false address=[::]:9255
time=2025-05-06T19:26:01.579Z level=DEBUG source=monitoring_collector.go:383 msg="listing Google Stackdriver Monitoring metric descriptors starting with" project_id=my-project prefix=networking.googleapis.com/cloud_netslo
time=2025-05-06T19:26:01.844Z level=DEBUG source=monitoring_collector.go:285 msg="retrieving Google Stackdriver Monitoring metrics for descriptor" project_id=my-project descriptor=networking.googleapis.com/cloud_netslo/active_probing/probe_count
time=2025-05-06T19:26:01.844Z level=DEBUG source=monitoring_collector.go:315 msg="retrieving Google Stackdriver Monitoring metrics with filter" project_id=my-project filter="project="my-project" AND metric.type="networking.googleapis.com/cloud_netslo/active_probing/probe_count""
time=2025-05-06T19:26:02.071Z level=DEBUG source=monitoring_collector.go:398 msg="Done reporting monitoring metrics" project_id=my-project
time=2025-05-06T19:30:18.083Z level=DEBUG source=monitoring_collector.go:383 msg="listing Google Stackdriver Monitoring metric descriptors starting with" project_id=my-project prefix=networking.googleapis.com/cloud_netslo
time=2025-05-06T19:30:18.148Z level=DEBUG source=monitoring_collector.go:285 msg="retrieving Google Stackdriver Monitoring metrics for descriptor" project_id=my-project descriptor=networking.googleapis.com/cloud_netslo/active_probing/probe_count
time=2025-05-06T19:30:18.148Z level=DEBUG source=monitoring_collector.go:315 msg="retrieving Google Stackdriver Monitoring metrics with filter" project_id=my-project filter="project="my-project" AND metric.type="networking.googleapis.com/cloud_netslo/active_probing/probe_count""
time=2025-05-06T19:30:18.360Z level=DEBUG source=monitoring_collector.go:398 msg="Done reporting monitoring metrics" project_id=my-project
time=2025-05-06T19:31:07.423Z level=DEBUG source=monitoring_collector.go:383 msg="listing Google Stackdriver Monitoring metric descriptors starting with" project_id=my-project prefix=networking.googleapis.com/cloud_netslo
time=2025-05-06T19:31:07.468Z level=DEBUG source=monitoring_collector.go:285 msg="retrieving Google Stackdriver Monitoring metrics for descriptor" project_id=my-project descriptor=networking.googleapis.com/cloud_netslo/active_probing/probe_count
time=2025-05-06T19:31:07.468Z level=DEBUG source=monitoring_collector.go:315 msg="retrieving Google Stackdriver Monitoring metrics with filter" project_id=my-project filter="project="my-project" AND metric.type="networking.googleapis.com/cloud_netslo/active_probing/probe_count""
time=2025-05-06T19:31:07.682Z level=DEBUG source=monitoring_collector.go:398 msg="Done reporting monitoring metrics" project_id=my-project

Despite the fact that the required metrics (cloud_netslo/active_probing/probe_count) are claimed to be retrieved from GCM as shown in the debug output, they do not appear on the list when '/metrics' is queried, and cannot be retrieved.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the shown exporter command and query the /metrics endpoint. Trace the descriptor and metric retrieval flow in monitoring_collector.go, focusing on the logged lines around 285, 315, 383, and 398. Done means the cloud_netslo/active_probing/probe_count metric is exposed and retrievable from /metrics.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, google-cloud, prometheus
Domain
cloud, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.