Skip to content

Commit 13f912d

Browse files
author
jkwatson
committed
Add some docs
1 parent 5fb38b4 commit 13f912d

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

README.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
## Gradle OpenTelemetry Build Tracing Plugin
2+
This plugin will trace your gradle build using OpenTelemetry APIs.
3+
4+
## Usage
5+
6+
### kotlin buildscript (`build.gradle.kts`/`settings.gradle.kts`):
7+
8+
In your `settings.gradle.kts` file, configure your plugins like this:
9+
10+
```kotlin
11+
pluginManagement {
12+
repositories {
13+
gradlePluginPortal()
14+
maven(url="https://jitpack.io")
15+
}
16+
plugins {
17+
# ...
18+
id("com.github.jkwatson.gradle-otel-tracing") version "0.0.2"
19+
}
20+
}
21+
22+
```
23+
24+
And, in your `build.gradle.kts` apply the plugin like this:
25+
26+
```kotlin
27+
plugins {
28+
# ...
29+
id("com.github.jkwatson.gradle-otel-tracing")
30+
}
31+
```
32+
33+
### groovy buildscript (`build.gradle`/`settings.gradle`):
34+
35+
In your `settings.gradle` file, configure your plugins like this:
36+
37+
```groovy
38+
pluginManagement {
39+
repositories {
40+
gradlePluginPortal()
41+
maven {
42+
url = "https://jitpack.io"
43+
}
44+
}
45+
plugins {
46+
# ...
47+
id "com.github.jkwatson.gradle-otel-tracing" version "0.0.2"
48+
}
49+
}
50+
```
51+
52+
And, in your `build.gradle` apply the plugin like this:
53+
54+
```groovy
55+
plugins {
56+
# ...
57+
id "com.github.jkwatson.gradle-otel-tracing"
58+
}
59+
```
60+
61+
## Configuration
62+
Configuration of the OpenTelemetry SDK is done via the OpenTelemetry Java autoconfiguration module.
63+
64+
Documentation can be found here: https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure
65+
66+
This plugin will use the name of your project as the OpenTelemetry `service.name` Resource attribute.

0 commit comments

Comments
 (0)