Skip to content

Commit

Permalink
Update to otel-java 1.0.0 (#2431)
Browse files Browse the repository at this point in the history
* Update to otel-java 1.0.0

* Fix test

* Fix another test

* Fix another test

* Fix hibernate tests

* Fix spring-data tests

* Spotless
  • Loading branch information
trask authored Feb 28, 2021
1 parent 16d654c commit 4758307
Show file tree
Hide file tree
Showing 18 changed files with 133 additions and 53 deletions.
2 changes: 1 addition & 1 deletion docs/agent-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ behavior you find.
## SDK Autoconfiguration

The SDK's autoconfiguration module is used for basic configuration of the agent. Read the
[docs](https://github.com/open-telemetry/opentelemetry-java/tree/v0.17.0/sdk-extensions/autoconfigure#customizing-the-opentelemetry-sdk)
[docs](https://github.com/open-telemetry/opentelemetry-java/tree/v1.0.0/sdk-extensions/autoconfigure#customizing-the-opentelemetry-sdk)
to find settings such as configuring export or sampling.

## Peer service name
Expand Down
8 changes: 4 additions & 4 deletions docs/manual-instrumentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ use the `@WithSpan` annotation, also include the `opentelemetry-extension-annota
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
<version>0.17.1</version>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-extension-annotations</artifactId>
<version>0.17.1</version>
<version>1.0.0</version>
</dependency>
</dependencies>
```
Expand All @@ -47,8 +47,8 @@ use the `@WithSpan` annotation, also include the `opentelemetry-extension-annota

```groovy
dependencies {
implementation('io.opentelemetry:opentelemetry-api:0.17.1')
implementation('io.opentelemetry:opentelemetry-extension-annotations:0.17.1')
implementation('io.opentelemetry:opentelemetry-api:1.0.0')
implementation('io.opentelemetry:opentelemetry-extension-annotations:1.0.0')
}
```

Expand Down
2 changes: 1 addition & 1 deletion examples/distro/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ subprojects {

ext {
versions = [
opentelemetry : "0.17.1",
opentelemetry : "1.0.0",
opentelemetryJavaagent: "0.17.0",
bytebuddy : "1.10.18",
guava : "30.1-jre"
Expand Down
6 changes: 3 additions & 3 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ configurations.all {

ext {
versions = [
opentelemetry : '0.17.0',
opentelemetryAlpha: "0.17.0-alpha",
opentelemetry : '1.0.0',
opentelemetryAlpha: "1.0.0-alpha",

slf4j : "1.7.30",
guava : "30.1-jre",
Expand Down Expand Up @@ -51,7 +51,7 @@ ext {
opentelemetryZipkin : dependencies.create(group: 'io.opentelemetry', name: 'opentelemetry-exporter-zipkin', version: versions.opentelemetry),
opentelemetryPrometheus : dependencies.create(group: 'io.opentelemetry', name: 'opentelemetry-exporter-prometheus', version: versions.opentelemetryAlpha),
opentelemetryLogging : dependencies.create(group: 'io.opentelemetry', name: 'opentelemetry-exporter-logging', version: versions.opentelemetry),
opentelemetryProto : dependencies.create(group: 'io.opentelemetry', name: 'opentelemetry-proto', version: versions.opentelemetry),
opentelemetryProto : dependencies.create(group: 'io.opentelemetry', name: 'opentelemetry-proto', version: versions.opentelemetryAlpha),
opentelemetryResources : dependencies.create(group: 'io.opentelemetry', name: 'opentelemetry-sdk-extension-resources', version: versions.opentelemetry),
opentelemetrySdkTesting : dependencies.create(group: 'io.opentelemetry', name: 'opentelemetry-sdk-testing', version: versions.opentelemetry),
opentelemetrySemConv : dependencies.create(group: 'io.opentelemetry', name: 'opentelemetry-semconv', version: versions.opentelemetryAlpha),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ class CriteriaTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_OPERATION.key}" "SELECT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(3) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ class QueryTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_OPERATION.key}" String
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(3) {
Expand Down Expand Up @@ -91,8 +93,10 @@ class QueryTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_OPERATION.key}" "SELECT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
}
Expand Down Expand Up @@ -163,8 +167,10 @@ class QueryTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_OPERATION.key}" "SELECT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(3) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_OPERATION.key}" "SELECT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(3) {
Expand Down Expand Up @@ -142,8 +144,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_OPERATION.key}" String
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
}
Expand Down Expand Up @@ -208,8 +212,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_OPERATION.key}" "SELECT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(3) {
Expand All @@ -226,8 +232,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_OPERATION.key}" String
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
}
Expand Down Expand Up @@ -340,8 +348,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_OPERATION.key}" String
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
}
Expand Down Expand Up @@ -412,8 +422,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_OPERATION.key}" "SELECT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(3) {
Expand Down Expand Up @@ -499,8 +511,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^insert /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^insert /
"${SemanticAttributes.DB_OPERATION.key}" "INSERT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(6) {
Expand All @@ -511,8 +525,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^delete /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^delete /
"${SemanticAttributes.DB_OPERATION.key}" "DELETE"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(7) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ class CriteriaTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_OPERATION.key}" "SELECT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(3) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ class QueryTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_OPERATION.key}" String
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(3) {
Expand Down Expand Up @@ -91,8 +93,10 @@ class QueryTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_OPERATION.key}" "SELECT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
}
Expand Down Expand Up @@ -163,8 +167,10 @@ class QueryTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_OPERATION.key}" "SELECT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(3) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_OPERATION.key}" String
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(3) {
Expand Down Expand Up @@ -149,8 +151,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^select /
"${SemanticAttributes.DB_OPERATION.key}" "SELECT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(3) {
Expand All @@ -167,8 +171,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_OPERATION.key}" String
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
}
Expand Down Expand Up @@ -281,8 +287,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_OPERATION.key}" String
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
}
Expand Down Expand Up @@ -353,8 +361,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" String
"${SemanticAttributes.DB_OPERATION.key}" "SELECT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(3) {
Expand Down Expand Up @@ -440,8 +450,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^insert /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^insert /
"${SemanticAttributes.DB_OPERATION.key}" "INSERT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(6) {
Expand All @@ -452,8 +464,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^delete /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^delete /
"${SemanticAttributes.DB_OPERATION.key}" "DELETE"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(7) {
Expand All @@ -478,8 +492,10 @@ class SessionTest extends AbstractHibernateTest {
"${SemanticAttributes.DB_SYSTEM.key}" "h2"
"${SemanticAttributes.DB_NAME.key}" "db1"
"${SemanticAttributes.DB_USER.key}" "sa"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^insert /
"${SemanticAttributes.DB_CONNECTION_STRING.key}" "h2:mem:"
"${SemanticAttributes.DB_STATEMENT.key}" ~/^insert /
"${SemanticAttributes.DB_OPERATION.key}" "INSERT"
"${SemanticAttributes.DB_SQL_TABLE.key}" "Value"
}
}
span(10) {
Expand Down
Loading

0 comments on commit 4758307

Please sign in to comment.