diff --git a/loki/config.yaml b/loki/config.yaml index 4ce0b19..196aaaf 100644 --- a/loki/config.yaml +++ b/loki/config.yaml @@ -52,3 +52,12 @@ schema_config: ruler: alertmanager_url: http://localhost:9093 + +otlp_config: + resource_attributes: + log_attributes: + - action: index_label + attributes: + - component + - function + - endpoint diff --git a/otel-collector/config.yaml b/otel-collector/config.yaml index e97063f..82753df 100644 --- a/otel-collector/config.yaml +++ b/otel-collector/config.yaml @@ -26,16 +26,6 @@ receivers: processors: batch: # https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor - attributes: - actions: - - action: insert - key: loki.attribute.labels - value: [component, function, endpoint] - resource: - attributes: - - action: insert - key: loki.resource.labels - value: [host.name, service.name, service.namespace] exporters: otlp/tempo: @@ -84,5 +74,5 @@ service: - prometheusremotewrite/grafana_cloud_metrics logs: receivers: [otlp] - processors: [attributes, resource, batch] + processors: [batch] exporters: [otlphttp/loki, loki/grafana_cloud_logs]