Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
19 changes: 19 additions & 0 deletions gcp-auth-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ Here is a list of configurable options for the extension:
The OpenTelemetry Java Agent Extension can be easily added to any Java application by modifying the startup command to the application.
For more information on Extensions, see the [documentation here](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/examples/extension/README.md).

> [!IMPORTANT]
> 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`.\
> See instructions for [Downloading Shaded JAR](#downloading-shaded-jar) below.

Below is a snippet showing how to add the extension to a Java application using the Gradle build system.

```gradle
Expand Down Expand Up @@ -80,6 +84,21 @@ application {
}
```

#### Downloading Shaded JAR

You can download the shaded JAR for Google Cloud Authentication Extension from the following link -

```text
https://repo1.maven.org/maven2/io/opentelemetry/contrib/opentelemetry-gcp-auth-extension/<VERSION>/opentelemetry-gcp-auth-extension-<VERSION>-shadow.jar
```

Replace `<VERSION>` with the version you wish to download. For instance, shaded
variant for `v1.44.0-alpha`, will be found at -

`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`

*Note: Typically, you would want to use the most recent version of the extension.*

### Without OpenTelemetry Java agent

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.\
Expand Down
7 changes: 7 additions & 0 deletions gcp-auth-extension/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ tasks {
}

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

Expand Down
Loading