diff --git a/packages/nginx_ingress_controller_otel/collector-config.yaml b/packages/nginx_ingress_controller_otel/collector-config.yaml index fd601c0aded..28f990ba73a 100644 --- a/packages/nginx_ingress_controller_otel/collector-config.yaml +++ b/packages/nginx_ingress_controller_otel/collector-config.yaml @@ -46,7 +46,7 @@ processors: - set(attributes["data_stream.dataset"], "nginx_ingress_controller.access") # LogRecord event: https://github.com/open-telemetry/semantic-conventions/pull/982 - set(attributes["event.name"], "nginx.ingress.controller.access") - - set(attributes["event.timestamp"], attributes["nginx_ingress_controller.access.time"]) + - set(attributes["event.timestamp"], String(Time(attributes["nginx_ingress_controller.access.time"], "%d/%b/%Y:%H:%M:%S %z"))) - delete_key(attributes, "nginx_ingress_controller.access.time") - context: log conditions: diff --git a/packages/nginx_ingress_controller_otel/docs/README.md b/packages/nginx_ingress_controller_otel/docs/README.md index fec507264b5..76ecb28e905 100644 --- a/packages/nginx_ingress_controller_otel/docs/README.md +++ b/packages/nginx_ingress_controller_otel/docs/README.md @@ -28,7 +28,7 @@ extensions: receivers: filelog: include_file_path: true - include: [/var/log/pods/*/*/*.log] + include: [/var/log/pods/*nginx-ingress-nginx-controller*/controller/*.log] operators: - id: container-parser type: container @@ -81,7 +81,7 @@ processors: # LogRecord event: https://github.com/open-telemetry/semantic-conventions/pull/982 - set(attributes["event.name"], "nginx.ingress.controller.access") - - set(attributes["event.timestamp"], attributes["nginx_ingress_controller.access.time"]) + - set(attributes["event.timestamp"], String(Time(attributes["nginx_ingress_controller.access.time"], "%d/%b/%Y:%H:%M:%S %z"))) - delete_key(attributes, "nginx_ingress_controller.access.time") - context: log