opentelemetry-lambda
opentelemetry-lambda copied to clipboard
logging exporter v0.68 merges separate lines into one line with \n characters
Describe the bug Logging exporter v0.68 started to merge separate lines into one line with "\n" separator.
AWS CloudWatch messages for v0.66: 2023-01-06T15:33:00.412Z info TracesExporter {"kind": "exporter", "data_type": "traces", "name": "logging", "#spans": 6} 2023-01-06T15:33:00.426Z info ResourceSpans #0 Resource SchemaURL: Resource attributes: -> cloud.provider: Str(aws) -> cloud.region: Str(eu-central-1)
AWS CloudWatch messages for v0.68: {"level":"info","ts":1673697752.6744573,"msg":"TracesExporter","kind":"exporter","data_type":"traces","name":"logging","#spans":6} {"level":"info","ts":1673697752.6909316,"msg":"ResourceSpans #0\nResource SchemaURL: \nResource attributes:\n -> cloud.provider: Str(aws)\n -> cloud.region: Str(eu-central-1)\n ...
Steps to reproduce AWS Lambda function with AWS ADOT lambda layer v0.68
What did you expect to see? Separate CloudWatch message for each line.
What did you see instead? One CloudWatch message with many lines with "\n" separator
What version did you use? Version: 0.68 Is used from AWS lambda layer: arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1
What config did you use? Config: (e.g. the yaml config file) exporters: logging: verbosity: detailed
service: pipelines: traces: receivers: [otlp] exporters: [logging, otlp]
Environment AWS Lambda function, ARM/Graviton2
Additional context Add any other context about the problem here.
Are you sure that there is no issue on your end? I have not managed to reproduce this. There have also not been any significant changes to the loggingexporter between 0.66.0 and 0.68.0
Hi @gbbr, Just verified my test lambda function with 0.66 and 0.68 lambda layers. 0.66 - no bug, 0.68 - the bug is reproduced. Perhaps, the bug is caused by some changes in the downstream repositories. The lambda layer repository: https://github.com/open-telemetry/opentelemetry-lambda/
This is a result of this change in the otel-lambda repo.