zio / zio-metrics-connectors

Monitoring, Metrics and Diagnostics for ZIO
https://zio.dev/zio-metrics-connectors
Apache License 2.0
30 stars 24 forks source link

Create an metrics connector to send metrics to OpenTelemetry #41

Closed calvinlfer closed 1 year ago

calvinlfer commented 1 year ago

Context

I've seen quite a lot of clients pair up OpenTelemetry collectors in their Kubernetes clusters as a way to aggregate and send both traces and metrics to end providers like New Relic, Datadog, etc.

Ask

It would be great to have an opentelemetry metrics integration built directly into the project. OpenTelemetry provides a Metrics API that we can integrate with using:

Additional References:

Note: It seems like an implementation of #20 may be able to support this as Micrometer has support for OpenTelemetry

omidb commented 1 year ago

is there any guid around how to use otlp and Zio metrics?

petoalbert commented 1 year ago

Hi @omidb! We support OpenTelemetry through micrometer at the moment. You can read more about how to use micrometer with zio-metrics on the zio-metrics documentation site. The example in the documentation uses the prometheus-registry for micrometer, but you could plug in the opentelemetry registry according to docs here: https://micrometer.io/docs/registry/otlp