Integrating with OpenTelemetry logs
The collection of OpenTelemetry logs is still under development and testing.
If the host agent receives the OpenTelemetry log data, it shows some minor exceptions. The OpenTelemetry logs are ingested to the Instana backend by using the following ways:
-
Send logs to the Instana backend
otlp-acceptor
directly with the OTLP protocol or through the OpenTelemetry Collector. -
Ingest logs with the Instana agent that collects the data for Instana.
Opentelemetry logs data model
In OpenTelemetry, a log record consists of the following fields:
Field name | Description |
---|---|
Timestamp | Time when the event occurred. |
ObservedTimestamp | Time when the event was observed. |
TraceId | Request trace ID. |
SpanId | Request span ID. |
TraceFlags | W3C trace flag. |
SeverityText | Severity text or log level. |
SeverityNumber | Numerical value of the severity. |
Body | Body of the log record. |
Resource | Describes the source of the log. |
InstrumentationScope | Describes the group of metrics, traces, or log records in the same feature or part of the resource that emitted the log. |
Attributes | Additional information about the event. |
Source: OpenTelemetry Log Record Definition
The following fields are used to transform OpenTelemetry log data for Instana:
- The TraceId, SpanId, and Body fields are incorporated without any alterations.
- The Timestamp field that is considered for logging is the timestamp during the ingestion of log records into Instana.
- The log level is determined primarily by the SeverityText field and the SeverityNumber field as a fallback. If no log level can be identified from the SeverityText and SeverityNumber fields, then the log level is set to
UNKNOWN
. - The Resource field is used to identify the entity, I/O stream, and host information associated with the log.
- The Attributes are supported as key-value pairs through the Custom Tags from Instana.
- The exception attributes
exception.type
,exception.message
, andexception.stacktrace
in the Attributes field are also supported in Instana.
However, the host information is mandatory for the Resource attribute to accept any OpenTelemetry logs in Instana.