From 67fcea3846eb18753935c35edd0b94e32df563df Mon Sep 17 00:00:00 2001 From: jack-berg <34418638+jack-berg@users.noreply.github.com> Date: Fri, 10 May 2024 10:06:14 -0500 Subject: [PATCH] Prepare for 1.38.0 release (#6441) Co-authored-by: Trask Stalnaker --- CHANGELOG.md | 83 +++++++++++++++++++ .../api/metrics/DoubleGauge.java | 6 +- .../api/metrics/DoubleGaugeBuilder.java | 1 + .../opentelemetry/api/metrics/LongGauge.java | 6 +- .../api/metrics/LongGaugeBuilder.java | 1 + .../io/opentelemetry/sdk/common/Clock.java | 2 + .../sdk/metrics/InstrumentType.java | 4 + .../AggregationTemporalitySelector.java | 2 + .../export/DefaultAggregationSelector.java | 2 + .../opentelemetry/sdk/trace/ReadableSpan.java | 1 + 10 files changed, 106 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e7f629103b..f6c156536d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,89 @@ ## Unreleased +### API + +* Stabilize synchronous gauge + ([#6419](https://github.com/open-telemetry/opentelemetry-java/pull/6419)) + +#### Incubator + +* Add put(AttributeKey, T) overload to EventBuilder + ([#6331](https://github.com/open-telemetry/opentelemetry-java/pull/6331)) + +#### Baggage + +* Baggage filters space-only keys + ([#6431](https://github.com/open-telemetry/opentelemetry-java/pull/6431)) + +### SDK + +* Add experimental scope config to enable / disable scopes (i.e. meter, logger, tracer) + ([#6375](https://github.com/open-telemetry/opentelemetry-java/pull/6375)) + +#### Traces + +* Add ReadableSpan#getAttributes + ([#6382](https://github.com/open-telemetry/opentelemetry-java/pull/6382)) +* Use standard ArrayList size rather than max number of links for initial span links allocation + ([#6252](https://github.com/open-telemetry/opentelemetry-java/pull/6252)) + +#### Metrics + +* Use low precision Clock#now when computing timestamp for exemplars + ([#6417](https://github.com/open-telemetry/opentelemetry-java/pull/6417)) +* Update invalid instrument name log message now that forward slash `/` is valid + ([#6343](https://github.com/open-telemetry/opentelemetry-java/pull/6343)) + +#### Exporters + +* Introduce low allocation OTLP marshalers. If using autoconfigure, opt in + via `OTEL_JAVA_EXPERIMENTAL_EXPORTER_MEMORY_MODE=REUSABLE_DATA`. + * Low allocation OTLP logs marshaler + ([#6429](https://github.com/open-telemetry/opentelemetry-java/pull/6429)) + * Low allocation OTLP metrics marshaler + ([#6422](https://github.com/open-telemetry/opentelemetry-java/pull/6422)) + * Low allocation OTLP trace marshaler + ([#6410](https://github.com/open-telemetry/opentelemetry-java/pull/6410)) + * Add memory mode support to OTLP exporters + ([#6430](https://github.com/open-telemetry/opentelemetry-java/pull/6430)) + * Marshal span status description without allocation + ([#6423](https://github.com/open-telemetry/opentelemetry-java/pull/6423)) + * Add private constructors for stateless marshalers + ([#6434](https://github.com/open-telemetry/opentelemetry-java/pull/6434)) +* Mark opentelemetry-exporter-sender-jdk stable + ([#6357](https://github.com/open-telemetry/opentelemetry-java/pull/6357)) +* PrometheusHttpServer prevent concurrent reads when reusable memory mode + ([#6371](https://github.com/open-telemetry/opentelemetry-java/pull/6371)) +* Ignore TLS components (SSLContext, TrustManager, KeyManager) if plain HTTP protocol is used for + exporting + ([#6329](https://github.com/open-telemetry/opentelemetry-java/pull/6329)) +* Add is_remote_parent span flags to OTLP exported Spans and SpanLinks + ([#6388](https://github.com/open-telemetry/opentelemetry-java/pull/6388)) +* Add missing fields to OTLP metric exporters `toString()` + ([#6402](https://github.com/open-telemetry/opentelemetry-java/pull/6402)) + +#### Extensions + +* Rename otel.config.file to otel.experimental.config.file for autoconfigure + ([#6396](https://github.com/open-telemetry/opentelemetry-java/pull/6396)) + +### OpenCensus Shim + +* Fix opencensus shim spanBuilderWithRemoteParent behavior + ([#6415](https://github.com/open-telemetry/opentelemetry-java/pull/6415)) + +### Tooling + +* Add additional API incubator docs + ([#6356](https://github.com/open-telemetry/opentelemetry-java/pull/6356)) +* Run build on java 21 + ([#6370](https://github.com/open-telemetry/opentelemetry-java/pull/6370)) +* Fix running tests with java 8 on macos + ([#6411](https://github.com/open-telemetry/opentelemetry-java/pull/6411)) +* Move away from deprecated gradle enterprise APIs + ([#6363](https://github.com/open-telemetry/opentelemetry-java/pull/6363)) + ## Version 1.37.0 (2024-04-05) **NOTICE:** This release contains a significant restructuring of the experimental event API and the API incubator artifact. Please read the notes in the `API -> Incubator` section carefully. diff --git a/api/all/src/main/java/io/opentelemetry/api/metrics/DoubleGauge.java b/api/all/src/main/java/io/opentelemetry/api/metrics/DoubleGauge.java index ee42b44aa7f..a755ff25b16 100644 --- a/api/all/src/main/java/io/opentelemetry/api/metrics/DoubleGauge.java +++ b/api/all/src/main/java/io/opentelemetry/api/metrics/DoubleGauge.java @@ -9,7 +9,11 @@ import io.opentelemetry.context.Context; import javax.annotation.concurrent.ThreadSafe; -/** A gauge instrument that synchronously records {@code double} values. */ +/** + * A gauge instrument that synchronously records {@code double} values. + * + * @since 1.38.0 + */ @ThreadSafe public interface DoubleGauge { /** diff --git a/api/all/src/main/java/io/opentelemetry/api/metrics/DoubleGaugeBuilder.java b/api/all/src/main/java/io/opentelemetry/api/metrics/DoubleGaugeBuilder.java index 98e4855d220..b0ea8b939fa 100644 --- a/api/all/src/main/java/io/opentelemetry/api/metrics/DoubleGaugeBuilder.java +++ b/api/all/src/main/java/io/opentelemetry/api/metrics/DoubleGaugeBuilder.java @@ -77,6 +77,7 @@ default ObservableDoubleMeasurement buildObserver() { * the value of the last recorded measurement is exported. * * @return The DoubleGauge instrument. + * @since 1.38.0 */ default DoubleGauge build() { return DefaultMeter.getInstance().gaugeBuilder("noop").build(); diff --git a/api/all/src/main/java/io/opentelemetry/api/metrics/LongGauge.java b/api/all/src/main/java/io/opentelemetry/api/metrics/LongGauge.java index 22b940eaa9f..018f60e323b 100644 --- a/api/all/src/main/java/io/opentelemetry/api/metrics/LongGauge.java +++ b/api/all/src/main/java/io/opentelemetry/api/metrics/LongGauge.java @@ -9,7 +9,11 @@ import io.opentelemetry.context.Context; import javax.annotation.concurrent.ThreadSafe; -/** A gauge instrument that synchronously records {@code long} values. */ +/** + * A gauge instrument that synchronously records {@code long} values. + * + * @since 1.38.0 + */ @ThreadSafe public interface LongGauge { /** diff --git a/api/all/src/main/java/io/opentelemetry/api/metrics/LongGaugeBuilder.java b/api/all/src/main/java/io/opentelemetry/api/metrics/LongGaugeBuilder.java index 7c0fd0e0af2..f33c53155e7 100644 --- a/api/all/src/main/java/io/opentelemetry/api/metrics/LongGaugeBuilder.java +++ b/api/all/src/main/java/io/opentelemetry/api/metrics/LongGaugeBuilder.java @@ -74,6 +74,7 @@ default ObservableLongMeasurement buildObserver() { * the value of the last recorded measurement is exported. * * @return The LongGauge instrument. + * @since 1.38.0 */ default LongGauge build() { return DefaultMeter.getInstance().gaugeBuilder("noop").ofLongs().build(); diff --git a/sdk/common/src/main/java/io/opentelemetry/sdk/common/Clock.java b/sdk/common/src/main/java/io/opentelemetry/sdk/common/Clock.java index 44a5e02eee6..dab812ebe3b 100644 --- a/sdk/common/src/main/java/io/opentelemetry/sdk/common/Clock.java +++ b/sdk/common/src/main/java/io/opentelemetry/sdk/common/Clock.java @@ -50,6 +50,8 @@ static Clock getDefault() { * ns precision is possible in java 8, regardless of the value of {@code highPrecision}. * *

See {@link #now()} javadoc for details on usage. + * + * @since 1.38.0 */ default long now(boolean highPrecision) { return now(); diff --git a/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/InstrumentType.java b/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/InstrumentType.java index b876d00cf56..6b87ce20c9c 100644 --- a/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/InstrumentType.java +++ b/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/InstrumentType.java @@ -10,6 +10,7 @@ * * @since 1.14.0 */ +@SuppressWarnings({"MissingSummary", "SummaryJavadoc"}) public enum InstrumentType { COUNTER, UP_DOWN_COUNTER, @@ -17,5 +18,8 @@ public enum InstrumentType { OBSERVABLE_COUNTER, OBSERVABLE_UP_DOWN_COUNTER, OBSERVABLE_GAUGE, + /** + * @since 1.38.0 + */ GAUGE, } diff --git a/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/export/AggregationTemporalitySelector.java b/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/export/AggregationTemporalitySelector.java index 0d0e4a85625..f50e2bc5676 100644 --- a/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/export/AggregationTemporalitySelector.java +++ b/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/export/AggregationTemporalitySelector.java @@ -81,6 +81,8 @@ static AggregationTemporalitySelector lowMemory() { /** * Returns a string representation of this selector, for using in {@link Object#toString()} * implementations. + * + * @since 1.38.0 */ static String asString(AggregationTemporalitySelector selector) { StringJoiner joiner = new StringJoiner(", ", "AggregationTemporalitySelector{", "}"); diff --git a/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/export/DefaultAggregationSelector.java b/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/export/DefaultAggregationSelector.java index 86a33440fc0..d6d3058abd9 100644 --- a/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/export/DefaultAggregationSelector.java +++ b/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/export/DefaultAggregationSelector.java @@ -64,6 +64,8 @@ default DefaultAggregationSelector with(InstrumentType instrumentType, Aggregati /** * Returns a string representation of this selector, for using in {@link Object#toString()} * implementations. + * + * @since 1.38.0 */ static String asString(DefaultAggregationSelector selector) { StringJoiner joiner = new StringJoiner(", ", "DefaultAggregationSelector{", "}"); diff --git a/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/ReadableSpan.java b/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/ReadableSpan.java index f59b87599c1..5e6ef1cf962 100644 --- a/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/ReadableSpan.java +++ b/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/ReadableSpan.java @@ -124,6 +124,7 @@ default InstrumentationScopeInfo getInstrumentationScopeInfo() { * #getAttribute(AttributeKey)}. * * @return the Span attributes, or {@link Attributes#empty()} if the span has no attributes. + * @since 1.38.0 */ default Attributes getAttributes() { return Attributes.empty();