Package io.opentelemetry.sdk.logs.data
Interface LogData
@Immutable
public interface LogData
Log definition as described in OpenTelemetry
Log Data Model.
-
Method Summary
Modifier and TypeMethodDescriptionio.opentelemetry.api.common.AttributesReturns the attributes for this log, orAttributes.empty()if unset.getBody()Returns the body for this log, orBody.empty()if unset.longReturns the epoch timestamp in nanos when the log was recorded.io.opentelemetry.sdk.common.InstrumentationLibraryInfoReturns the instrumentation library that generated this log.getName()Returns the name for this log, or null if unset.io.opentelemetry.sdk.resources.ResourceReturns the resource of this log.Returns the severity for this log, orSeverity.UNDEFINED_SEVERITY_NUMBERif unset.Returns the severity text for this log, or null if unset.io.opentelemetry.api.trace.SpanContextReturn the span context for this log, orSpanContext.getInvalid()if unset.
-
Method Details
-
getResource
io.opentelemetry.sdk.resources.Resource getResource()Returns the resource of this log. -
getInstrumentationLibraryInfo
io.opentelemetry.sdk.common.InstrumentationLibraryInfo getInstrumentationLibraryInfo()Returns the instrumentation library that generated this log. -
getEpochNanos
long getEpochNanos()Returns the epoch timestamp in nanos when the log was recorded. -
getSpanContext
io.opentelemetry.api.trace.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
Returns the severity text for this log, or null if unset. -
getName
Returns the name for this log, or null if unset. -
getBody
Body getBody()Returns the body for this log, orBody.empty()if unset. -
getAttributes
io.opentelemetry.api.common.Attributes getAttributes()Returns the attributes for this log, orAttributes.empty()if unset.
-