-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jkwatson
committed
Jul 22, 2021
1 parent
5fb38b4
commit 13f912d
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
## Gradle OpenTelemetry Build Tracing Plugin | ||
This plugin will trace your gradle build using OpenTelemetry APIs. | ||
|
||
## Usage | ||
|
||
### kotlin buildscript (`build.gradle.kts`/`settings.gradle.kts`): | ||
|
||
In your `settings.gradle.kts` file, configure your plugins like this: | ||
|
||
```kotlin | ||
pluginManagement { | ||
repositories { | ||
gradlePluginPortal() | ||
maven(url="https://jitpack.io") | ||
} | ||
plugins { | ||
# ... | ||
id("com.github.jkwatson.gradle-otel-tracing") version "0.0.2" | ||
} | ||
} | ||
|
||
``` | ||
|
||
And, in your `build.gradle.kts` apply the plugin like this: | ||
|
||
```kotlin | ||
plugins { | ||
# ... | ||
id("com.github.jkwatson.gradle-otel-tracing") | ||
} | ||
``` | ||
|
||
### groovy buildscript (`build.gradle`/`settings.gradle`): | ||
|
||
In your `settings.gradle` file, configure your plugins like this: | ||
|
||
```groovy | ||
pluginManagement { | ||
repositories { | ||
gradlePluginPortal() | ||
maven { | ||
url = "https://jitpack.io" | ||
} | ||
} | ||
plugins { | ||
# ... | ||
id "com.github.jkwatson.gradle-otel-tracing" version "0.0.2" | ||
} | ||
} | ||
``` | ||
|
||
And, in your `build.gradle` apply the plugin like this: | ||
|
||
```groovy | ||
plugins { | ||
# ... | ||
id "com.github.jkwatson.gradle-otel-tracing" | ||
} | ||
``` | ||
|
||
## Configuration | ||
Configuration of the OpenTelemetry SDK is done via the OpenTelemetry Java autoconfiguration module. | ||
|
||
Documentation can be found here: https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure | ||
|
||
This plugin will use the name of your project as the OpenTelemetry `service.name` Resource attribute. |