Package io.opentelemetry.sdk.logs.data
Interface LogRecordData
-
- All Known Implementing Classes:
AutoValue_SdkLogRecordData,SdkLogRecordData
@Immutable public interface LogRecordDataLog definition as described in OpenTelemetry Log Data Model.- Since:
- 1.27.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description AttributesgetAttributes()Returns the attributes for this log, orAttributes.empty()if unset.BodygetBody()Deprecated.UsegetBodyValue()instead.default Value<?>getBodyValue()Returns theValuerepresentation of the log body, of null if unset.InstrumentationScopeInfogetInstrumentationScopeInfo()Returns the instrumentation scope that generated this log.longgetObservedTimestampEpochNanos()Returns the timestamp at which the log record was observed, in epoch nanos.ResourcegetResource()Returns the resource of this log.SeveritygetSeverity()Returns the severity for this log, orSeverity.UNDEFINED_SEVERITY_NUMBERif unset.java.lang.StringgetSeverityText()Returns the severity text for this log, or null if unset.SpanContextgetSpanContext()Return the span context for this log, orSpanContext.getInvalid()if unset.longgetTimestampEpochNanos()Returns the timestamp at which the log record occurred, in epoch nanos.intgetTotalAttributeCount()Returns the total number of attributes that were recorded on this log.
-
-
-
Method Detail
-
getResource
Resource getResource()
Returns the resource of this log.
-
getInstrumentationScopeInfo
InstrumentationScopeInfo getInstrumentationScopeInfo()
Returns the instrumentation scope that generated this log.
-
getTimestampEpochNanos
long getTimestampEpochNanos()
Returns the timestamp at which the log record occurred, in epoch nanos.
-
getObservedTimestampEpochNanos
long getObservedTimestampEpochNanos()
Returns the timestamp at which the log record was observed, in epoch nanos.
-
getSpanContext
SpanContext getSpanContext()
Return the span context for this log, orSpanContext.getInvalid()if unset.
-
getSeverity
Severity getSeverity()
Returns the severity for this log, orSeverity.UNDEFINED_SEVERITY_NUMBERif unset.
-
getSeverityText
@Nullable java.lang.String getSeverityText()
Returns the severity text for this log, or null if unset.
-
getBody
@Deprecated Body getBody()
Deprecated.UsegetBodyValue()instead.Returns the body for this log, orBody.empty()if unset.If the body has been set to some
ValueTypeother thanValueType.STRING, this will return aBodywith a string representation of theValue.
-
getBodyValue
@Nullable default Value<?> getBodyValue()
Returns theValuerepresentation of the log body, of null if unset.- Since:
- 1.42.0
-
getAttributes
Attributes getAttributes()
Returns the attributes for this log, orAttributes.empty()if unset.
-
getTotalAttributeCount
int getTotalAttributeCount()
Returns the total number of attributes that were recorded on this log.This number may be larger than the number of attributes that are attached to this log, if the total number recorded was greater than the configured maximum value. See
LogLimits.getMaxNumberOfAttributes().
-
-