diff --git a/README.md b/README.md index 61aae8ca4f..8333a97108 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ We support an impressively huge number of [libraries and frameworks](docs/suppor a majority of the most popular [application servers](docs/supported-libraries.md#application-servers)...right out of the box! [Click here to see the full list](docs/supported-libraries.md) and to learn more about [disabled instrumentation](docs/supported-libraries.md#disabled-instrumentations) -and how to [suppress unwanted instrumentation](docs/suppressing-instrumentation.md). +and how to [suppress unwanted instrumentation][suppress]. ## Creating agent extensions @@ -165,3 +165,4 @@ Thanks to all the people who already contributed! [config]: https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/ [manual]: https://opentelemetry.io/docs/instrumentation/java/manual/ +[suppress]: https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/#suppressing-specific-auto-instrumentation diff --git a/buildscripts/check-suppressing-instrumentation-docs.sh b/buildscripts/check-suppressing-instrumentation-docs.sh deleted file mode 100644 index 0fccff42c3..0000000000 --- a/buildscripts/check-suppressing-instrumentation-docs.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -# this script reports some false positives, but is helpful in comparing the keys listed -# in suppressing-instrumentation.md with the keys listed in the source files - -set -e -u -o pipefail - -comm -3 \ - <( - sed -n '/----------------------/,${p;/^$/q}' \ - docs/suppressing-instrumentation.md \ - | sed '1d;$d' \ - | cut -d '|' -f 3 \ - | tr -d ' ' \ - | sort -u - ) \ - <( - git ls-files '*Module.java' \ - | xargs grep super \ - | grep -oP '(?<=super\(")[^"]+' \ - | sort -u - ) diff --git a/docs/contributing/writing-instrumentation-module.md b/docs/contributing/writing-instrumentation-module.md index d08ccb5c09..cd4b590941 100644 --- a/docs/contributing/writing-instrumentation-module.md +++ b/docs/contributing/writing-instrumentation-module.md @@ -29,7 +29,7 @@ class MyLibraryInstrumentationModule extends InstrumentationModule { ``` An `InstrumentationModule` needs to have at least one name. The user of the javaagent can -[suppress a chosen instrumentation](../suppressing-instrumentation.md) by referring to it by one of +[suppress a chosen instrumentation][suppress] by referring to it by one of its names. The instrumentation module names use `kebab-case`. The main instrumentation name, which is the first one, must be the same as the gradle module name, excluding the version suffix if present. @@ -355,3 +355,5 @@ we prefer to use because the former inserts a call to `Class.getMethod(...)` in transformed method. In contrast, getting the declaring class and method name is just loading constants from constant pool, which is a much simpler operation. + +[suppress]: https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/#suppressing-specific-auto-instrumentation