From cd0e187e40299fefb30439d9d22e1a1da29d7b02 Mon Sep 17 00:00:00 2001
From: jack-berg <34418638+jack-berg@users.noreply.github.com>
Date: Wed, 13 Sep 2023 02:26:27 -0500
Subject: [PATCH] Update docs to point to new semconv artifact (#3239)
---
.github/workflows/auto-update-versions.yml | 1 +
.../en/docs/instrumentation/java/_index.md | 1 +
.../en/docs/instrumentation/java/manual.md | 22 ++++++++++++++-----
static/refcache.json | 4 ++++
4 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/auto-update-versions.yml b/.github/workflows/auto-update-versions.yml
index 8fd77910692b..492318935c68 100644
--- a/.github/workflows/auto-update-versions.yml
+++ b/.github/workflows/auto-update-versions.yml
@@ -27,6 +27,7 @@ jobs:
.github/workflows/scripts/auto-update-version.sh opentelemetry-specification spec scripts/content-modules/adjust-pages.pl
.github/workflows/scripts/auto-update-version.sh opentelemetry-proto otlp scripts/content-modules/adjust-pages.pl
.github/workflows/scripts/auto-update-version.sh semantic-conventions semconv scripts/content-modules/adjust-pages.pl
+ .github/workflows/scripts/auto-update-version.sh semantic-conventions-java semconvJavaVersion content/en/docs/instrumentation/java/_index.md
env:
# change this to secrets.GITHUB_TOKEN when testing against a fork
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
diff --git a/content/en/docs/instrumentation/java/_index.md b/content/en/docs/instrumentation/java/_index.md
index ccd28a65f313..f3873b4675ba 100644
--- a/content/en/docs/instrumentation/java/_index.md
+++ b/content/en/docs/instrumentation/java/_index.md
@@ -7,6 +7,7 @@ aliases: [/java, /java/metrics, /java/tracing]
weight: 18
cascade:
javaVersion: 1.30.1
+ semconvJavaVersion: 1.21.0
---
{{% docs/instrumentation/index-intro java /%}}
diff --git a/content/en/docs/instrumentation/java/manual.md b/content/en/docs/instrumentation/java/manual.md
index da8d38ab8872..5b299bcc41e7 100644
--- a/content/en/docs/instrumentation/java/manual.md
+++ b/content/en/docs/instrumentation/java/manual.md
@@ -61,9 +61,10 @@ telemetry source-identifying info.
opentelemetry-exporter-otlp
- io.opentelemetry
+
+ io.opentelemetry.semconv
opentelemetry-semconv
- {{% param javaVersion %}}-alpha
+ {{% param semconvJavaVersion %}}-alpha
@@ -71,6 +72,9 @@ telemetry source-identifying info.
See [releases][releases] for a full list of artifact coordinates.
+See [semantic-conventions-java][semantic-conventions-java] for semantic
+conventions releases.
+
### Gradle
```kotlin
@@ -78,12 +82,15 @@ dependencies {
implementation 'io.opentelemetry:opentelemetry-api:{{% param javaVersion %}}'
implementation 'io.opentelemetry:opentelemetry-sdk:{{% param javaVersion %}}'
implementation 'io.opentelemetry:opentelemetry-exporter-otlp:{{% param javaVersion %}}'
- implementation 'io.opentelemetry:opentelemetry-semconv:{{% param javaVersion %}}-alpha'
+ implementation 'io.opentelemetry.semconv:opentelemetry-semconv:{{% param semconvJavaVersion %}}-alpha'
}
```
See [releases][releases] for a full list of artifact coordinates.
+See [semantic-conventions-java][semantic-conventions-java] for semantic
+conventions releases.
+
### Imports
```java
@@ -102,7 +109,7 @@ import io.opentelemetry.sdk.trace.SdkTracerProvider;
import io.opentelemetry.sdk.trace.export.BatchSpanProcessor;
import io.opentelemetry.sdk.logs.SdkLoggerProvider;
import io.opentelemetry.sdk.logs.export.BatchLogRecordProcessor;
-import io.opentelemetry.semconv.resource.attributes.ResourceAttributes;
+import io.opentelemetry.semconv.ResourceAttributes;
```
### Example
@@ -298,8 +305,9 @@ First add the semantic conventions as a dependency to your application:
```xml
- io.opentelemetry
+ io.opentelemetry.semconv
opentelemetry-semconv
+ {{% param semconvJavaVersion %}}-alpha
```
@@ -307,7 +315,7 @@ First add the semantic conventions as a dependency to your application:
```kotlin
dependencies {
- implementation("io.opentelemetry:opentelemetry-semconv")
+ implementation("io.opentelemetry.semconv:opentelemetry-semconv:{{% param semconvJavaVersion %}}-alpha")
}
```
@@ -1103,5 +1111,7 @@ io.opentelemetry.sdk.trace.export.BatchSpanProcessor = io.opentelemetry.extensio
[parentbased]:
https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/ParentBasedSampler.java
[releases]: https://github.com/open-telemetry/opentelemetry-java#releases
+[semantic-conventions-java]:
+ https://github.com/open-telemetry/semantic-conventions-java/releases
[traceidratiobased]:
https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/TraceIdRatioBasedSampler.java
diff --git a/static/refcache.json b/static/refcache.json
index fd8e0eb90ffd..049b82b8fa2d 100644
--- a/static/refcache.json
+++ b/static/refcache.json
@@ -3167,6 +3167,10 @@
"StatusCode": 200,
"LastSeen": "2023-06-30T11:43:23.38558-04:00"
},
+ "https://github.com/open-telemetry/semantic-conventions-java/releases": {
+ "StatusCode": 200,
+ "LastSeen": "2023-09-13T09:15:50.916636+02:00"
+ },
"https://github.com/open-telemetry/semantic-conventions/issues/new": {
"StatusCode": 200,
"LastSeen": "2023-07-06T18:29:34.673526-04:00"