Skip to content

Commit fbdb906

Browse files
authored
Prepare 1.42.0 (#6688)
1 parent f85a57b commit fbdb906

File tree

8 files changed

+101
-4
lines changed

8 files changed

+101
-4
lines changed

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,58 @@
22

33
## Unreleased
44

5+
### API
6+
7+
* BREAKING: Stabilize log support for AnyValue bodies. Rename `AnyValue` to `Value`, promote
8+
from `opentelemetry-api-incubator` to `opentelemetry-api`, change package
9+
from `io.opentelemetry.api.incubator.logs` to `io.opentelemetry.api.common`.
10+
([#6591](https://github.com/open-telemetry/opentelemetry-java/pull/6591))
11+
* Noop implementations detect when `opentelemetry-api-incubator` is present and return extended noop
12+
implementations.
13+
([#6617](https://github.com/open-telemetry/opentelemetry-java/pull/6617))%
14+
15+
### SDK
16+
17+
#### Traces
18+
19+
* Added experimental support for SpanProcessor OnEnding callback
20+
([#6367](https://github.com/open-telemetry/opentelemetry-java/pull/6367))
21+
* Remove final modifier from SdkTracer.tracerEnabled
22+
([#6687](https://github.com/open-telemetry/opentelemetry-java/pull/6687))
23+
24+
#### Exporters
25+
26+
* Suppress zipkin exporter instrumentation
27+
([#6552](https://github.com/open-telemetry/opentelemetry-java/pull/6552))
28+
* OTLP exporters return status code exceptions via CompletableResultCode in GrpcExporter and
29+
HttpExporter.
30+
([#6645](https://github.com/open-telemetry/opentelemetry-java/pull/6645))
31+
* Align GrpcSender contract with HttpSender
32+
([#6658](https://github.com/open-telemetry/opentelemetry-java/pull/6658))
33+
34+
#### Extensions
35+
36+
* Add autoconfigure support for ns and us durations
37+
([#6654](https://github.com/open-telemetry/opentelemetry-java/pull/6654))
38+
* Add declarative configuration ComponentProvider support for resources
39+
([#6625](https://github.com/open-telemetry/opentelemetry-java/pull/6625))
40+
* Add declarative configuration ComponentProvider support for processors
41+
([#6623](https://github.com/open-telemetry/opentelemetry-java/pull/6623))
42+
* Add declarative configuration ComponentProvider support for samplers
43+
([#6494](https://github.com/open-telemetry/opentelemetry-java/pull/6494))
44+
* Add declarative configuration ComponentProvider support for propagators
45+
([#6624](https://github.com/open-telemetry/opentelemetry-java/pull/6624))
46+
* Add declarative configuration missing pieces
47+
([#6677](https://github.com/open-telemetry/opentelemetry-java/pull/6677))
48+
* Change jaeger remote sampler autoconfigure property from `pollingInterval` to `pollingIntervalMs`
49+
to match spec.
50+
([#6672](https://github.com/open-telemetry/opentelemetry-java/pull/6672))
51+
52+
#### Testing
53+
54+
* Add asserts for log record body fields
55+
([#6509](https://github.com/open-telemetry/opentelemetry-java/pull/6509))
56+
557
## Version 1.41.0 (2024-08-09)
658

759
### API

api/all/src/main/java/io/opentelemetry/api/common/KeyValue.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Key-value pair of {@link String} key and {@link Value} value.
1010
*
1111
* @see Value#of(KeyValue...)
12+
* @since 1.42.0
1213
*/
1314
public interface KeyValue {
1415

api/all/src/main/java/io/opentelemetry/api/common/Value.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* io.opentelemetry.api.logs.LogRecordBuilder#setBody(Value)}.
3333
*
3434
* @param <T> the type. See {@link #getValue()} for description of types.
35+
* @since 1.42.0
3536
*/
3637
public interface Value<T> {
3738

api/all/src/main/java/io/opentelemetry/api/common/ValueType.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* AnyValue type options, mirroring <a
1010
* href="https://github.com/open-telemetry/opentelemetry-proto/blob/ac3242b03157295e4ee9e616af53b81517b06559/opentelemetry/proto/common/v1/common.proto#L31">AnyValue#value
1111
* options</a>.
12+
*
13+
* @since 1.42.0
1214
*/
1315
public enum ValueType {
1416
STRING,

api/all/src/main/java/io/opentelemetry/api/logs/LogRecordBuilder.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ public interface LogRecordBuilder {
7474
*/
7575
LogRecordBuilder setBody(String body);
7676

77-
/** Set the body {@link Value}. */
77+
/**
78+
* Set the body {@link Value}.
79+
*
80+
* @since 1.42.0
81+
*/
7882
default LogRecordBuilder setBody(Value<?> body) {
7983
setBody(body.asString());
8084
return this;

sdk/logs/src/main/java/io/opentelemetry/sdk/logs/data/LogRecordData.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ public interface LogRecordData {
5959
@Deprecated
6060
Body getBody();
6161

62-
/** Returns the {@link Value} representation of the log body, of null if unset. */
62+
/**
63+
* Returns the {@link Value} representation of the log body, of null if unset.
64+
*
65+
* @since 1.42.0
66+
*/
6367
@Nullable
6468
@SuppressWarnings("deprecation") // Default impl uses deprecated code for backwards compatibility
6569
default Value<?> getBodyValue() {

sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LogRecordDataAssert.java

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ public LogRecordDataAssert hasBody(String body) {
160160
return hasBody(Value.of(body));
161161
}
162162

163-
/** Asserts the log has the given body. */
163+
/**
164+
* Asserts the log has the given body.
165+
*
166+
* @since 1.42.0
167+
*/
164168
public LogRecordDataAssert hasBody(@Nullable Value<?> body) {
165169
isNotNull();
166170
if (!Objects.equals(actual.getBodyValue(), body)) {
@@ -177,6 +181,8 @@ public LogRecordDataAssert hasBody(@Nullable Value<?> body) {
177181
/**
178182
* Asserts the log has a body of type {@link ValueType#KEY_VALUE_LIST}, containing a field with
179183
* the given {@code key} and String {@code value}.
184+
*
185+
* @since 1.42.0
180186
*/
181187
public LogRecordDataAssert hasBodyField(String key, String value) {
182188
return hasBodyField(key, Value.of(value));
@@ -185,6 +191,8 @@ public LogRecordDataAssert hasBodyField(String key, String value) {
185191
/**
186192
* Asserts the log has a body of type {@link ValueType#KEY_VALUE_LIST}, containing a field with
187193
* the given {@code key} and long {@code value}.
194+
*
195+
* @since 1.42.0
188196
*/
189197
public LogRecordDataAssert hasBodyField(String key, long value) {
190198
return hasBodyField(key, Value.of(value));
@@ -193,6 +201,8 @@ public LogRecordDataAssert hasBodyField(String key, long value) {
193201
/**
194202
* Asserts the log has a body of type {@link ValueType#KEY_VALUE_LIST}, containing a field with
195203
* the given {@code key} and double {@code value}.
204+
*
205+
* @since 1.42.0
196206
*/
197207
public LogRecordDataAssert hasBodyField(String key, double value) {
198208
return hasBodyField(key, Value.of(value));
@@ -201,6 +211,8 @@ public LogRecordDataAssert hasBodyField(String key, double value) {
201211
/**
202212
* Asserts the log has a body of type {@link ValueType#KEY_VALUE_LIST}, containing a field with
203213
* the given {@code key} and boolean {@code value}.
214+
*
215+
* @since 1.42.0
204216
*/
205217
public LogRecordDataAssert hasBodyField(String key, boolean value) {
206218
return hasBodyField(key, Value.of(value));
@@ -209,6 +221,8 @@ public LogRecordDataAssert hasBodyField(String key, boolean value) {
209221
/**
210222
* Asserts the log has a body of type {@link ValueType#KEY_VALUE_LIST}, containing a field with
211223
* the given {@code key} and list of String {@code value}s.
224+
*
225+
* @since 1.42.0
212226
*/
213227
public LogRecordDataAssert hasBodyField(String key, String... value) {
214228
List<Value<?>> values = new ArrayList<>(value.length);
@@ -221,6 +235,8 @@ public LogRecordDataAssert hasBodyField(String key, String... value) {
221235
/**
222236
* Asserts the log has a body of type {@link ValueType#KEY_VALUE_LIST}, containing a field with
223237
* the given {@code key} and list of long {@code value}s.
238+
*
239+
* @since 1.42.0
224240
*/
225241
public LogRecordDataAssert hasBodyField(String key, long... value) {
226242
List<Value<?>> values = new ArrayList<>(value.length);
@@ -233,6 +249,8 @@ public LogRecordDataAssert hasBodyField(String key, long... value) {
233249
/**
234250
* Asserts the log has a body of type {@link ValueType#KEY_VALUE_LIST}, containing a field with
235251
* the given {@code key} and list of double {@code value}s.
252+
*
253+
* @since 1.42.0
236254
*/
237255
public LogRecordDataAssert hasBodyField(String key, double... value) {
238256
List<Value<?>> values = new ArrayList<>(value.length);
@@ -245,6 +263,8 @@ public LogRecordDataAssert hasBodyField(String key, double... value) {
245263
/**
246264
* Asserts the log has a body of type {@link ValueType#KEY_VALUE_LIST}, containing a field with
247265
* the given {@code key} and list of boolean {@code value}s.
266+
*
267+
* @since 1.42.0
248268
*/
249269
public LogRecordDataAssert hasBodyField(String key, boolean... value) {
250270
List<Value<?>> values = new ArrayList<>(value.length);
@@ -257,6 +277,8 @@ public LogRecordDataAssert hasBodyField(String key, boolean... value) {
257277
/**
258278
* Asserts the log has a body of type {@link ValueType#KEY_VALUE_LIST}, containing a field with
259279
* the given {@code key} and {@code value}.
280+
*
281+
* @since 1.42.0
260282
*/
261283
@SuppressWarnings({"unchecked"})
262284
public LogRecordDataAssert hasBodyField(String key, Value<?> value) {
@@ -275,6 +297,8 @@ public LogRecordDataAssert hasBodyField(String key, Value<?> value) {
275297
/**
276298
* Asserts the log has a body of type {@link ValueType#KEY_VALUE_LIST}, containing a field with
277299
* the given attribute {@code key} and {@code value}.
300+
*
301+
* @since 1.42.0
278302
*/
279303
@SuppressWarnings({"unchecked"})
280304
public <T> LogRecordDataAssert hasBodyField(AttributeKey<T> key, T value) {

sdk/testing/src/main/java/io/opentelemetry/sdk/testing/logs/TestLogRecordData.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ public io.opentelemetry.sdk.logs.data.Body getBody() {
5151
: io.opentelemetry.sdk.logs.data.Body.string(valueBody.asString());
5252
}
5353

54+
/**
55+
* {@inheritDoc}
56+
*
57+
* @since 1.42.0
58+
*/
5459
@Override
5560
@Nullable
5661
public abstract Value<?> getBodyValue();
@@ -156,7 +161,11 @@ public Builder setBody(io.opentelemetry.sdk.logs.data.Body body) {
156161
return this;
157162
}
158163

159-
/** Set the body. */
164+
/**
165+
* Set the body.
166+
*
167+
* @since 1.42.0
168+
*/
160169
public abstract Builder setBodyValue(@Nullable Value<?> body);
161170

162171
/** Set the attributes. */

0 commit comments

Comments
 (0)