opentelemetry-lambda icon indicating copy to clipboard operation
opentelemetry-lambda copied to clipboard

logging exporter v0.68 merges separate lines into one line with \n characters

Open zaharsantarovich opened this issue 2 years ago • 3 comments

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.

zaharsantarovich avatar Jan 14 '23 13:01 zaharsantarovich

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

gbbr avatar Jan 17 '23 09:01 gbbr

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/

zaharsantarovich avatar Jan 18 '23 17:01 zaharsantarovich

This is a result of this change in the otel-lambda repo.

Aneurysm9 avatar Jan 18 '23 17:01 Aneurysm9