spec(pebble): otel/otlp proxy draft specs - #7
Draft
hpidcock wants to merge 1 commit into
Draft
Conversation
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.
Still Drafting
Pebble OpenTelemetry Observability
This PR introduces full OpenTelemetry observability support to Pebble across all four OTLP signals: logs, metrics, traces, and profiles (OP0X1–OP0X6).
What's changing
Pebble gains four new plan sections —
log-targets,metric-targets,trace-targets, andprofile-targets— each backed by a local OTLP/HTTP receiver. Services running under Pebble get theirOTEL_EXPORTER_OTLP_*environment variables injected automatically at startup. Pebble enriches incoming payloads with resource attributes (service.name,pebble.service,service.instance.id) before forwarding to the configured backend.In addition, Pebble emits its own traces and metrics covering service lifecycle, health checks, plan updates, changes/tasks, and
pebble execinvocations.flowchart TD subgraph Services S1[service: web-server]:::accent0 S2[service: worker]:::accent0 end subgraph Pebble R[Local OTLP Receiver\n/v1/services/svc/otlp/...]:::accent2 E[Enrichment\nservice.name, pebble.service\nservice.instance.id + labels]:::accent2 SE[Self-emitted telemetry\nlifecycle spans, metrics\nhealth checks, exec]:::accent3 end subgraph Backends B1[Remote OTLP backend\ne.g. Tempo / Mimir / Loki]:::accent5 B2[otel-collector\ntail sampling, fan-out\nprotocol translation]:::accent4 end S1 -- logs/metrics/traces/profiles --> R S2 -- logs/metrics/traces/profiles --> R R --> E E --> B1 E --> B2 SE --> B1 SE --> B2 B2 --> B1Signal overview
log-targetsmetric-targetstrace-targetsprofile-targetsEach signal uses a per-service receiver path (
/v1/services/{name}/otlp/v1/{signal}) so Pebble can attribute payloads without inspecting the body.Pebble-emitted spans (OP0X6)
flowchart TD C[change: kind]:::accent2 T1[task: kind]:::accent2 T2[task: kind]:::accent2 SL[service start/stop/restart]:::accent0 HC[check: name]:::accent3 PU[plan update]:::accent5 EX[exec: command]:::accent4 EP[external caller\ntraceparent header]:::accent1 C --> T1 C --> T2 T1 --> SL T1 --> HC EP -. W3C traceparent .-> EXSpans scoped to a specific service are only forwarded to
trace-targetsentries whoseserviceslist includes that service. Plan-update and change/task spans are forwarded unconditionally.Delegate pattern (OP0X5)
Running
otel-collectoras an ordinary Pebble service and pointing all four*-targetsat its local port (http://127.0.0.1:12345) enables tail sampling, attribute manipulation, fan-out to multiple backends, and protocol translation — without any changes to Pebble itself.Key design decisions
environment:block./v1development/profiles) reflecting the alpha status of the OTel profiling signal.