instrument: HTTP/OTLP transport sinks + extras matrix CI#98
Closed
mmercuri wants to merge 1 commit into
Closed
Conversation
Lands the telemetry transport layer that adapter EventSinks ship to,
plus the CI gate that smoke-tests every adapter extra at both the
floor and ceiling of its declared pin range.
Scope
-----
- src/layerlens/instrument/transport/sink_http.py: HTTPSink — async
batching transport for the LayerLens ingest endpoint
- src/layerlens/instrument/transport/sink_otlp.py: OTLPHttpSink —
hand-rolled protobuf marshalling against opentelemetry-proto so
consumers don't pull in opentelemetry-sdk just to ship spans
- tests/instrument/transport/test_sink_otlp.py: 27 unit tests for
the OTLP serializer + transport
- tests/instrument/test_sink_http_e2e.py: 9 end-to-end tests against
a local FastAPI receiver
- samples/instrument/otlp_collector/: runnable sample pointing the
OTLPHttpSink at a Collector
- docs/adapters/otlp.md: configuration guide
- .github/workflows/extras-matrix.yaml: per-extra pin-range matrix
that installs every framework / protocol / provider extra at both
its floor and ceiling and runs an import-only smoke check
- pyproject.toml: two new optional extras
- `otel`: opentelemetry-api + opentelemetry-sdk +
opentelemetry-exporter-otlp-proto-http (for callers who want the
full SDK)
- `otlp`: opentelemetry-proto only (for the lean OTLPHttpSink path)
Blast radius
------------
- Default `pip install layerlens` install set is unchanged. Both
transport sinks are inert until an adapter is wired to them.
- No changes to existing public API surface.
Test plan
---------
- uv run pytest tests/instrument/transport/ tests/instrument/
test_sink_http_e2e.py -x -> 38 passed
- The extras-matrix workflow exercises every adapter extra on PR.
Stacks on
---------
- feat/instrument-base-foundation (M1.A) — required for the
EventSink contract this PR implements.
LAY-3400 umbrella (M1 transport tier).
Contributor
Author
|
Linear: https://linear.app/layerlens/issue/LAY-3403 (OTLP HTTP transport sink + extras-matrix CI workflow — partial LAY-3404). Stacked on PR #93. Under Apollo M1 epic LAY-3423. |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lands the telemetry transport layer that adapter
EventSinks shipto, plus the CI gate that smoke-tests every adapter extra at both the
floor and ceiling of its declared pin range.
Scope
src/layerlens/instrument/transport/sink_http.py—HTTPSink,async batching transport for the LayerLens ingest endpoint
src/layerlens/instrument/transport/sink_otlp.py—OTLPHttpSink,hand-rolled protobuf marshalling against
opentelemetry-protosoconsumers don't pull in
opentelemetry-sdkjust to ship spanstests/instrument/transport/test_sink_otlp.py— 27 unit tests forthe OTLP serializer + transport
tests/instrument/test_sink_http_e2e.py— 9 end-to-end testsagainst a local FastAPI receiver
samples/instrument/otlp_collector/— runnable sample pointing theOTLPHttpSinkat a Collectordocs/adapters/otlp.md— configuration guide.github/workflows/extras-matrix.yaml— per-extra pin-range matrixthat installs every framework / protocol / provider extra at both
its floor and ceiling and runs an import-only smoke check
pyproject.toml— two new optional extrasotel—opentelemetry-api+opentelemetry-sdk+opentelemetry-exporter-otlp-proto-http(for callers who wantthe full SDK)
otlp—opentelemetry-protoonly (for the leanOTLPHttpSinkpath)Blast radius
pip install layerlensinstall set is unchanged. Bothtransport sinks are inert until an adapter is wired to them.
Test plan
uv run pytest tests/instrument/transport/ tests/instrument/test_sink_http_e2e.py -x— 38 passed
Stacks on
feat/instrument-base-foundation(M1.A) — required for theEventSinkcontract this PR implements.Linear
LAY-3400 umbrella (M1 transport tier). Unblocks Track A's
LAY-3401–3404 (compat / transport / CI work).