Skip to content

test: close the adapter e2e coverage gap (datadog, hyperdx, otlp, fs) #486

Description

@HugoRCD

Current state

pnpm run test:e2e covers 6 of the 11 shipped adapters:

Adapter e2e Note
axiom round-trip when the token has query:read
posthog smoke (write-only API)
sentry smoke (DSN is write-only)
better-stack smoke (source token is write-only)
loki round-trip, local container or Grafana Cloud
clickhouse round-trip, local container or ClickHouse Cloud
datadog
hyperdx
otlp
fs

These suites are the safety net for "the destination quietly changed its API". Four adapters currently have none.

Suggested order

1. fs — do this one first. Fully local, no secrets, no container. It can be a true round-trip: write events, read the NDJSON back, assert rotation / maxFiles / maxSizePerFile behaviour. Unlike every other suite it can run unconditionally in CI on every PR, not just the nightly cron.

2. otlp — extend the sandbox. Add an otel/opentelemetry-collector service to packages/evlog/test/e2e/docker-compose.yml with a file exporter, then assert the exported records. No account needed, and it validates the OTLP payload shape that hyperdx and posthog (logs mode) both reuse.

3. hyperdx — smoke against the cloud endpoint, or point it at the same local collector since createHyperDXDrain() is a thin mapping onto sendBatchToOTLP().

4. datadog — smoke; the intake API is write-only, so this mirrors the Better Stack suite. Worth asserting the httpStatusCode renaming and the dd.trace_id block survive the wire.

Pattern to follow

test/e2e/loki.e2e.ts and test/e2e/clickhouse.e2e.ts are the round-trip references; test/e2e/better-stack.e2e.ts is the smoke reference. All use describeIfEnv() so a missing endpoint skips with a visible label instead of passing silently, and makeEvent() to tag every event with e2e_run_id / e2e_correlation_id for cleanup.

Adapters with a local container should be wired into sandbox:up / sandbox:e2e so they run without credentials.

Also

.github/workflows/e2e.yml and test/e2e/README.md list the required secrets — both need the new entries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions