• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 23951758196
65%

Build:
DEFAULT BRANCH: main
Ran 03 Apr 2026 03:38PM UTC
Jobs 1
Files 604
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Apr 2026 03:33PM UTC coverage: 65.282% (-0.06%) from 65.338%
23951758196

push

github

web-flow
Add OTEL distributed tracing and optional Sentry integration to the API server (#4365)

* Add sentry-go dependency

* Add Sentry configuration and lifecycle package

* Wire Sentry into API server and add CLI flags

* Report panics to Sentry in recovery middleware

* Capture 5xx errors to Sentry in error handler

* Document Sentry integration for API server

* Regenerate CLI docs to include Sentry flags

* Add sentry-go/otel bridge and update OTEL SDK to v1.42.0

* Replace sentryhttp middleware with OTEL span processor
Drop NewMiddleware() backed by sentryhttp in favour of SpanProcessor()
which returns a sentryotel.NewSentrySpanProcessor. This lets the OTEL
SDK drive tracing while Sentry receives spans as a processor, aligning
the API server with W3C traceparent-based distributed tracing.
Also tags every Sentry event with custom.user_id from the anonymous
instance ID so API server events correlate with toolhive-studio.

* Support extra span processors in OTEL provider chain
Add ExtraSpanProcessors to the provider config and thread them through
NewProvider → StrategySelector → OTLPTracerStrategy → tracing.go.
When extra processors are present but no OTLP endpoint is configured, a
real SDK tracer provider is created (without an exporter) so processors
still receive spans. This enables Sentry-only tracing without requiring
an external collector.

* Wire OTEL distributed tracing into API server
Add initServeOTEL() to cmd/thv/app/server.go that reads the global OTEL
config and registers the Sentry span processor when available. In
Sentry-only mode (no OTLP endpoint) tracing is force-enabled at 100%
OTEL sampling so every span reaches the Sentry processor.
Replace sentryhttp middleware in pkg/api/server.go with otelhttp, using
WithSpanNameFormatter to produce route-aware span names like
'GET /api/v1beta/workloads/{name}' instead of a fixed 'thv-api'.

* Update docs for OTEL-first distributed tracing approach

* Record panics and 5xx errors on OTEL spans

Rep... (continued)

164 of 300 new or added lines in 11 files covered. (54.67%)

17 existing lines in 5 files now uncovered.

54537 of 83541 relevant lines covered (65.28%)

63.34 hits per line

Uncovered Changes

Lines Coverage ∆ File
50
21.17
-3.19% cmd/thv/app/server.go
44
12.74
-1.11% pkg/api/server.go
38
0.0
pkg/telemetry/serve.go
4
93.94
pkg/sentry/sentry.go

Coverage Regressions

Lines Coverage ∆ File
5
71.85
-1.85% pkg/ignore/processor.go
5
82.6
-0.21% pkg/vmcp/composer/workflow_engine.go
3
79.38
-0.77% pkg/transport/proxy/httpsse/http_proxy.go
2
95.68
-1.44% pkg/vmcp/composer/template_expander.go
2
51.71
-0.19% pkg/workloads/manager.go
Jobs
ID Job ID Ran Files Coverage
1 23951758196.1 03 Apr 2026 03:38PM UTC 604
65.28
GitHub Action Run
Source Files on build 23951758196
  • Tree
  • List 604
  • Changed 14
  • Source Changed 8
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23951758196
  • f81841fb on github
  • Prev Build on main (#23951051179)
  • Next Build on main (#23953659068)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc