Skip to content

Lambda Extension returns invalid OTLP response payload causing protobuf decoding failures in OpenTelemetry SDKs #932

@jlabedo

Description

@jlabedo

Summary

When sending OTLP trace data to the Datadog Lambda Extension, the extension returns a JSON payload that is not compliant with the OpenTelemetry OTLP protocol. This breaks any language SDK that attempts to deserialize the response as a standard ExportTraceServiceResponse protobuf message.

The problematic response comes from the following code:

json!({"rate_by_service":{"service:,env:":1}}).to_string(),

Opentelemetry Specification: https://opentelemetry.io/docs/specs/otlp/#otlpgrpc-response

Affected versions

v88 at least is affected.
I had to rollback to v68 of the extension that is not affected.

Tested with latest PHP opentelemetry SDK

Suggestion

Return an empty response for otlp agent.

Thank You

Happy to test a patch, PR, or experimental build.
Let me know if you need reproduction code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions