From 43ac8fd930ccf374b4c9aa36d46375896ac2ca20 Mon Sep 17 00:00:00 2001 From: Kaveesh Dubey Date: Tue, 31 Oct 2023 12:29:31 -0700 Subject: [PATCH] try outputting otelcollector log to file --- .../collector-config-default.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/otelcollector/opentelemetry-collector-builder/collector-config-default.yml b/otelcollector/opentelemetry-collector-builder/collector-config-default.yml index 9f63a58be..b20ef3169 100644 --- a/otelcollector/opentelemetry-collector-builder/collector-config-default.yml +++ b/otelcollector/opentelemetry-collector-builder/collector-config-default.yml @@ -11,6 +11,8 @@ exporters: retry_on_failure: enabled: false timeout: 12s + file: + path: "/opt/microsoft/otelcollector/collector-log.json" # Set the desired output file path processors: batch: send_batch_size: 7000 @@ -37,8 +39,8 @@ service: pipelines: metrics: receivers: [prometheus] - exporters: [otlp] - processors: [batch,resource] + exporters: [otlp, file] # Include the "file" exporter in the list + processors: [batch, resource] telemetry: logs: level: warn