Skip to content

Commit 324fcbf

Browse files
Document HYPERDX_OTLP_ENDPOINT path requirement
The OTLPSpanExporter uses the ``endpoint`` kwarg verbatim and does not append ``/v1/traces`` itself (that auto-append is only for the host-only ``OTEL_EXPORTER_OTLP_ENDPOINT`` env-var convention this test doesn't use). A host-only URL POSTs to ``/`` and HyperDX 404s, which the OTel SDK swallows silently while ``force_flush`` still returns True — the failure mode this test calls out. Note the path-suffix requirement explicitly in the module docstring and the pytestmark skip reason so future readers don't lose half an hour to a silent failure that wasn't surfaced.
1 parent b9154c8 commit 324fcbf

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

tests/integration/test_otel_hyperdx_export.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
scope; runs end-to-end against HyperDX Cloud (or any other OTLP-HTTP
66
collector) when invoked from a shell with both env vars sourced.
77
8+
``HYPERDX_OTLP_ENDPOINT`` MUST be the full traces-collector URL
9+
including the ``/v1/traces`` path suffix, e.g.::
10+
11+
HYPERDX_OTLP_ENDPOINT=https://in-otel.hyperdx.io/v1/traces
12+
13+
``OTLPSpanExporter`` uses the ``endpoint`` kwarg verbatim and does
14+
not append the path itself (that auto-append only happens for the
15+
``OTEL_EXPORTER_OTLP_ENDPOINT`` host-only convention this test does
16+
not use). A host-only URL POSTs to ``/`` and HyperDX 404s.
17+
818
The test verifies the production export path the documentation
919
recommends (``BatchSpanProcessor`` + ``OTLPSpanExporter``) drains
1020
cleanly from the local pipeline. The assertion is local-side: the
@@ -27,7 +37,10 @@
2737
# fallback also can't find a target.
2838
pytestmark = pytest.mark.skipif(
2939
not (os.environ.get("HYPERDX_API_KEY") and os.environ.get("HYPERDX_OTLP_ENDPOINT")),
30-
reason="Requires HYPERDX_API_KEY + HYPERDX_OTLP_ENDPOINT (live HyperDX endpoint)",
40+
reason=(
41+
"Requires HYPERDX_API_KEY + HYPERDX_OTLP_ENDPOINT (live HyperDX endpoint); "
42+
"endpoint MUST include the /v1/traces path suffix"
43+
),
3144
)
3245

3346

0 commit comments

Comments
 (0)