-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[prometheusremotewrite] TFC agent metrics are dropped before being forwarded to Grafana Cloud due to invalid temporality and type combination for metric error #30435
Comments
Below, you can find the As you can see, all TFC agent metrics appear there. |
Is this a grafana cloud specific issue? Maybe @jpkrohling can help here |
Pinging code owners for exporter/prometheusremotewrite: @Aneurysm9 @rapphil. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
As far as I know opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite/metrics_to_prw.go Line 49 in a0e6491
when
|
Apparently, it seems that the TFC agent emits metrics in Delta temporality, which It looks like we have the following options here:
We are going to start working on the 1st option for now. |
You might want to check this, but when considering prometheusexporter and self-scraping, the delta temporality datapoints must have a |
FYI option one might not work either, since Grafana cloud is based on mimir, which does support OTLP ingestion but has the same limitation as the remote write exporter because both of them really on the same translation layer. So unless there is something in Grafana cloud that accumulates those deltas before sending them into mimir you will run into the same issue. |
You were both right. I tried the exporters:
prometheus:
endpoint: "0.0.0.0:8890"
metric_expiration: 15m
resource_to_telemetry_conversion:
enabled: true Prometheus metrics that lacks the Terraform component metrics of the TFC agent.
It looks like I can only wait for the Delta to Cumulative Processor to be delivered. |
I managed to make it work! I used v0.92.0 version of the collector because the The following diagram shows the logic: sequenceDiagram
participant T as TFC Agent
participant GRPC as Otel gRPC receiver
T->>GRPC: Emits TFC agent metrics
GRPC-->>Prometheus Exporter (delta to cumulative): Metrics are transformed to cumulative temporality by the exporter
Prometheus Receiver->>Prometheus Exporter (delta to cumulative): Scrapes Prometheus exporter for metrics
Prometheus Receiver-->>Prometheusremotewrite Exporter: Metrics piped to the exporter
Prometheusremotewrite Exporter->>Grafana Cloud: Ships metrics in Cumulative temporality
Thank you for your suggestions and your help! I hope the above solution helps other people with the same problem in the future! |
Component(s)
prometheusremotewrite exporter
What happened?
Description
Goal is to send Terraform Cloud Agent metrics to Grafana Cloud. In order to do this, the agent Docker container is configured to send metrics to an OLTP receiver container running on the same host. There, the
prometheusremotewrite
exporter is supposed to forward those metrics to Grafana Cloud. HashiCorp suggests using v0.73.0 of the OpenTelemetry Collector.However, not all of the metrics of the TFC Agent end up in Grafana Cloud due to numerous errors. The weird thing is that using
datadog
as well asfileexporter
exporters, the metrics and their values can be found both in Datadog and file. It is only Grafana Cloud andprometheusremotewrite
exporter that error.Also, when I tried v0.89.0 (latest at the time) version of Otel, there were no errors like before but the metrics still did not appear in Grafana Cloud.
Expected Result
All TFC Agent metrics appear in Grafana Cloud.
Actual Result
Collector version
v0.73.0
Environment information
Environment
OS: Amazon Linux 2
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: