From ef36db54c26e89bcc9e7c5a8d59112de2a3dccde Mon Sep 17 00:00:00 2001 From: Nicolas Date: Thu, 31 Jul 2025 12:47:10 +0800 Subject: [PATCH] feat: optimize devsvc OpenTelemetry logging configuration - Change start_at from beginning to end to avoid processing old logs - Add poll_interval: 1s for more frequent file monitoring - Add otlp and k8scluster receivers for comprehensive log collection - Reduce batch processor send_batch_size to 1 and timeout to 1s for real-time logging - Update pipelines to include all three receivers --- .../devsvc/templates/devsvc/opentelemetry.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/freeleaps/helm-pkg/devsvc/templates/devsvc/opentelemetry.yaml b/freeleaps/helm-pkg/devsvc/templates/devsvc/opentelemetry.yaml index f148ea00..e9bab78a 100644 --- a/freeleaps/helm-pkg/devsvc/templates/devsvc/opentelemetry.yaml +++ b/freeleaps/helm-pkg/devsvc/templates/devsvc/opentelemetry.yaml @@ -47,13 +47,23 @@ spec: include: - {{ .Values.logIngest.logPathPattern }} - {{ .Values.logIngest.logPath }}/.log - start_at: beginning + start_at: end include_file_path: false include_file_name: false + poll_interval: 1s operators: - type: json_parser parse_from: body parse_to: attributes + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 + k8scluster: + collection_interval: 1s + auth_type: serviceAccount processors: resource: attributes: @@ -97,8 +107,8 @@ spec: - set(log.body, resource.attributes["body_json"]) - delete_key(resource.attributes, "body_json") batch: - send_batch_size: 5 - timeout: 10s + send_batch_size: 1 + timeout: 1s exporters: otlphttp/logs: endpoint: {{ .Values.logIngest.lokiEndpoint }}/otlp @@ -110,7 +120,7 @@ spec: level: info pipelines: logs: - receivers: [filelog] + receivers: [filelog, otlp, k8scluster] processors: [resource, transform, batch] exporters: [otlphttp/logs] {{- end }} \ No newline at end of file