Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to point to new semconv artifact #3239

Merged
merged 9 commits into from
Sep 13, 2023
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
1 change: 1 addition & 0 deletions .github/workflows/auto-update-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
1 change: 1 addition & 0 deletions content/en/docs/instrumentation/java/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 /%}}
Expand Down
22 changes: 16 additions & 6 deletions content/en/docs/instrumentation/java/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,36 @@ telemetry source-identifying info.
<artifactId>opentelemetry-exporter-otlp</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<!-- Not managed by opentelemetry-bom -->
<groupId>io.opentelemetry.semconv</groupId>
<artifactId>opentelemetry-semconv</artifactId>
<version>{{% param javaVersion %}}-alpha</version>
<version>{{% param semconvJavaVersion %}}-alpha</version>
</dependency>
</dependencies>
</project>
```

See [releases][releases] for a full list of artifact coordinates.

See [semantic-conventions-java][semantic-conventions-java] for semantic
conventions releases.

### Gradle

```kotlin
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
Expand All @@ -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
Expand Down Expand Up @@ -298,16 +305,17 @@ First add the semantic conventions as a dependency to your application:

```xml
<dependency>
<groupId>io.opentelemetry</groupId>
<groupId>io.opentelemetry.semconv</groupId>
<artifactId>opentelemetry-semconv</artifactId>
<version>{{% param semconvJavaVersion %}}-alpha</version>
</dependency>
```

#### Gradle

```kotlin
dependencies {
implementation("io.opentelemetry:opentelemetry-semconv")
implementation("io.opentelemetry.semconv:opentelemetry-semconv:{{% param semconvJavaVersion %}}-alpha")
}
```

Expand Down Expand Up @@ -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
4 changes: 4 additions & 0 deletions static/refcache.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down