Commit 4f35f83
committed
Enforce HYPERDX_OTLP_ENDPOINT path at runtime
The documented requirement (env var MUST include ``/v1/traces``) was
only enforced through docs, not the test itself. Because the OTel
SDK swallows exporter-side errors and ``force_flush`` returns True
regardless of the HTTP response, a host-only URL would POST to ``/``,
HyperDX would 404, and the test would still report green. This is the
silent-failure mode the test's docstring already warned about and
the one we hit on this PR's manual validation.
Assert the endpoint ends with ``/v1/traces`` before constructing the
exporter; the assert raises with a pointer to the expected shape if
the env var is misconfigured.1 parent d4e3113 commit 4f35f83
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
63 | 75 | | |
64 | 76 | | |
65 | 77 | | |
66 | 78 | | |
67 | 79 | | |
68 | | - | |
| 80 | + | |
69 | 81 | | |
70 | 82 | | |
71 | 83 | | |
| |||
0 commit comments