Skip to content

Commit

Permalink
Upgrade to otel java 1.19.0 (#6757)
Browse files Browse the repository at this point in the history
Working PR to capture all the changes required to update to otel java
1.19.0. The new log API force allows
`:instrumentation-appender-api-internal` and
`:instrumentation-appender-sdk-internal`, but necessitates a decent
amount of refactoring as a result.

The PR points at the `1.19.0-SNAPSHOT`, which I'll update upon
publication.

Co-authored-by: Mateusz Rzeszutek <[email protected]>
Co-authored-by: Trask Stalnaker <[email protected]>
Co-authored-by: Lauri Tulmin <[email protected]>
  • Loading branch information
4 people committed Oct 12, 2022
1 parent c5cd8d6 commit aeac361
Show file tree
Hide file tree
Showing 87 changed files with 699 additions and 999 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dependencies {
add("muzzleBootstrap", "io.opentelemetry.instrumentation:opentelemetry-instrumentation-api")
add("muzzleBootstrap", "io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-semconv")
add("muzzleBootstrap", "io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations-support")
add("muzzleBootstrap", "io.opentelemetry.instrumentation:opentelemetry-instrumentation-appender-api-internal")
add("muzzleTooling", "io.opentelemetry.javaagent:opentelemetry-javaagent-extension-api")
add("muzzleTooling", "io.opentelemetry.javaagent:opentelemetry-javaagent-tooling")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ configurations.configureEach {
substitute(module("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-semconv")).using(project(":instrumentation-api-semconv"))
substitute(module("io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations")).using(project(":instrumentation-annotations"))
substitute(module("io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations-support")).using(project(":instrumentation-annotations-support"))
substitute(module("io.opentelemetry.instrumentation:opentelemetry-instrumentation-appender-api-internal")).using(project(":instrumentation-appender-api-internal"))
substitute(module("io.opentelemetry.javaagent:opentelemetry-javaagent-bootstrap")).using(project(":javaagent-bootstrap"))
substitute(module("io.opentelemetry.javaagent:opentelemetry-javaagent-extension-api")).using(project(":javaagent-extension-api"))
substitute(module("io.opentelemetry.javaagent:opentelemetry-javaagent-tooling")).using(project(":javaagent-tooling"))
Expand Down
2 changes: 1 addition & 1 deletion dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ val dependencyVersions = hashMapOf<String, String>()
rootProject.extra["versions"] = dependencyVersions

// this line is managed by .github/scripts/update-sdk-version.sh
val otelVersion = "1.18.0"
val otelVersion = "1.19.0"

rootProject.extra["otelVersion"] = otelVersion

Expand Down
3 changes: 0 additions & 3 deletions docs/contributing/javaagent-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ The bootstrap class loader contains several modules:
* **The `instrumentation-annotations-support` module**:
it contains classes that provide support for annotation-based auto-instrumentation, e.g.
the `@WithSpan` annotation. This module is internal and its APIs are considered unstable.
* **The `instrumentation-appender-api-internal` module**:
it contains classes that constitute the "appender API", used by logging instrumentations. This
module is internal and its APIs are considered unstable.
* **The `io.opentelemetry.javaagent.bootstrap` package from the `javaagent-extension-api` module**:
this package contains several instrumentation utilities that are only usable when an application
is instrumented with the javaagent; for example, the `Java8BytecodeBridge` that should be used
Expand Down
1 change: 1 addition & 0 deletions examples/distro/agent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ tasks {
dependencies {
exclude("org.slf4j:slf4j-api")
exclude("io.opentelemetry:opentelemetry-api")
exclude("io.opentelemetry:opentelemetry-api-logs")
exclude("io.opentelemetry:opentelemetry-context")
exclude("io.opentelemetry:opentelemetry-semconv")
}
Expand Down
1 change: 1 addition & 0 deletions examples/distro/testing/agent-for-testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ tasks {
dependencies {
exclude("org.slf4j:slf4j-api")
exclude("io.opentelemetry:opentelemetry-api")
exclude("io.opentelemetry:opentelemetry-api-logs")
exclude("io.opentelemetry:opentelemetry-context")
exclude("io.opentelemetry:opentelemetry-semconv")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private static Set<AttributeKey> buildServerFallbackView() {
// the list of rpc server metrics attributes is from
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/rpc.md#attributes
Set<AttributeKey> view = new HashSet<>(alwaysInclude);
view.add(SemanticAttributes.NET_HOST_IP);
view.add(SemanticAttributes.NET_SOCK_HOST_ADDR);
view.add(SemanticAttributes.NET_TRANSPORT);
return view;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ void collectsMetrics() {
Attributes responseAttributes1 =
Attributes.builder()
.put(SemanticAttributes.NET_HOST_NAME, "example.com")
.put(SemanticAttributes.NET_HOST_IP, "127.0.0.1")
.put(SemanticAttributes.NET_SOCK_HOST_ADDR, "127.0.0.1")
.put(SemanticAttributes.NET_HOST_PORT, 8080)
.put(SemanticAttributes.NET_TRANSPORT, "ip_tcp")
.build();

Attributes responseAttributes2 =
Attributes.builder()
.put(SemanticAttributes.NET_HOST_IP, "127.0.0.1")
.put(SemanticAttributes.NET_SOCK_HOST_ADDR, "127.0.0.1")
.put(SemanticAttributes.NET_HOST_PORT, 8080)
.put(SemanticAttributes.NET_TRANSPORT, "ip_tcp")
.build();
Expand Down Expand Up @@ -120,7 +120,8 @@ void collectsMetrics() {
SemanticAttributes.RPC_SERVICE,
"myservice.EchoService"),
equalTo(SemanticAttributes.RPC_METHOD, "exampleMethod"),
equalTo(SemanticAttributes.NET_HOST_IP, "127.0.0.1"),
equalTo(
SemanticAttributes.NET_SOCK_HOST_ADDR, "127.0.0.1"),
equalTo(SemanticAttributes.NET_TRANSPORT, "ip_tcp")))));
}

Expand Down
13 changes: 0 additions & 13 deletions instrumentation-appender-api-internal/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit aeac361

Please sign in to comment.