Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/contributing/writing-instrumentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,26 @@ All classes from the newly added bootstrap module will be loaded by the bootstra
globally available within the JVM. **IMPORTANT: Note that you _cannot_ use any third-party libraries
here, including the instrumented library - you can only use JDK and OpenTelemetry API classes.**

### Common Modules

When creating a common module shared among different instrumentations, the naming convention should
include a version suffix that matches the version of the instrumented library specified in the
common module's `build.gradle.kts`.

For example, if the common module's Gradle file contains the following dependency:

```kotlin
dependencies {
compileOnly("org.yarpc.client:rest:5.0.0")
}
```

Then the module should be named using the suffix `yarp-common-5.0`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Off the top of my head, I don't know how to phrase it...but if I had no familiarity and read this for the first time, I would wonder why the module isn't called yarp-common-5.0.0. Can we clarify that we use major/minor or lowest major/minor ?


If the common module does not have a direct dependency on the instrumented library, no version
suffix is required. Examples of such cases include modules named `lettuce-common` and
`netty-common`.

## Writing Java agent unit tests

As mentioned before, tests in the `javaagent` module cannot access the javaagent instrumentation
Expand Down
Loading