From f993e9a4983788f6d9931afada3207fc664dcfed Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 14 Nov 2023 11:17:39 -0800 Subject: [PATCH] Add micrometer library doc (#9856) --- .../scripts/markdown-link-check-config.json | 3 ++ .../micrometer-1.5/{ => javaagent}/README.md | 0 .../micrometer-1.5/library/README.md | 38 +++++++++++++++++++ 3 files changed, 41 insertions(+) rename instrumentation/micrometer/micrometer-1.5/{ => javaagent}/README.md (100%) create mode 100644 instrumentation/micrometer/micrometer-1.5/library/README.md diff --git a/.github/scripts/markdown-link-check-config.json b/.github/scripts/markdown-link-check-config.json index 88a18a4db2..a8f85dfa9d 100644 --- a/.github/scripts/markdown-link-check-config.json +++ b/.github/scripts/markdown-link-check-config.json @@ -16,6 +16,9 @@ }, { "pattern": "^http(s)?://logback\\.qos\\.ch" + }, + { + "pattern": "^https://micrometer\\.io" } ] } diff --git a/instrumentation/micrometer/micrometer-1.5/README.md b/instrumentation/micrometer/micrometer-1.5/javaagent/README.md similarity index 100% rename from instrumentation/micrometer/micrometer-1.5/README.md rename to instrumentation/micrometer/micrometer-1.5/javaagent/README.md diff --git a/instrumentation/micrometer/micrometer-1.5/library/README.md b/instrumentation/micrometer/micrometer-1.5/library/README.md new file mode 100644 index 0000000000..938c004734 --- /dev/null +++ b/instrumentation/micrometer/micrometer-1.5/library/README.md @@ -0,0 +1,38 @@ +# Micrometer Instrumentation for Micrometer version 1.5 and higher + +This module provides a [Micrometer registry](https://micrometer.io/docs/concepts#_registry) which +sends Micrometer metrics to the +[OpenTelemetry Metrics SDK](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk/metrics). + +## Quickstart + +### Add these dependencies to your project + +Replace `OPENTELEMETRY_VERSION` with the [latest +release](https://search.maven.org/search?q=g:io.opentelemetry.instrumentation%20AND%20a:opentelemetry-micrometer-1.5). + +For Maven, add to your `pom.xml` dependencies: + +```xml + + + io.opentelemetry.instrumentation + opentelemetry-micrometer-1.5 + OPENTELEMETRY_VERSION + + +``` + +For Gradle, add to your dependencies: + +```groovy +implementation("io.opentelemetry.instrumentation:opentelemetry-micrometer-1.5:OPENTELEMETRY_VERSION") +``` + +### Usage + +The instrumentation library provides an implementation of `MeterRegistry` to bridge Micrometer API to OpenTelemetry Metrics. + +```java +MeterRegistry meterRegistry = OpenTelemetryMeterRegistry.builder(openTelemetry).build(); +```