Skip to content

[receiver/libhoney] Error with unsupported Content-Encoding: #44010

@howardyoo

Description

@howardyoo

Component(s)

receiver/libhoney

What happened?

Description

when using libhoney with otel collector contrib v 0.135.0 or higher, a strange error with 'unsupported Content-Encoding:' is observed. the response ends with 400 Bad request error.

Steps to Reproduce

Setup a libhoney in the config yaml:

  libhoney:
    http:
      endpoint: 0.0.0.0:8088
      traces_url_paths:
        - "/1/events"
        - "/1/batch"
      include_metadata: true
    auth_api: https://api.honeycomb.io
    fields:
      resources:
        service_name: service_name
      scopes:
        library_name: library.name
        library_version: library.version
      attributes:
        trace_id: trace_id
        parent_id: parent_id
        span_id: span_id
        name: name
        error: error
        spankind: span.kind
        durationFields:
          - duration_ms

and use curl to submit data

curl -i -X POST \
  'http://localhost:8088/1/events/browser' \
  -H 'Content-Type: application/json' \
  -H 'X-Honeycomb-Event-Time: 0' \
  -H 'X-Honeycomb-Samplerate: 0' \
  -H 'X-Honeycomb-Team: <API_KEY>' \
  -d '[{
    "method": "GET",
    "endpoint": "/foo",
    "shard": "users",
    "duration_ms": 32
  }]'

Expected Result

HTTP/1.1 200 OK
Content-Type: application/json
Date: Tue, 04 Nov 2025 04:18:46 GMT
Content-Length: 16

[{"status":202}]

Actual Result

HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Tue, 04 Nov 2025 04:35:42 GMT
Content-Length: 31

unsupported Content-Encoding: 

Note

  • this also happens when you set the compression_algorithms: [] to the setting.
  • this problem does not happen in v0.133.0 and below.

Collector version

v0.135.0

Environment information

Environment

OS: MacOS (15.6.1)

OpenTelemetry Collector configuration

libhoney:
    http:
      endpoint: 0.0.0.0:8088
      traces_url_paths:
        - "/1/events"
        - "/1/batch"
      include_metadata: true
    auth_api: https://api.honeycomb.io
    fields:
      resources:
        service_name: service_name
      scopes:
        library_name: library.name
        library_version: library.version
      attributes:
        trace_id: trace_id
        parent_id: parent_id
        span_id: span_id
        name: name
        error: error
        spankind: span.kind
        durationFields:
          - duration_ms

Log output

Additional context

HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Tue, 04 Nov 2025 04:35:42 GMT
Content-Length: 31

unsupported Content-Encoding:

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions