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

Integration with Micrometer for greater ZIO monitoring capabilities #42

Closed Grryum closed 1 year ago

Grryum commented 1 year ago

I am pleased to announce the successful integration of ZIO 2 Metrics with Micrometer, solving the problem of the lack of any universal connector of the ZIO ecosystem and the rest of the Java world in the context of metrics. This merge request introduces a seamless integration module that connects ZIO Metrics with Micrometer, allowing to translate all captured metric data from ZIO application to any of famous observability systems via common Micrometer facade.

Benefits:

  1. Standardized Metrics Collection: Micrometer is a widely adopted and standardized metrics library in the Java ecosystem. By integrating ZIO Metrics with Micrometer, we align our metrics collection approach with the industry-standard practices followed by the Java community. This ensures compatibility and interoperability with a wide range of existing monitoring systems, tools, and frameworks.

  2. Universal facade (SLF4J but for metrics): Micrometer offers extensive support for various monitoring backends, including popular solutions like Prometheus, Datadog, Graphite, InfluxDB, and more. By integrating ZIO Metrics with Micrometer, we gain access to Micrometer's ecosystem of exporters, dashboards, and visualization tools. This allows us to leverage the existing integrations and take advantage of the rich features provided by Micrometer for metrics visualization, alerting, and analysis.

  3. Easy Integration with Java Libraries: The integration of ZIO Metrics with Micrometer simplifies the integration of ZIO applications with other Java libraries and frameworks. Many Java libraries and frameworks already provide out-of-the-box integration with Micrometer, allowing us to seamlessly capture metrics from both ZIO and non-ZIO components of our applications. This facilitates a unified observability approach across the entire Java application stack.

  4. Stay on Trend with Java Metrics Development: Micrometer is a popular and actively maintained metrics library in the Java ecosystem. By integrating ZIO Metrics with Micrometer, we align ourselves with the latest developments and updates in the Java metrics space. This ensures that our monitoring infrastructure stays up-to-date and can adapt to new features, formats, and backend updates introduced by Micrometer. No need to manually encode metrics for different end systems, such as Prometheus, Datadog, etc (like in other modules of zio-metric-connectors). Instead, the current format of the end system can be maintained centrally using Micrometer.

  5. Real-time Metrics Updates: ZIO Metrics updates are immediately reflected in Micrometer, ensuring accurate monitoring.

Technical details:

New document module was also added.

Please review this merge request, and I welcome any feedback or suggestions for further improvements.

Closes #24 #20 Probably closes #41

P.S. I am not sure that I did all requirements for proper document addition, I will be very grateful if you tell me how I can check the final documentation build.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

petoalbert commented 1 year ago

This looks great @Grryum . I left one comment related to performance.