From d1b04680ee2c398c774f3b7d68329dc3beae7356 Mon Sep 17 00:00:00 2001 From: Jack Berg Date: Thu, 8 Sep 2022 13:08:29 -0500 Subject: [PATCH 1/5] Add since annotations --- .../opentelemetry-exporter-jaeger-proto.txt | 2 -- .../exporter/zipkin/ZipkinSpanExporterBuilder.java | 1 + .../sdk/common/InstrumentationScopeInfo.java | 6 +++++- .../sdk/testing/assertj/AttributesAssert.java | 12 ++++++++++-- 4 files changed, 16 insertions(+), 5 deletions(-) delete mode 100644 docs/apidiffs/current_vs_latest/opentelemetry-exporter-jaeger-proto.txt diff --git a/docs/apidiffs/current_vs_latest/opentelemetry-exporter-jaeger-proto.txt b/docs/apidiffs/current_vs_latest/opentelemetry-exporter-jaeger-proto.txt deleted file mode 100644 index df26146497b..00000000000 --- a/docs/apidiffs/current_vs_latest/opentelemetry-exporter-jaeger-proto.txt +++ /dev/null @@ -1,2 +0,0 @@ -Comparing source compatibility of against -No changes. \ No newline at end of file diff --git a/exporters/zipkin/src/main/java/io/opentelemetry/exporter/zipkin/ZipkinSpanExporterBuilder.java b/exporters/zipkin/src/main/java/io/opentelemetry/exporter/zipkin/ZipkinSpanExporterBuilder.java index 81e70a6ad52..9e3731aff76 100644 --- a/exporters/zipkin/src/main/java/io/opentelemetry/exporter/zipkin/ZipkinSpanExporterBuilder.java +++ b/exporters/zipkin/src/main/java/io/opentelemetry/exporter/zipkin/ZipkinSpanExporterBuilder.java @@ -66,6 +66,7 @@ public ZipkinSpanExporterBuilder setEncoder(BytesEncoder encoder) { * * @param supplier - A supplier that returns an InetAddress that may be null. * @return this + * @since 1.18.0 */ public ZipkinSpanExporterBuilder setLocalIpAddressSupplier(Supplier supplier) { requireNonNull(supplier, "encoder"); diff --git a/sdk/common/src/main/java/io/opentelemetry/sdk/common/InstrumentationScopeInfo.java b/sdk/common/src/main/java/io/opentelemetry/sdk/common/InstrumentationScopeInfo.java index 0aab48f47e2..249840b05d6 100644 --- a/sdk/common/src/main/java/io/opentelemetry/sdk/common/InstrumentationScopeInfo.java +++ b/sdk/common/src/main/java/io/opentelemetry/sdk/common/InstrumentationScopeInfo.java @@ -77,7 +77,11 @@ public static InstrumentationScopeInfo empty() { @Nullable public abstract String getSchemaUrl(); - /** Returns the attributes of this instrumentation scope. */ + /** + * Returns the attributes of this instrumentation scope. + * + * @since 1.18.0 + */ public abstract Attributes getAttributes(); InstrumentationScopeInfo() {} diff --git a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/AttributesAssert.java b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/AttributesAssert.java index 5e438f34f45..9c3d346b10f 100644 --- a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/AttributesAssert.java +++ b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/AttributesAssert.java @@ -184,7 +184,11 @@ public AttributesAssert containsKey(String key) { return this; } - /** Asserts the attributes do not contain the given key. */ + /** + * Asserts the attributes do not contain the given key. + * + * @since 1.18.0 + */ public AttributesAssert doesNotContainKey(AttributeKey key) { if (actual.get(key) != null) { failWithMessage( @@ -194,7 +198,11 @@ public AttributesAssert doesNotContainKey(AttributeKey key) { return this; } - /** Asserts the attributes do not contain the given key. */ + /** + * Asserts the attributes do not contain the given key. + * + * @since 1.18.0 + */ public AttributesAssert doesNotContainKey(String key) { boolean containsKey = actual.asMap().keySet().stream() From 4ade776d43419eeaa58e569a4be9a5011b1395dc Mon Sep 17 00:00:00 2001 From: Jack Berg Date: Thu, 8 Sep 2022 13:59:32 -0500 Subject: [PATCH 2/5] Prepare changelog for 1.17.0 release --- CHANGELOG.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37e8acca8ac..da035310dee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,62 @@ ## Unreleased +### SDK + +* Added scope attributes to `InstrumentationScopeInfo` accessible + via `InstrumentationScopeInfo#getAttributes()`. Will add the ability to specify scope attributes + in Meter, Tracer, and Logger in a future version. +* BREAKING: Deprecate `InstrumentationScopeInfo#create(String, String, String)`. + Use `InstrumentationScopeInfo#builer(String).setVersion(String).setSchemaUrl(String).build()` + instead. +* Optimize `Resource#merge(Resource)` by returning early if the other resource is empty. + +#### Logs + +* Fix module name of `opentelemetry-sdk-logs` by changing + from `io.opentelemetry.sdk.extension.logging` to `io.opentelemetry.sdk.logs`. + +#### Testing + +* Add methods to assert attributes do not contain keys via `AttributeAssert#doesNotContainKey()`. + +#### Exporter + +* Added ability to specify local IP address in `ZipkinSpanExporter` + via `ZipkinSpanExporterBuilder#setLocalIpAddressSupplier(Supplier)`. +* Upgrade to OTLP protobuf version 0.19.0. +* OTLP exporters now serialize `InstrumentationScopeInfo#getAttributes()`. +* Stop publishing `opentelemetry-exporter-jaeger-proto`. The `opentelemetry-bom` will include a + constraint on the last published version `1.17.0`. If security issues are discovered, patches will + be published to `1.17.x`. + +#### SDK Extensions + +* BREAKING: `opentelemetry-sdk-extension-metric-incubator`, + `opentelemetry-sdk-extension-tracing-incubator`, and `opentelemetry-sdk-extension-zpages` merged + into `opentelemetry-sdk-extension-incubator`. +* BREAKING: Move `opentelemetry-sdk-extension-jfr-events` + to [opentelemetry-java-contrib/jfr-events](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/jfr-events). + It will now be published under the + coordinates `io.opentelemetry.contrib:opentelemetry-jfr-events:{version}`. +* BREAKING: Move `opentelemetry-extension-noop-api` + to [opentelemetry-java-contrib/noop-api](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/noop-api). + It will now be published under the + coordinates `io.opentelemetry.contrib:opentelemetry-noop-api:{version}`. +* Improve ECS resource detection to include `aws.ecs.container.arn`, `container.image.name`, + `container.image.tag`, `aws.ecs.container.image.id`, `aws.log.group.arns`, `aws.log.group.names`, + `aws.log.steam.names`, `aws.ecs.task.arn`, `aws.ecs.task.family`, and `aws.ecs.task.revision`. +* Fix resource `container.id` detection when using k8s with containerd v1.5.0+. +* Add experimental `ConditionalResourceProvider` SPI, for conditionally applying resource providers + based on current config and resource. + +### Micrometer shim + +* BREAKING: Move `opentelemetry-micrometer1-shim` + to [opentelemetry-java-instrumentation/instrumentation/micrometer/micrometer-1.5/library](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/micrometer/micrometer-1.5/library). + It will now be published under the + coordinates `io.opentelemetry.instrumentation:opentelemetry-micrometer-1.5:{version}`. + ## Version 1.17.0 (2022-08-12) ### API From bc32c7493d29324f6a689657685010f6602c793c Mon Sep 17 00:00:00 2001 From: Jack Berg Date: Thu, 8 Sep 2022 14:15:38 -0500 Subject: [PATCH 3/5] Spotless --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da035310dee..0b7080b3018 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,8 +37,8 @@ `opentelemetry-sdk-extension-tracing-incubator`, and `opentelemetry-sdk-extension-zpages` merged into `opentelemetry-sdk-extension-incubator`. * BREAKING: Move `opentelemetry-sdk-extension-jfr-events` - to [opentelemetry-java-contrib/jfr-events](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/jfr-events). - It will now be published under the + to [opentelemetry-java-contrib/jfr-events](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/jfr-events). + It will now be published under the coordinates `io.opentelemetry.contrib:opentelemetry-jfr-events:{version}`. * BREAKING: Move `opentelemetry-extension-noop-api` to [opentelemetry-java-contrib/noop-api](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/noop-api). From 273586bb4dc282bd6d2a4847207ded32fa8c8a7a Mon Sep 17 00:00:00 2001 From: Jack Berg Date: Fri, 9 Sep 2022 09:51:24 -0500 Subject: [PATCH 4/5] PR feedback --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b7080b3018..b565ef06e72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,9 @@ * Added scope attributes to `InstrumentationScopeInfo` accessible via `InstrumentationScopeInfo#getAttributes()`. Will add the ability to specify scope attributes in Meter, Tracer, and Logger in a future version. -* BREAKING: Deprecate `InstrumentationScopeInfo#create(String, String, String)`. - Use `InstrumentationScopeInfo#builer(String).setVersion(String).setSchemaUrl(String).build()` - instead. +* DEPRECATION: the `InstrumentationScopeInfo#create(String, String, String)` method has been + deprecated in favor of + `InstrumentationScopeInfo#builer(String).setVersion(String).setSchemaUrl(String).build()`. * Optimize `Resource#merge(Resource)` by returning early if the other resource is empty. #### Logs From 95dcf1b106432e196d76e67f305dff0c5d9d9d0d Mon Sep 17 00:00:00 2001 From: Jack Berg Date: Fri, 9 Sep 2022 09:56:05 -0500 Subject: [PATCH 5/5] Spotless --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b565ef06e72..5f55cf307d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ * Added scope attributes to `InstrumentationScopeInfo` accessible via `InstrumentationScopeInfo#getAttributes()`. Will add the ability to specify scope attributes in Meter, Tracer, and Logger in a future version. -* DEPRECATION: the `InstrumentationScopeInfo#create(String, String, String)` method has been +* DEPRECATION: The `InstrumentationScopeInfo#create(String, String, String)` method has been deprecated in favor of `InstrumentationScopeInfo#builer(String).setVersion(String).setSchemaUrl(String).build()`. * Optimize `Resource#merge(Resource)` by returning early if the other resource is empty.