Dynatrace enables you to transform logs ingested via OneAgent.
During log ingest via OneAgent, the severity of logs is determined.
By default, the log event severity is detected through a keyword search performed on the first 100 characters of the log content, within the first two lines of text.
To adjust these limits
There are 19 keywords that correspond with 9 severity levels as per the table below:
Keyword
Severity level
trace
DEBUG
debug
DEBUG
fine
DEBUG
finer
DEBUG
finest
DEBUG
notice
NOTICE
info
INFO
information
INFO
warn
WARN
warning
WARN
severe_warning
WARN
severe
SEVERE
err
ERROR
error
ERROR
crit
CRITICAL
critical
CRITICAL
alert
ALERT
fatal
EMERGENCY
emerg
EMERGENCY
A match occurs and severity is determined when
[error]{error}{{error}}<error>Additionally, for each log event, a status attribute is created with a value that is a sum of loglevel values based on the following grouping:
Included loglevel values
Combined status attribute value
SEVERE, ERROR, CRITICAL, ALERT, FATAL, EMERGENCY
ERROR
WARN
WARN
INFO, TRACE, DEBUG, NOTICE
INFO
NONE
NONE
For example:
The level severity key in the generic log ingestion API request parameter contains the value serious.
level severity key is transformed into the loglevel attribute with the serious value mapped to SEVERE based on the above table.loglevel attribute containing the SEVERE value is grouped into status attribute. Based on the grouping table above, the status attribute will contain the ERROR value.ERRORSEVEREDuring the log ingestion via OneAgent, the following attributes are added automatically:
container.namecontainer.image.namecontainer.iddt.host_group.iddt.kubernetes.cluster.iddt.kubernetes.cluster.namedt.kubernetes.node.system_uuiddt.process.nameevent.typehost.namek8s.cluster.namek8s.namespace.namek8s.pod.namek8s.pod.uidk8s.container.namek8s.deployment.namelog.iostreamloglevellog.sourceprocess.technologyspan_idstatustrace_idweb_server.iis.site_idweb_server.iis.site_nameweb_server.iis.application_pooldt.entity.cloud_applicationdt.entity.cloud_application_instancedt.entity.cloud_application_namespacedt.entity.container_groupdt.entity.container_group_instancedt.entity.hostdt.entity.kubernetes_clusterdt.entity.kubernetes_nodedt.entity.process_groupdt.entity.process_group_instancedt.source_entityAll log entries are enriched with host-level resource attributes, such as host tags, cloud attributes, Kubernetes attributes, and more.
For more details and the full list of host-level attributes, see Resource attributes.
Kubernetes-specific metadata enrichment is described in Metadata enrichment of all telemetry originating from Kubernetes workloads.
OneAgent automatically extract attributes found in form [!dt key1=value1, key2=value2] and the section itself is removed from content.
For instance:
127.0.0.1 - [21/Oct/2021:10:33:28 +0200] GET /index.htm HTTP/1.1 404 597 [!dt dt.trace_id=aa764ee37ebaa764ee37eaa764ee37e, dt.span_id=b93ede8b93ede8]
will result in additional dt.trace_id and dt.span_id attributes for log record and actuall content sent will be:
127.0.0.1 - [21/Oct/2021:10:33:28 +0200] GET /index.htm HTTP/1.1 404 597