Skip to content

Add metrics for export RPCs #707

@anuraaga

Description

@anuraaga

Currently it seems the exporters do not record any metrics of their own, for example successful exports, # of time series exported, etc. It would help in debugging ingestion issues if the exporter also had its own metrics. For reference, here are some metrics the Java SDK collects for exporters (/cc @jack-berg)

https://github.com/open-telemetry/opentelemetry-java/blob/main/exporters/common/src/main/java/io/opentelemetry/exporter/internal/ExporterMetrics.java#L83

Unfortunately I can't find anything similar to refer to in the Go SDK's exporters, but maybe it can still be worth adding metrics here for GCP users. The easiest way to have some sort of metrics, which is better than none, may be to just use the opentelemetry-go-contrib gRPC instrumentation, though that would still miss useful things like # of time series/samples exported.

For context, we had an issue where looking at "Global - Metric samples ingested" for a project, rpc.server.duration from a Go server which should have ingested ~n/s (60s export interval) was climbing steadily, reaching 600/s, eventually falling down to the expected number. It's unclear what happened and we'll need to track whether the problem happens again, but this is just an example of something that could be better debugged with having exporter metrics available as well (notably having resource labels to better understand where the issue could be).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions