From c5fdfb06d44ca05938c20a804576c2385fa668ab Mon Sep 17 00:00:00 2001 From: Erin Schnabel Date: Wed, 24 Mar 2021 10:13:07 -0400 Subject: [PATCH] Docs: Add MP Metrics API in some cases (cherry picked from commit 58ff6260f91a4498118390148d29dc97169770ab) --- docs/src/main/asciidoc/micrometer.adoc | 10 ++++++++++ docs/src/main/asciidoc/smallrye-graphql.adoc | 15 +++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/docs/src/main/asciidoc/micrometer.adoc b/docs/src/main/asciidoc/micrometer.adoc index 860e7c8c755a4..ef2af83a7e87f 100644 --- a/docs/src/main/asciidoc/micrometer.adoc +++ b/docs/src/main/asciidoc/micrometer.adoc @@ -431,6 +431,16 @@ public MeterFilter renameApplicationMeters() { } ---- +Ensure the following dependency is present in your `pom.xml` file if you require the Microprofile Metrics API: + +[source,xml] +---- + + org.eclipse.microprofile.metrics + microprofile-metrics-api + +---- + NOTE: The MP Metrics API compatibility layer will be moved to a different extension in the future. == Configuration Reference diff --git a/docs/src/main/asciidoc/smallrye-graphql.adoc b/docs/src/main/asciidoc/smallrye-graphql.adoc index 5044a67a31fd8..aab2ad9ebdcf6 100644 --- a/docs/src/main/asciidoc/smallrye-graphql.adoc +++ b/docs/src/main/asciidoc/smallrye-graphql.adoc @@ -849,6 +849,21 @@ When `SomeBusinessException` occurs, the error output will contain the Error cod <1> The error code +== Additional Notes + +If you are using the `smallrye-graphql` extension and the `micrometer` metrics extension is present and metrics are +enabled, you may encounter a `java.lang.NoClassDefFoundError` as some versions of the `smallrye-graphql` extension +have runtime requirements on the Microprofile Metrics API. Add the following Microprofile Metrics API dependency +to resolve the issue: + +[source,xml] +---- + + org.eclipse.microprofile.metrics + microprofile-metrics-api + +---- + == Conclusion SmallRye GraphQL enables clients to retrieve the exact data that is