Skip to content

Commit eaeaeb9

Browse files
authored
Add instructions for Auth Extension shadow variant (#1764)
1 parent 9f40e41 commit eaeaeb9

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

gcp-auth-extension/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ Here is a list of configurable options for the extension:
4848
The OpenTelemetry Java Agent Extension can be easily added to any Java application by modifying the startup command to the application.
4949
For more information on Extensions, see the [documentation here](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/examples/extension/README.md).
5050

51+
> [!IMPORTANT]
52+
> Make sure to download the 'shaded' variant of the Authentication Extension for use with OpenTelemetry Java auto-instrumentation agent. The shaded version is available under the classifier name `shadow`.\
53+
> See instructions for [Downloading Shaded JAR](#downloading-shaded-jar) below.
54+
5155
Below is a snippet showing how to add the extension to a Java application using the Gradle build system.
5256

5357
```gradle
@@ -80,6 +84,21 @@ application {
8084
}
8185
```
8286

87+
#### Downloading Shaded JAR
88+
89+
You can download the shaded JAR for Google Cloud Authentication Extension from the following link -
90+
91+
```text
92+
https://repo1.maven.org/maven2/io/opentelemetry/contrib/opentelemetry-gcp-auth-extension/<VERSION>/opentelemetry-gcp-auth-extension-<VERSION>-shadow.jar
93+
```
94+
95+
Replace `<VERSION>` with the version you wish to download. For instance, shaded
96+
variant for `v1.44.0-alpha`, will be found at -
97+
98+
`https://repo1.maven.org/maven2/io/opentelemetry/contrib/opentelemetry-gcp-auth-extension/1.44.0-alpha/opentelemetry-gcp-auth-extension-1.44.0-alpha-shadow.jar`
99+
100+
*Note: Typically, you would want to use the most recent version of the extension.*
101+
83102
### Without OpenTelemetry Java agent
84103

85104
This extension can be used without the OpenTelemetry Java agent by leveraging the [OpenTelemetry SDK Autoconfigure](https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md) module.\

gcp-auth-extension/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ tasks {
6060
}
6161

6262
shadowJar {
63+
/**
64+
* Shaded version of this extension is required when using it as a OpenTelemetry Java Agent
65+
* extension. Shading bundles the dependencies required by this extension in the resulting JAR,
66+
* ensuring their presence on the classpath at runtime.
67+
*
68+
* See http://gradleup.com/shadow/introduction/#introduction for reference.
69+
*/
6370
archiveClassifier.set("shadow")
6471
}
6572

0 commit comments

Comments
 (0)