Skip to content

feat: add OpenTelemetry distributed tracing support#929

Merged
acouvreur merged 4 commits into
mainfrom
add-otel-tracing
May 17, 2026
Merged

feat: add OpenTelemetry distributed tracing support#929
acouvreur merged 4 commits into
mainfrom
add-otel-tracing

Conversation

@acouvreur

@acouvreur acouvreur commented May 17, 2026

Copy link
Copy Markdown
Member

Summary

Adds end-to-end OpenTelemetry tracing to Sablier so every HTTP request, async instance start, and outbound provider call can be observed in a tool like Jaeger, Grafana Tempo, or any OTLP-compatible backend.

Tracing is opt-in and disabled by default — existing deployments are unaffected.

Supersed #740

Closes #428


Configuration

Add a tracing section to your sablier.yaml:

tracing:
  enabled: true
  exporterType: otlphttp      # otlphttp | stdout
  endpoint: http://localhost:4318
  serviceName: sablier
  samplingRate: 1.0           # 1.0 = sample every request

All fields are also available as CLI flags and environment variables:

Flag Environment variable Default
--tracing.enabled SABLIER_TRACING_ENABLED false
--tracing.exporter-type SABLIER_TRACING_EXPORTER_TYPE otlphttp
--tracing.endpoint SABLIER_TRACING_ENDPOINT http://localhost:4318
--tracing.service-name SABLIER_TRACING_SERVICE_NAME sablier
--tracing.sampling-rate SABLIER_TRACING_SAMPLING_RATE 1.0

What gets traced

HTTP server

Every incoming request receives an OTel span via the otelgin middleware. The trace-ID and span-ID are injected into the structured slog access log so log lines and traces can be correlated in a single query.

Provider API calls

All outbound provider calls are wrapped with OTel-instrumented transports:

Provider Instrumentation
Docker / Podman / Swarm Native client.WithTraceProvider built into the moby client
Kubernetes otelhttp.NewTransport wrapping the rest-client RoundTripper
ProxmoxLXC otelhttp.NewTransport wrapping the base transport (before TLS)

Async instance starts

When a request triggers an async InstanceStart goroutine the OTel span context from the triggering request is propagated into the background context, so provider API calls in the goroutine appear as children of the original HTTP request's trace — without being bound by the request's deadline or cancellation.

When a subsequent request joins the same pending goroutine a sablier.instance.join_pending_start span event is recorded on the joining request's span, referencing the original trace-ID and span-ID so the two requests can be correlated in the tracing backend.

Webhook deliveries

The webhook dispatcher HTTP client is wrapped with otelhttp.NewTransport so outbound webhook HTTP calls appear in the trace.


Quieter logs

gRPC internal logs (channel state changes, resolver updates, etc.) are now routed through slog instead of being written directly to stderr. gRPC Info-level events are demoted to slog.Debug, so they remain invisible at the default log level.


Quick start with Jaeger

A ready-to-run Docker Compose example is included:

cd examples/tracing/jaeger
make up                # starts Sablier + whoami + Jaeger all-in-one
make request-blocking  # cold-start whoami through the blocking strategy
make traces            # open the Jaeger UI (http://localhost:16686)

The Jaeger UI will show the full trace: HTTP handler span → async InstanceStart span → Docker API calls.


Files changed

File Change
pkg/config/tracing.go New Tracing config struct with defaults
pkg/tracing/setup.go TracerProvider bootstrap: exporters, resource, propagators, sampler
pkg/tracing/grpclog.go grpclog.LoggerV2slog bridge (demotes Info to Debug)
pkg/tracing/setup_test.go Unit tests for all setup paths
internal/server/server.go otelgin middleware on the HTTP router
internal/server/logging.go Trace-ID / span-ID fields in access logs
internal/server/tracing_test.go Integration tests for span creation
pkg/sabliercmd/provider.go OTel transport wired into all providers
pkg/sabliercmd/start.go Tracing initialisation and deferred shutdown
pkg/sabliercmd/root.go CLI flags and viper bindings
pkg/sablier/instance_request.go Span-context propagation into async goroutines + join events
pkg/webhook/dispatcher.go Traced HTTP client
examples/tracing/jaeger/ Docker Compose example with Jaeger all-in-one
docs/tracing.md Full configuration and per-provider reference
sablier.sample.yaml Tracing section added (commented out)

Adds end-to-end OpenTelemetry (OTel) tracing to Sablier so every HTTP
request, async instance start, and outbound provider call can be
observed in tools like Jaeger, Tempo, or any OTLP-compatible backend.

## What's new

### Configuration

A new top-level `tracing` section is available in `sablier.yaml` and
as CLI flags / environment variables:

```yaml
tracing:
  enabled: true
  exporterType: otlphttp      # otlphttp | stdout
  endpoint: http://localhost:4318
  serviceName: sablier
  samplingRate: 1.0           # 1.0 = sample every request
```

| Flag | Env var | Default |
|------|---------|---------|
| `--tracing.enabled` | `SABLIER_TRACING_ENABLED` | `false` |
| `--tracing.exporter-type` | `SABLIER_TRACING_EXPORTER_TYPE` | `otlphttp` |
| `--tracing.endpoint` | `SABLIER_TRACING_ENDPOINT` | `http://localhost:4318` |
| `--tracing.service-name` | `SABLIER_TRACING_SERVICE_NAME` | `sablier` |
| `--tracing.sampling-rate` | `SABLIER_TRACING_SAMPLING_RATE` | `1.0` |

### HTTP server instrumentation

Every incoming request receives an OTel span via the `otelgin`
middleware. Trace-ID and span-ID are injected into the structured
`slog` access log so log lines and traces can be correlated in a
single query.

### Provider instrumentation

All outbound provider calls are wrapped with OTel transports:

- **Docker / Podman / Swarm** — uses the native
  `client.WithTraceProvider` option built into the moby client.
- **Kubernetes** — wraps the rest-client `RoundTripper` with
  `otelhttp.NewTransport`.
- **ProxmoxLXC** — same `otelhttp.NewTransport` wrapper applied
  before TLS configuration.

### Async start trace propagation

When an incoming request triggers an async `InstanceStart` goroutine
the OTel span context from the request is propagated into the
background context. Provider API calls in the goroutine appear as
children of the original HTTP request's trace without being bound by
its deadline or cancellation.

When a subsequent request joins the same pending goroutine a
`sablier.instance.join_pending_start` span event is recorded on the
joining request's span, referencing the original trace- and span-ID so
the two requests can be correlated in the tracing backend.

### Webhook instrumentation

The webhook dispatcher HTTP client is wrapped with
`otelhttp.NewTransport` so outbound webhook deliveries appear in the
trace.

### gRPC log bridge

gRPC internal logs (channel state changes, resolver updates, etc.) are
redirected through `slog` instead of being written directly to
stderr. gRPC `Info`-level events are demoted to `slog.Debug` so
they remain invisible at the default log level.

## Running the Jaeger example

```sh
cd examples/tracing/jaeger
make up          # starts sablier + whoami + Jaeger all-in-one
make request-blocking  # send a blocking request to warm up whoami
make traces      # open the Jaeger UI in your browser
```

## Files changed

- `pkg/config/tracing.go` — new `Tracing` config struct
- `pkg/tracing/setup.go` — TracerProvider bootstrap, exporters, propagators
- `pkg/tracing/grpclog.go` — gRPC→slog log bridge
- `pkg/tracing/setup_test.go` — unit tests for the tracing package
- `internal/server/server.go` — `otelgin` middleware on the HTTP router
- `internal/server/logging.go` — trace-ID / span-ID in access logs
- `internal/server/tracing_test.go` — integration tests for span creation
- `pkg/sabliercmd/provider.go` — OTel transport on all providers
- `pkg/sabliercmd/start.go` — tracing initialisation and shutdown
- `pkg/sabliercmd/root.go` — CLI flags and viper bindings
- `pkg/sablier/instance_request.go` — span-context propagation into goroutines
- `pkg/webhook/dispatcher.go` — traced HTTP client
- `examples/tracing/jaeger/` — Docker Compose example with Jaeger
- `docs/tracing.md` — full configuration and provider reference
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 17, 2026
@github-actions

github-actions Bot commented May 17, 2026

Copy link
Copy Markdown
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Diff between sablier and sablier                                                                                        │
├──────────┬──────────────────────────────────────────────────────────────────────────────┬──────────┬──────────┬─────────┤
│ PERCENT  │ NAME                                                                         │ OLD SIZE │ NEW SIZE │ DIFF    │
├──────────┼──────────────────────────────────────────────────────────────────────────────┼──────────┼──────────┼─────────┤
│ +100%    │ google.golang.org/grpc                                                       │          │ 1.0 MB   │ +1.0 MB │
│ +114.51% │ go.opentelemetry.io/otel                                                     │ 407 kB   │ 873 kB   │ +466 kB │
│ +51.92%  │ github.com/sablierapp/sablier                                                │ 325 kB   │ 494 kB   │ +169 kB │
│ +4.16%   │ google.golang.org/protobuf                                                   │ 1.7 MB   │ 1.8 MB   │ +73 kB  │
│ +100%    │ go.opentelemetry.io/proto/otlp                                               │          │ 66 kB    │ +66 kB  │
│ +100%    │ go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin │          │ 34 kB    │ +34 kB  │
│ +2.95%   │ <autogenerated>                                                              │ 948 kB   │ 976 kB   │ +28 kB  │
│ +3.49%   │ golang.org/x/net                                                             │ 789 kB   │ 817 kB   │ +28 kB  │
│ +8.15%   │ slices                                                                       │ 294 kB   │ 318 kB   │ +24 kB  │
│ +86.74%  │ errors                                                                       │ 11 kB    │ 20 kB    │ +9.3 kB │
│ +100%    │ github.com/grpc-ecosystem/grpc-gateway/v2                                    │          │ 8.9 kB   │ +8.9 kB │
│ +18.06%  │ vendor/golang.org/x/net/dns/dnsmessage                                       │ 29 kB    │ 34 kB    │ +5.2 kB │
│ +100%    │ google.golang.org/genproto/googleapis/api                                    │          │ 4.3 kB   │ +4.3 kB │
│ +100%    │ google.golang.org/genproto/googleapis/rpc                                    │          │ 4.2 kB   │ +4.2 kB │
│ +1.20%   │ github.com/gabriel-vasile/mimetype                                           │ 184 kB   │ 186 kB   │ +2.2 kB │
│ +0.56%   │ github.com/pelletier/go-toml/v2                                              │ 217 kB   │ 218 kB   │ +1.2 kB │
│ +30.20%  │ github.com/docker/go-units                                                   │ 3.3 kB   │ 4.3 kB   │ +998 B  │
│ +100%    │ github.com/cenkalti/backoff/v5                                               │          │ 786 B    │ +786 B  │
│ +13.69%  │ internal/syscall/unix                                                        │ 4.1 kB   │ 4.6 kB   │ +557 B  │
│ +0.35%   │ path                                                                         │ 20 kB    │ 20 kB    │ +69 B   │
│ +1.22%   │ internal/singleflight                                                        │ 4.2 kB   │ 4.3 kB   │ +52 B   │
│ +0.07%   │ github.com/subosito/gotenv                                                   │ 8.9 kB   │ 8.9 kB   │ +6 B    │
│ +0.01%   │ github.com/docker/go-connections                                             │ 6.8 kB   │ 6.8 kB   │ +1 B    │
│ -0.47%   │ github.com/mailru/easyjson                                                   │ 1.5 kB   │ 1.5 kB   │ -7 B    │
│ -0.09%   │ github.com/jinzhu/copier                                                     │ 27 kB    │ 26 kB    │ -23 B   │
│ -5.67%   │ container/heap                                                               │ 2.4 kB   │ 2.3 kB   │ -136 B  │
│ -1.78%   │ internal/fmtsort                                                             │ 8.1 kB   │ 7.9 kB   │ -144 B  │
│ -3.72%   │ encoding/pem                                                                 │ 4.8 kB   │ 4.6 kB   │ -177 B  │
│ -3.36%   │ internal/cpu                                                                 │ 6.1 kB   │ 5.9 kB   │ -206 B  │
│ -2.44%   │ debug/dwarf                                                                  │ 8.7 kB   │ 8.5 kB   │ -213 B  │
│ -1.35%   │ internal/runtime/cgroup                                                      │ 16 kB    │ 16 kB    │ -221 B  │
│ -0.52%   │ internal/strconv                                                             │ 43 kB    │ 42 kB    │ -222 B  │
│ -28.31%  │ github.com/go-openapi/jsonpointer                                            │ 809 B    │ 580 B    │ -229 B  │
│ -0.22%   │ github.com/spf13/cast                                                        │ 107 kB   │ 107 kB   │ -238 B  │
│ -46.27%  │ internal/runtime/sys                                                         │ 523 B    │ 281 B    │ -242 B  │
│ -19.82%  │ github.com/go-playground/locales                                             │ 1.4 kB   │ 1.1 kB   │ -269 B  │
│ -1.69%   │ github.com/pmezard/go-difflib                                                │ 17 kB    │ 16 kB    │ -282 B  │
│ -4.51%   │ vendor/golang.org/x/sys/cpu                                                  │ 6.4 kB   │ 6.1 kB   │ -290 B  │
│ -36.36%  │ database/sql                                                                 │ 836 B    │ 532 B    │ -304 B  │
│ -1.91%   │ strconv                                                                      │ 17 kB    │ 17 kB    │ -328 B  │
│ -25.62%  │ internal/lazyregexp                                                          │ 1.7 kB   │ 1.3 kB   │ -431 B  │
│ -4.81%   │ expvar                                                                       │ 9.4 kB   │ 8.9 kB   │ -450 B  │
│ -0.67%   │ vendor/golang.org/x/crypto/chacha20poly1305                                  │ 71 kB    │ 70 kB    │ -477 B  │
│ -5.36%   │ github.com/tniswong/go.rfcx                                                  │ 9.1 kB   │ 8.7 kB   │ -490 B  │
│ -3.87%   │ encoding/csv                                                                 │ 13 kB    │ 12 kB    │ -495 B  │
│ -8.39%   │ github.com/munnerz/goautoneg                                                 │ 6.1 kB   │ 5.6 kB   │ -513 B  │
│ -1.95%   │ unicode                                                                      │ 28 kB    │ 27 kB    │ -539 B  │
│ -19.95%  │ golang.org/x/sync                                                            │ 2.7 kB   │ 2.2 kB   │ -545 B  │
│ -63.94%  │ github.com/fsnotify/fsnotify                                                 │ 857 B    │ 309 B    │ -548 B  │
│ -2.51%   │ vendor/golang.org/x/net/idna                                                 │ 22 kB    │ 22 kB    │ -561 B  │
│ -11.35%  │ encoding/hex                                                                 │ 5.2 kB   │ 4.6 kB   │ -592 B  │
│ -13.17%  │ internal/chacha8rand                                                         │ 5.0 kB   │ 4.4 kB   │ -662 B  │
│ -6.51%   │ github.com/go-openapi/swag                                                   │ 10 kB    │ 9.8 kB   │ -679 B  │
│ -20.76%  │ golang.org/x/oauth2                                                          │ 3.7 kB   │ 2.9 kB   │ -767 B  │
│ -0.85%   │ golang.org/x/crypto                                                          │ 91 kB    │ 90 kB    │ -767 B  │
│ -10.14%  │ github.com/sagikazarmark/locafero                                            │ 7.7 kB   │ 6.9 kB   │ -781 B  │
│ -10.30%  │ encoding/base32                                                              │ 7.8 kB   │ 7.0 kB   │ -803 B  │
│ -8.63%   │ github.com/gin-contrib/sse                                                   │ 9.6 kB   │ 8.8 kB   │ -828 B  │
│ -100.00% │ github.com/moby/docker-image-spec                                            │ 843 B    │          │ -843 B  │
│ -8.66%   │ compress/zlib                                                                │ 9.8 kB   │ 8.9 kB   │ -846 B  │
│ -2.94%   │ sort                                                                         │ 29 kB    │ 28 kB    │ -856 B  │
│ -10.15%  │ container/list                                                               │ 8.5 kB   │ 7.6 kB   │ -859 B  │
│ -3.51%   │ sigs.k8s.io/yaml                                                             │ 25 kB    │ 24 kB    │ -881 B  │
│ -13.74%  │ github.com/google/uuid                                                       │ 6.7 kB   │ 5.7 kB   │ -915 B  │
│ -13.14%  │ github.com/modern-go/concurrent                                              │ 7.0 kB   │ 6.1 kB   │ -924 B  │
│ -100.00% │ github.com/go-playground/universal-translator                                │ 999 B    │          │ -999 B  │
│ -9.57%   │ internal/godebug                                                             │ 10 kB    │ 9.5 kB   │ -1.0 kB │
│ -2.53%   │ bytes                                                                        │ 41 kB    │ 40 kB    │ -1.0 kB │
│ -4.94%   │ github.com/quic-go/qpack                                                     │ 22 kB    │ 21 kB    │ -1.1 kB │
│ -9.45%   │ github.com/pkg/errors                                                        │ 12 kB    │ 11 kB    │ -1.1 kB │
│ -72.42%  │ go/scanner                                                                   │ 1.6 kB   │ 441 B    │ -1.2 kB │
│ -0.86%   │ html                                                                         │ 136 kB   │ 135 kB   │ -1.2 kB │
│ -8.19%   │ hash                                                                         │ 15 kB    │ 14 kB    │ -1.2 kB │
│ -9.14%   │ text/tabwriter                                                               │ 14 kB    │ 13 kB    │ -1.3 kB │
│ -8.13%   │ github.com/go-logr/stdr                                                      │ 16 kB    │ 15 kB    │ -1.3 kB │
│ -9.90%   │ compress/gzip                                                                │ 14 kB    │ 13 kB    │ -1.4 kB │
│ -8.01%   │ golang.org/x/time                                                            │ 18 kB    │ 16 kB    │ -1.4 kB │
│ -8.91%   │ internal/bisect                                                              │ 16 kB    │ 15 kB    │ -1.4 kB │
│ -6.81%   │ github.com/spf13/afero                                                       │ 21 kB    │ 20 kB    │ -1.4 kB │
│ -8.06%   │ encoding/base64                                                              │ 18 kB    │ 17 kB    │ -1.5 kB │
│ -78.45%  │ github.com/opencontainers/image-spec                                         │ 2.1 kB   │ 442 B    │ -1.6 kB │
│ -13.55%  │ embed                                                                        │ 12 kB    │ 11 kB    │ -1.7 kB │
│ -2.72%   │ github.com/prometheus/common                                                 │ 68 kB    │ 66 kB    │ -1.8 kB │
│ -86.28%  │ go/token                                                                     │ 2.2 kB   │ 297 B    │ -1.9 kB │
│ -6.93%   │ vendor/golang.org/x/crypto/cryptobyte                                        │ 28 kB    │ 26 kB    │ -1.9 kB │
│ -8.26%   │ github.com/opencontainers/go-digest                                          │ 23 kB    │ 21 kB    │ -1.9 kB │
│ -3.87%   │ internal/reflectlite                                                         │ 50 kB    │ 48 kB    │ -1.9 kB │
│ -6.16%   │ github.com/samber/slog-gin                                                   │ 32 kB    │ 30 kB    │ -2.0 kB │
│ -3.62%   │ github.com/davecgh/go-spew                                                   │ 54 kB    │ 52 kB    │ -2.0 kB │
│ -5.72%   │ gopkg.in/inf.v0                                                              │ 35 kB    │ 33 kB    │ -2.0 kB │
│ -88.84%  │ iter                                                                         │ 2.3 kB   │ 255 B    │ -2.0 kB │
│ -14.39%  │ vendor/golang.org/x/net/http/httpproxy                                       │ 14 kB    │ 12 kB    │ -2.1 kB │
│ -18.15%  │ weak                                                                         │ 12 kB    │ 9.7 kB   │ -2.2 kB │
│ -3.97%   │ github.com/leodido/go-urn                                                    │ 55 kB    │ 53 kB    │ -2.2 kB │
│ -6.04%   │ github.com/lmittmann/tint                                                    │ 36 kB    │ 34 kB    │ -2.2 kB │
│ -6.20%   │ sigs.k8s.io/randfill                                                         │ 36 kB    │ 34 kB    │ -2.3 kB │
│ -13.53%  │ github.com/djherbis/times                                                    │ 19 kB    │ 17 kB    │ -2.6 kB │
│ -7.30%   │ bufio                                                                        │ 38 kB    │ 35 kB    │ -2.8 kB │
│ -2.98%   │ internal/poll                                                                │ 95 kB    │ 92 kB    │ -2.8 kB │
│ -8.46%   │ vendor/golang.org/x/net/http2/hpack                                          │ 35 kB    │ 32 kB    │ -2.9 kB │
│ -3.33%   │ github.com/go-viper/mapstructure/v2                                          │ 88 kB    │ 85 kB    │ -2.9 kB │
│ -1.89%   │ time                                                                         │ 157 kB   │ 154 kB   │ -3.0 kB │
│ -6.04%   │ strings                                                                      │ 58 kB    │ 54 kB    │ -3.5 kB │
│ -9.04%   │ github.com/distribution/reference                                            │ 39 kB    │ 36 kB    │ -3.5 kB │
│ -8.30%   │ internal/runtime/maps                                                        │ 44 kB    │ 40 kB    │ -3.6 kB │
│ -21.63%  │ internal/runtime/atomic                                                      │ 17 kB    │ 13 kB    │ -3.7 kB │
│ -12.58%  │ k8s.io/utils                                                                 │ 32 kB    │ 28 kB    │ -4.1 kB │
│ -5.90%   │ mime                                                                         │ 78 kB    │ 74 kB    │ -4.6 kB │
│ -9.90%   │ context                                                                      │ 47 kB    │ 43 kB    │ -4.7 kB │
│ -10.87%  │ github.com/prometheus/procfs                                                 │ 43 kB    │ 38 kB    │ -4.7 kB │
│ -10.23%  │ flag                                                                         │ 46 kB    │ 41 kB    │ -4.7 kB │
│ -14.39%  │ github.com/containerd/errdefs                                                │ 33 kB    │ 29 kB    │ -4.8 kB │
│ -11.82%  │ github.com/sourcegraph/conc                                                  │ 41 kB    │ 36 kB    │ -4.9 kB │
│ -6.80%   │ encoding/asn1                                                                │ 72 kB    │ 68 kB    │ -4.9 kB │
│ -10.42%  │ vendor/golang.org/x/text/unicode/norm                                        │ 50 kB    │ 45 kB    │ -5.3 kB │
│ -9.00%   │ github.com/go-logr/logr                                                      │ 59 kB    │ 53 kB    │ -5.3 kB │
│ -4.76%   │ log                                                                          │ 126 kB   │ 120 kB   │ -6.0 kB │
│ -5.88%   │ fmt                                                                          │ 106 kB   │ 99 kB    │ -6.2 kB │
│ -10.29%  │ internal/sync                                                                │ 62 kB    │ 56 kB    │ -6.4 kB │
│ -2.01%   │ github.com/go-playground/validator/v10                                       │ 326 kB   │ 319 kB   │ -6.6 kB │
│ -12.21%  │ io                                                                           │ 54 kB    │ 47 kB    │ -6.6 kB │
│ -19.82%  │ unique                                                                       │ 34 kB    │ 27 kB    │ -6.7 kB │
│ -5.71%   │ encoding/xml                                                                 │ 124 kB   │ 117 kB   │ -7.1 kB │
│ -8.47%   │ github.com/gorilla/websocket                                                 │ 84 kB    │ 77 kB    │ -7.1 kB │
│ -8.92%   │ go.opentelemetry.io/auto/sdk                                                 │ 89 kB    │ 81 kB    │ -7.9 kB │
│ -11.23%  │ compress/flate                                                               │ 72 kB    │ 64 kB    │ -8.1 kB │
│ -11.24%  │ github.com/spf13/viper                                                       │ 73 kB    │ 65 kB    │ -8.2 kB │
│ -9.01%   │ syscall                                                                      │ 97 kB    │ 88 kB    │ -8.7 kB │
│ -11.98%  │ internal/abi                                                                 │ 74 kB    │ 65 kB    │ -8.9 kB │
│ -7.36%   │ k8s.io/klog/v2                                                               │ 124 kB   │ 115 kB   │ -9.1 kB │
│ -5.34%   │ sigs.k8s.io/json                                                             │ 173 kB   │ 164 kB   │ -9.2 kB │
│ -3.93%   │ github.com/spf13/cobra                                                       │ 239 kB   │ 229 kB   │ -9.4 kB │
│ -5.64%   │ encoding/json                                                                │ 172 kB   │ 162 kB   │ -9.7 kB │
│ -5.57%   │ regexp                                                                       │ 185 kB   │ 175 kB   │ -10 kB  │
│ -4.03%   │ go.yaml.in/yaml/v2                                                           │ 275 kB   │ 264 kB   │ -11 kB  │
│ -6.94%   │ golang.org/x/text                                                            │ 162 kB   │ 150 kB   │ -11 kB  │
│ -3.68%   │ math                                                                         │ 305 kB   │ 294 kB   │ -11 kB  │
│ -24.22%  │ github.com/prometheus/client_model                                           │ 47 kB    │ 36 kB    │ -12 kB  │
│ -28.26%  │ golang.org/x/sys                                                             │ 41 kB    │ 29 kB    │ -12 kB  │
│ -3.89%   │ go.yaml.in/yaml/v3                                                           │ 312 kB   │ 300 kB   │ -12 kB  │
│ -4.07%   │ reflect                                                                      │ 340 kB   │ 326 kB   │ -14 kB  │
│ -4.54%   │ gopkg.in/yaml.v3                                                             │ 305 kB   │ 292 kB   │ -14 kB  │
│ -6.91%   │ os                                                                           │ 210 kB   │ 196 kB   │ -14 kB  │
│ -11.28%  │ github.com/emicklei/go-restful/v3                                            │ 133 kB   │ 118 kB   │ -15 kB  │
│ -10.16%  │ github.com/modern-go/reflect2                                                │ 148 kB   │ 134 kB   │ -15 kB  │
│ -14.66%  │ sync                                                                         │ 106 kB   │ 90 kB    │ -16 kB  │
│ -5.25%   │ github.com/google/go-cmp                                                     │ 297 kB   │ 282 kB   │ -16 kB  │
│ -6.14%   │ sigs.k8s.io/structured-merge-diff/v6                                         │ 275 kB   │ 258 kB   │ -17 kB  │
│ -4.65%   │ k8s.io/kube-openapi                                                          │ 466 kB   │ 445 kB   │ -22 kB  │
│ -7.53%   │ text/template                                                                │ 292 kB   │ 270 kB   │ -22 kB  │
│ -7.33%   │ github.com/diskfs/go-diskfs                                                  │ 329 kB   │ 305 kB   │ -24 kB  │
│ -8.15%   │ github.com/spf13/pflag                                                       │ 302 kB   │ 277 kB   │ -25 kB  │
│ -33.37%  │ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp                │ 74 kB    │ 49 kB    │ -25 kB  │
│ -7.96%   │ github.com/gin-gonic/gin                                                     │ 336 kB   │ 309 kB   │ -27 kB  │
│ -11.00%  │ github.com/fxamacker/cbor/v2                                                 │ 300 kB   │ 267 kB   │ -33 kB  │
│ -10.88%  │ github.com/prometheus/client_golang                                          │ 309 kB   │ 276 kB   │ -34 kB  │
│ -5.70%   │ go.mongodb.org/mongo-driver/v2                                               │ 672 kB   │ 634 kB   │ -38 kB  │
│ -5.92%   │ github.com/goccy/go-yaml                                                     │ 702 kB   │ 660 kB   │ -42 kB  │
│ -10.67%  │ github.com/json-iterator/go                                                  │ 462 kB   │ 413 kB   │ -49 kB  │
│ -13.10%  │ github.com/moby/moby/client                                                  │ 434 kB   │ 377 kB   │ -57 kB  │
│ -52.91%  │ github.com/moby/moby/api                                                     │ 149 kB   │ 70 kB    │ -79 kB  │
│ -25.81%  │ github.com/luthermonson/go-proxmox                                           │ 333 kB   │ 247 kB   │ -86 kB  │
│ -5.08%   │ crypto                                                                       │ 1.9 MB   │ 1.8 MB   │ -96 kB  │
│ -5.68%   │ net                                                                          │ 1.7 MB   │ 1.6 MB   │ -96 kB  │
│ -5.97%   │ k8s.io/apimachinery                                                          │ 1.8 MB   │ 1.7 MB   │ -106 kB │
│ -8.57%   │ github.com/google/gnostic-models                                             │ 1.6 MB   │ 1.5 MB   │ -137 kB │
│ -10.25%  │ github.com/quic-go/quic-go                                                   │ 1.3 MB   │ 1.2 MB   │ -138 kB │
│ -4.80%   │ k8s.io/api                                                                   │ 17 MB    │ 16 MB    │ -801 kB │
│ -8.88%   │ k8s.io/client-go                                                             │ 14 MB    │ 13 MB    │ -1.3 MB │
│ -69.30%  │ runtime                                                                      │ 3.2 MB   │ 982 kB   │ -2.2 MB │
├──────────┼──────────────────────────────────────────────────────────────────────────────┼──────────┼──────────┼─────────┤
│ +335.55% │ .rodata                                                                      │ 2.1 MB   │ 9.3 MB   │ +7.1 MB │
│ +6.05%   │ .data                                                                        │ 196 kB   │ 208 kB   │ +12 kB  │
│ +1.86%   │ .noptrdata                                                                   │ 451 kB   │ 459 kB   │ +8.4 kB │
├──────────┼──────────────────────────────────────────────────────────────────────────────┼──────────┼──────────┼─────────┤
│ +5.53%   │ sablier                                                                      │ 59 MB    │ 62 MB    │ +3.3 MB │
│          │ sablier                                                                      │          │          │         │
└──────────┴──────────────────────────────────────────────────────────────────────────────┴──────────┴──────────┴─────────┘

@github-actions

github-actions Bot commented May 17, 2026

Copy link
Copy Markdown

Test Results

✅ All tests passed! | 491 tests in 125.791s

View HTML Test Report

acouvreur added 2 commits May 17, 2026 18:34
Each provider (Docker, Swarm, Kubernetes, ProxmoxLXC) now starts a
named child span for InstanceStart and InstanceStop, inheriting the
trace context propagated from the HTTP request through the Sablier core.

Span attributes per provider:
- docker.instance.{start,stop}: instance, operation (start/unpause/
  pause/stop/scale_mode.noop/scale_mode.apply_resources), cpu, memory
- swarm.instance.{start,stop}: instance, operation, replicas, cpu, memory
- kubernetes.instance.{start,stop}: instance, operation (scale/
  scale_mode/scale_to_zero), replicas, cpu, memory
- proxmoxlxc.instance.{start,stop}: instance, proxmox.node, proxmox.vmid,
  operation (start/stop/noop.already_running/noop.already_stopped)

Also fix test context matchers: InstanceInspect and InstanceStart now
receive a context enriched with the trace span value; tests that used
gomock.Eq(ctx) for those calls now use gomock.Any().
@github-actions github-actions Bot added the provider Issue related to a provider label May 17, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
73.5% Coverage on New Code (required ≥ 80%)
11.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@acouvreur acouvreur merged commit 68faefd into main May 17, 2026
7 of 8 checks passed
@acouvreur acouvreur deleted the add-otel-tracing branch May 17, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation provider Issue related to a provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add OpenTelemetry

1 participant