docs/sources/send-data/otel/_index.md
{{< docs/shared source="loki" lookup="otel.md" version="<LOKI_VERSION>">}}
Here are some example configs to change the default mapping of OTLP to Loki format:
limits_config:
otlp_config:
resource_attributes:
attributes_config:
- action: index_label
attributes:
- service.group
With the example config, here is how various kinds of Attributes would be stored:
service.group Resource Attribute as index labels.limits_config:
otlp_config:
resource_attributes:
ignore_defaults: true
attributes_config:
- action: index_label
regex: service.group
With the example config, here is how various kinds of Attributes would be stored:
service.group Resource Attribute as index labels.limits_config:
otlp_config:
resource_attributes:
attributes_config:
- action: index_label
regex: service.group
scope_attributes:
- action: drop
attributes:
- method.name
log_attributes:
- action: structured_metadata
attributes:
- user.id
- action: drop
regex: .*
With the example config, here is how various kinds of Attributes would be stored:
service.group Resource Attribute as index labels.method.name and store all other Scope Attributes as Structured Metadata.user.id as Structured Metadata and drop all other Log Attributes.