Prepare 1.46.0 (#7007)

This commit is contained in:
jack-berg 2025-01-10 10:41:51 -06:00 committed by GitHub
parent 2e0b315ce6
commit 0920d11aec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 77 additions and 10 deletions

View File

@ -2,6 +2,39 @@
## Unreleased
### SDK
* Remove unused dependencies, cleanup code after stabilizing Value
([#6948](https://github.com/open-telemetry/opentelemetry-java/pull/6948))
* Explicitly allow null into CompletableResultCode.failExceptionally()
([#6963](https://github.com/open-telemetry/opentelemetry-java/pull/6963))
#### Traces
* Fix span setStatus
([#6990](https://github.com/open-telemetry/opentelemetry-java/pull/6990))
#### Logs
* Add getters/accessors for readable fields in ReadWriteLogRecord.
([#6924](https://github.com/open-telemetry/opentelemetry-java/pull/6924))
#### Exporters
* OTLP: Update to opentelemetry-proto 1.5
([#6999](https://github.com/open-telemetry/opentelemetry-java/pull/6999))
* Bugfix - OTLP: Ensure Serializer runtime exceptions are rethrown as IOException
([#6969](https://github.com/open-telemetry/opentelemetry-java/pull/6969))
* BREAKING - OTLP: Delete experimental OTLP authenticator concept.
See [OTLP authentication docs](https://opentelemetry.io/docs/languages/java/sdk/#authentication)
for supported solutions.
([#6984](https://github.com/open-telemetry/opentelemetry-java/pull/6984))
#### Extensions
* BREAKING - Autoconfigure: Remove support for deprecated otel.experimental.resource.disabled.keys
([#6931](https://github.com/open-telemetry/opentelemetry-java/pull/6931))
## Version 1.45.0 (2024-12-06)
### API

View File

@ -53,52 +53,86 @@ public interface ReadWriteLogRecord {
LogRecordData toLogRecordData();
/**
* Returns the value of a given attribute if it exists. This is the equivalent of calling
* getAttributes().get(key)
* Returns the value of a given attribute if it exists. This is the equivalent of calling {@code
* getAttributes().get(key)}.
*
* @since 1.46.0
*/
@Nullable
default <T> T getAttribute(AttributeKey<T> key) {
return toLogRecordData().getAttributes().get(key);
}
/** Returns the instrumentation scope that generated this log. */
/**
* Returns the instrumentation scope that generated this log.
*
* @since 1.46.0
*/
default InstrumentationScopeInfo getInstrumentationScopeInfo() {
return toLogRecordData().getInstrumentationScopeInfo();
}
/** Returns the timestamp at which the log record occurred, in epoch nanos. */
/**
* Returns the timestamp at which the log record occurred, in epoch nanos.
*
* @since 1.46.0
*/
default long getTimestampEpochNanos() {
return toLogRecordData().getTimestampEpochNanos();
}
/** Returns the timestamp at which the log record was observed, in epoch nanos. */
/**
* Returns the timestamp at which the log record was observed, in epoch nanos.
*
* @since 1.46.0
*/
default long getObservedTimestampEpochNanos() {
return toLogRecordData().getTimestampEpochNanos();
}
/** Return the span context for this log, or {@link SpanContext#getInvalid()} if unset. */
/**
* Return the span context for this log, or {@link SpanContext#getInvalid()} if unset.
*
* @since 1.46.0
*/
default SpanContext getSpanContext() {
return toLogRecordData().getSpanContext();
}
/** Returns the severity for this log, or {@link Severity#UNDEFINED_SEVERITY_NUMBER} if unset. */
/**
* Returns the severity for this log, or {@link Severity#UNDEFINED_SEVERITY_NUMBER} if unset.
*
* @since 1.46.0
*/
default Severity getSeverity() {
return toLogRecordData().getSeverity();
}
/** Returns the severity text for this log, or null if unset. */
/**
* Returns the severity text for this log, or null if unset.
*
* @since 1.46.0
*/
@Nullable
default String getSeverityText() {
return toLogRecordData().getSeverityText();
}
/** Returns the {@link Value} representation of the log body, of null if unset. */
/**
* Returns the {@link Value} representation of the log body, of null if unset.
*
* @since 1.46.0
*/
@Nullable
default Value<?> getBodyValue() {
return toLogRecordData().getBodyValue();
}
/** Returns the attributes for this log, or {@link Attributes#empty()} if unset. */
/**
* Returns the attributes for this log, or {@link Attributes#empty()} if unset.
*
* @since 1.46.0
*/
default Attributes getAttributes() {
return toLogRecordData().getAttributes();
}