SIGN IN SIGN UP

feat(obs): export that cannot slow a request, and a number when it loses spans

Dimension 6.2.

## Telemetry failure must not become application failure

An exporter that blocks makes a slow collector look like a slow API; one that
retries forever makes an unreachable collector look like an outage. The bounded
buffer is the SDK's batch processor. What the SDK does not give is a number an
operator can look at — and a system that discards data silently will be trusted
while it is lying. `CountingExporter` is that number.

Counted as SPANS, not batches: batch sizes vary with load in exactly the way
that would make a batch count unreadable, and the question an operator has is
how much telemetry is missing.

## The test uses a real pipeline and a fake collector

"The collector is down" IS "export returns an error" from inside this process,
and an exporter that fails on demand makes the assertion deterministic where a
real unreachable endpoint would make it a timing question. Everything BETWEEN
the caller and that exporter is real — a genuine `SdkTracerProvider` and a
genuine batch processor — because those are the pieces doing the work. Hand-built
`SpanData` would have tested the counter and nothing else.

Verified the latency assertion discriminates: swapping the batch processor for
the simple one makes it fail, which is the point — with a synchronous exporter
the stall lands on the caller.

## Two assertions about transparency

The wrapper sits on the path of every span this process emits, so a `force_flush`
it answered on its own behalf would look correct everywhere — nothing errors, no
counter moves, and whatever the real exporter still held is lost at shutdown
without a word. Same for `set_resource`: swallowing it ships every span without
the service identity that makes it findable. Both are asserted rather than read
off the source.

## `unused_crate_dependencies` earned its keep again

The `opentelemetry` API crate was declared and never named — the SDK re-exports
what the exporter uses. Removed from the library and kept only where the suites
actually need a tracer.
K
Kishore Kumar committed
bbaeb17d212112c8eb625e6488cfc25c6332d48e
Parent: a7df206