Which endpoint are you trying to scrape? The /federate endpoint should be available to scrape arbitrary metrics from Fly Prometheus to another service.
We tried changing the metrics_path to /prometheus/prisma-preview/federate too but we still get the same error. warn internal/otlp_metricsbuilder.go:164 Failed to scrape Prometheus endpoint {"kind": "receiver", "name": "prometheus", "pipeline": "metrics", "scrape_timestamp": 1671722291735, "target_labels": "map[__name__:up instance:api.fly.io:9091 job:otel-collector]"}
Is there a better way to scrape the metrics from Fly.io prometheus and export them to Honeycomb?
it seems that federate endpoint isn’t designed for scraping all metrics but instead something aggregated? At least some stack over flow threads suggest this. That would be a problem for us since we want the raw data in honeycomb.
Thanks for all the info so far. Next thing I would suggest trying is a manual curl request to make sure the endpoint itself is working, then if so you can focus on your library’s scrape config and try to figure out why it doesn’t match. See this thread for details on crafting a curl response that works with the /federate endpoint.
The federate endpoint should be able to scrape all metrics, you just need to pass it a selector that matches everything. (In fact, perhaps the selector should be '{__name__=~".*"}' instead of '{__name__=~"job:.*"}' as in your example?)
Changing the selector to '{__name__=~".*"}' worked for on of our organizations.
I am using the same config and targeting our other organization and I get the same error as before: 2023-01-02T13:26:32.169Z warn internal/otlp_metricsbuilder.go:164 Failed to scrape Prometheus endpoint {"kind": "receiver", "name": "prometheus", "pipeline": "metrics", "scrape_timestamp": 1672665991366, "target_labels": "map[__name__:up instance:api.fly.io:443 job:otel-collector]"}
Not sure what could be different. I will do some more research
It seems to be working now for both organizations. @wjordan do you know maybe why some metrics have empty columns? Is there a way to filter just the ones we need, when exporting to honeycomb?