Skip to content

OTel OTLP exporter times out connecting to HTTPS endpoints from compiled binary #889

@bixu

Description

@bixu

Description

When OTEL_EXPORTER_OTLP_ENDPOINT is set to an HTTPS endpoint (e.g., https://api.eu1.honeycomb.io), the bundled @opentelemetry/otlp-exporter-base Node.js HTTPS transport fails to connect within the 10s default timeout. The endpoint is reachable via curl in ~200ms, so the issue is specific to the HttpsClientRequest transport in the compiled Deno binary.

The error is non-blocking — commands complete successfully — but it prevents users from sending traces to HTTPS OTel backends (like Honeycomb) without running a local collector as an intermediary.

Steps to Reproduce

  1. Set OTel environment variables pointing to an HTTPS OTLP endpoint:
    export OTEL_EXPORTER_OTLP_ENDPOINT=https://api.eu1.honeycomb.io
    export OTEL_EXPORTER_OTLP_HEADERS="x-honeycomb-team=<key>"
  2. Run any swamp command, e.g. swamp repo upgrade
  3. After ~10 seconds, observe the timeout error:
    error: Uncaught (in promise) Error: Request timed out
                error: new Error('Request timed out'),
                       ^
        at HttpsClientRequest.<anonymous> (file:///var/folders/.../deno-compile-swamp/.deno_compile_node_modules/localhost/@opentelemetry/otlp-exporter-base/0.57.2/build/src/transport/http-transport-utils.js:87:20)
        at HttpsClientRequest.emit (ext:deno_node/_events.mjs:451:22)
        at IncomingMessageForClient.#tryReturnSocket (node:http:1036:13)
        at async node:http:970:9
    

Expected Behavior

Traces should be exported to the configured HTTPS OTLP endpoint, or the timeout should be handled gracefully without surfacing an uncaught error.

Workaround

  • Use a local OTel Collector on http://localhost:4318 to proxy traces to the HTTPS backend
  • Or set OTEL_SDK_DISABLED=true to suppress the error (but loses tracing)

Environment

  • swamp version: 20260327.005915.0-sha.86500cc2
  • OS: macOS (Darwin 25.4.0)
  • OTel exporter version: @opentelemetry/otlp-exporter-base 0.57.2 (bundled in compiled binary)

Summary

The bundled Node.js HttpsClientRequest transport in Deno's compiled binary appears unable to complete TLS connections to external HTTPS OTLP endpoints. This may be a Deno Node.js compatibility issue with how the compiled binary handles HTTPS agent connections. The fix would likely involve either catching the timeout error gracefully, switching to Deno's native fetch-based transport, or investigating the TLS handshake behavior in the compiled binary context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglifecycle/doneCompleted and merged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions