diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c02f898972..56c12a086f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,82 @@ ## Unreleased +### API + +#### Context + +* Apply limits to baggage entries for `W3CBaggagePropagator`, `OtTracePropagator`, `JaegerPropagator` + ([#8378](https://github.com/open-telemetry/opentelemetry-java/pull/8378)) + ### SDK +#### Traces + +* Avoid `parentContext` allocation on span start for the common case + ([#8332](https://github.com/open-telemetry/opentelemetry-java/pull/8332)) + +#### Metrics + +* Add `setMaxExportBatchSize` to `PeriodicMetricReaderBuilder` + ([#8296](https://github.com/open-telemetry/opentelemetry-java/pull/8296)) +* Fix `PeriodicMetricReader` shutdown race that could drop the final flush + ([#8299](https://github.com/open-telemetry/opentelemetry-java/pull/8299)) + +#### Exporters + +* **BREAKING** Prometheus: Change default server host from `0.0.0.0` to `localhost` + ([#8298](https://github.com/open-telemetry/opentelemetry-java/pull/8298)) +* **BREAKING** Prometheus: Stop converting unit `"1"` to `"ratio"` + ([#8252](https://github.com/open-telemetry/opentelemetry-java/pull/8252)) +* OTLP: Fix null input handling in `StringEncoder` + ([#8312](https://github.com/open-telemetry/opentelemetry-java/pull/8312)) +* OTLP: Align proto field types and wire tag names in marshalers + ([#8293](https://github.com/open-telemetry/opentelemetry-java/pull/8293)) +* OTLP: Fix `MarshalerUtil` `sizeRepeatedString` calculation + ([#8284](https://github.com/open-telemetry/opentelemetry-java/pull/8284)) +* OTLP: Bound `JdkHttpSender` thread pool size to prevent unbounded thread creation + ([#8276](https://github.com/open-telemetry/opentelemetry-java/pull/8276)) +* OTLP Profiles: Split profiles data model into separate `sdk-profiles` and JFR shim modules + ([#8207](https://github.com/open-telemetry/opentelemetry-java/pull/8207)) +* OTLP Profiles: Publish alpha release of `opentelemetry-sdk-profiles` and + `opentelemetry-exporter-otlp-profiles` + ([#8351](https://github.com/open-telemetry/opentelemetry-java/pull/8351)) + +#### Extensions + +* **BREAKING** Declarative config: Extract to new `opentelemetry-sdk-extension-declarative-config` + artifact with new package `io.opentelemetry.sdk.autoconfigure.declarativeconfig` + ([#8265](https://github.com/open-telemetry/opentelemetry-java/pull/8265)) +* Autoconfigure: Add file size validation in `OtlpConfigUtil` to avoid unsafe cast to `int` + ([#8287](https://github.com/open-telemetry/opentelemetry-java/pull/8287)) +* Declarative config: Fix collection fields to not be initialized to empty by default + ([#8356](https://github.com/open-telemetry/opentelemetry-java/pull/8356)) +* Incubator: Add `EventToSpanEventBridge` to bridge log-based events to span events + ([#8372](https://github.com/open-telemetry/opentelemetry-java/pull/8372)) + #### Testing +* Add `@Nullable` to `equalTo` value argument in `OpenTelemetryAssertions` + ([#8301](https://github.com/open-telemetry/opentelemetry-java/pull/8301)) * Add `hasValueSatisfying` to `LongPointAssert` and `DoublePointAssert` for fuzzy value matching + ([#8328](https://github.com/open-telemetry/opentelemetry-java/pull/8328)) * Add `containsPointsSatisfying` to metric data asserts for "each given assertion must be satisfied by at least one point, extras allowed" checks on sum, gauge, histogram, exponential histogram, and summary data + ([#8329](https://github.com/open-telemetry/opentelemetry-java/pull/8329)) + +### Project tooling + +* Add initial OSGi support + ([#7964](https://github.com/open-telemetry/opentelemetry-java/pull/7964)) +* Promote `ApiUsageLogger` to `opentelemetry-common` public API + ([#8318](https://github.com/open-telemetry/opentelemetry-java/pull/8318)) +* Establish exception logging guidelines and fix inconsistent patterns across exporters and SDK + ([#8231](https://github.com/open-telemetry/opentelemetry-java/pull/8231)) +* Add `*.impl.*` package naming convention for internal code with japicmp compatibility + ([#8325](https://github.com/open-telemetry/opentelemetry-java/pull/8325)) +* Add Sonatype dependency audit to build + ([#8365](https://github.com/open-telemetry/opentelemetry-java/pull/8365)) ## Version 1.61.0 (2026-04-10) @@ -20,8 +88,6 @@ #### Incubating -* Add support for configuring `setMaxExportBatchSize` in `PeriodicMetricReader` ([#8296](https://github.com/open-telemetry/opentelemetry-java/pull/8296)) - * **BREAKING** Update `EnvironmentGetter` and `EnvironmentSetter` key normalization to reflect spec changes ([#8233](https://github.com/open-telemetry/opentelemetry-java/pull/8233)) diff --git a/common/src/main/java/io/opentelemetry/common/impl/ApiUsageLogger.java b/common/src/main/java/io/opentelemetry/common/impl/ApiUsageLogger.java index 740c4d850f8..a16aa6dd0e2 100644 --- a/common/src/main/java/io/opentelemetry/common/impl/ApiUsageLogger.java +++ b/common/src/main/java/io/opentelemetry/common/impl/ApiUsageLogger.java @@ -25,6 +25,8 @@ * *

This class is not intended for use by application developers. Its API is stable and will not * be changed or removed in a backwards-incompatible manner. + * + * @since 1.62.0 */ public final class ApiUsageLogger { diff --git a/docs/knowledge/api-design.md b/docs/knowledge/api-design.md index ffe168089c2..1299646468d 100644 --- a/docs/knowledge/api-design.md +++ b/docs/knowledge/api-design.md @@ -80,7 +80,7 @@ unambiguously. ### Runtime / instrumentation-time boundaries (Span methods, metric recordings, log builders) Do **not** throw. Log the violation via -[`ApiUsageLogger`](../../common/src/main/java/io/opentelemetry/common/ApiUsageLogger.java) — +[`ApiUsageLogger`](../../common/src/main/java/io/opentelemetry/common/impl/ApiUsageLogger.java) — which logs at `FINEST` with a stack trace so the offending call site is visible — then degrade gracefully (return `this`, an empty/noop result, or substitute a safe default such as `Attributes.empty()` or `Context.current()`): diff --git a/docs/knowledge/build.md b/docs/knowledge/build.md index 767b5041fa9..a041a1dbbb4 100644 --- a/docs/knowledge/build.md +++ b/docs/knowledge/build.md @@ -25,7 +25,7 @@ All tasks can be scoped to a single module by prefixing with the module path: `./gradlew build` and `./gradlew check` both depend on the `jApiCmp` task, which compares the locally-built jars against the latest release and writes diffs to `docs/apidiffs/current_vs_latest/`. -Include any changes to those files in your PR. See [api-stability.md](api-stability.md#japicmp) +Include any changes to those files in your PR. See [api-design.md](api-design.md#japicmp) for details. If your branch is not up to date with `main`, `jApiCmp` may produce a diff that reflects changes diff --git a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoubleGaugeAssert.java b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoubleGaugeAssert.java index 3144fd4232b..99c81429861 100644 --- a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoubleGaugeAssert.java +++ b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoubleGaugeAssert.java @@ -50,6 +50,8 @@ public DoubleGaugeAssert hasPointsSatisfying( * Asserts that for each given assertion, at least one point in the gauge satisfies it. Extra * points that match none of the assertions are allowed, and a single point may satisfy multiple * assertions. + * + * @since 1.62.0 */ @SafeVarargs @SuppressWarnings("varargs") @@ -62,6 +64,8 @@ public final DoubleGaugeAssert containsPointsSatisfying( * Asserts that for each given assertion, at least one point in the gauge satisfies it. Extra * points that match none of the assertions are allowed, and a single point may satisfy multiple * assertions. + * + * @since 1.62.0 */ public DoubleGaugeAssert containsPointsSatisfying( Iterable> assertions) { diff --git a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoublePointAssert.java b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoublePointAssert.java index 75ad10152bb..9513b23f1f1 100644 --- a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoublePointAssert.java +++ b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoublePointAssert.java @@ -34,7 +34,11 @@ public DoublePointAssert hasValue(double expected) { return this; } - /** Asserts the point's value satisfies the given assertion. */ + /** + * Asserts the point's value satisfies the given assertion. + * + * @since 1.62.0 + */ public DoublePointAssert hasValueSatisfying(Consumer> valueAssertion) { isNotNull(); valueAssertion.accept(Assertions.assertThat(actual.getValue()).as("value")); diff --git a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoubleSumAssert.java b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoubleSumAssert.java index 2007831b062..06aa6a23092 100644 --- a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoubleSumAssert.java +++ b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoubleSumAssert.java @@ -93,6 +93,8 @@ public DoubleSumAssert hasPointsSatisfying( * Asserts that for each given assertion, at least one point in the sum satisfies it. Extra points * that match none of the assertions are allowed, and a single point may satisfy multiple * assertions. + * + * @since 1.62.0 */ @SafeVarargs @SuppressWarnings("varargs") @@ -104,6 +106,8 @@ public final DoubleSumAssert containsPointsSatisfying(Consumer> assertions) { diff --git a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/ExponentialHistogramAssert.java b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/ExponentialHistogramAssert.java index 4dd06fc22c9..19c75c650e8 100644 --- a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/ExponentialHistogramAssert.java +++ b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/ExponentialHistogramAssert.java @@ -79,6 +79,8 @@ public ExponentialHistogramAssert hasPointsSatisfying( * Asserts that for each given assertion, at least one point in the exponential histogram * satisfies it. Extra points that match none of the assertions are allowed, and a single point * may satisfy multiple assertions. + * + * @since 1.62.0 */ @SafeVarargs @SuppressWarnings("varargs") @@ -91,6 +93,8 @@ public final ExponentialHistogramAssert containsPointsSatisfying( * Asserts that for each given assertion, at least one point in the exponential histogram * satisfies it. Extra points that match none of the assertions are allowed, and a single point * may satisfy multiple assertions. + * + * @since 1.62.0 */ public ExponentialHistogramAssert containsPointsSatisfying( Iterable> assertions) { diff --git a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/HistogramAssert.java b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/HistogramAssert.java index 3bd20083770..bff71e00771 100644 --- a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/HistogramAssert.java +++ b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/HistogramAssert.java @@ -77,6 +77,8 @@ public HistogramAssert hasPointsSatisfying( * Asserts that for each given assertion, at least one point in the histogram satisfies it. Extra * points that match none of the assertions are allowed, and a single point may satisfy multiple * assertions. + * + * @since 1.62.0 */ @SafeVarargs @SuppressWarnings("varargs") @@ -89,6 +91,8 @@ public final HistogramAssert containsPointsSatisfying( * Asserts that for each given assertion, at least one point in the histogram satisfies it. Extra * points that match none of the assertions are allowed, and a single point may satisfy multiple * assertions. + * + * @since 1.62.0 */ public HistogramAssert containsPointsSatisfying( Iterable> assertions) { diff --git a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongGaugeAssert.java b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongGaugeAssert.java index d470775f6bc..dbaea3becf6 100644 --- a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongGaugeAssert.java +++ b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongGaugeAssert.java @@ -49,6 +49,8 @@ public LongGaugeAssert hasPointsSatisfying( * Asserts that for each given assertion, at least one point in the gauge satisfies it. Extra * points that match none of the assertions are allowed, and a single point may satisfy multiple * assertions. + * + * @since 1.62.0 */ @SafeVarargs @SuppressWarnings("varargs") @@ -60,6 +62,8 @@ public final LongGaugeAssert containsPointsSatisfying(Consumer. * Asserts that for each given assertion, at least one point in the gauge satisfies it. Extra * points that match none of the assertions are allowed, and a single point may satisfy multiple * assertions. + * + * @since 1.62.0 */ public LongGaugeAssert containsPointsSatisfying( Iterable> assertions) { diff --git a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongPointAssert.java b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongPointAssert.java index 88c12059c1c..7d4b988e90e 100644 --- a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongPointAssert.java +++ b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongPointAssert.java @@ -32,7 +32,11 @@ public LongPointAssert hasValue(long expected) { return this; } - /** Asserts the point's value satisfies the given assertion. */ + /** + * Asserts the point's value satisfies the given assertion. + * + * @since 1.62.0 + */ public LongPointAssert hasValueSatisfying(Consumer> valueAssertion) { isNotNull(); valueAssertion.accept(assertThat(actual.getValue()).as("value")); diff --git a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongSumAssert.java b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongSumAssert.java index 767ecc5f633..bfa2deaf750 100644 --- a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongSumAssert.java +++ b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongSumAssert.java @@ -92,6 +92,8 @@ public LongSumAssert hasPointsSatisfying( * Asserts that for each given assertion, at least one point in the sum satisfies it. Extra points * that match none of the assertions are allowed, and a single point may satisfy multiple * assertions. + * + * @since 1.62.0 */ @SafeVarargs @SuppressWarnings("varargs") @@ -103,6 +105,8 @@ public final LongSumAssert containsPointsSatisfying(Consumer... * Asserts that for each given assertion, at least one point in the sum satisfies it. Extra points * that match none of the assertions are allowed, and a single point may satisfy multiple * assertions. + * + * @since 1.62.0 */ public LongSumAssert containsPointsSatisfying( Iterable> assertions) { diff --git a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/SummaryAssert.java b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/SummaryAssert.java index cc902b403dc..600e280e560 100644 --- a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/SummaryAssert.java +++ b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/SummaryAssert.java @@ -57,6 +57,8 @@ public SummaryAssert hasPointsSatisfying( * Asserts that for each given assertion, at least one point in the summary satisfies it. Extra * points that match none of the assertions are allowed, and a single point may satisfy multiple * assertions. + * + * @since 1.62.0 */ @SafeVarargs @SuppressWarnings("varargs") @@ -68,6 +70,8 @@ public final SummaryAssert containsPointsSatisfying(Consumer * Asserts that for each given assertion, at least one point in the summary satisfies it. Extra * points that match none of the assertions are allowed, and a single point may satisfy multiple * assertions. + * + * @since 1.62.0 */ public SummaryAssert containsPointsSatisfying( Iterable> assertions) {