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

dunglas / mercure / 25374805339
84%
master: 93%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 05 May 2026 11:56AM UTC
Jobs 1
Files 24
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

05 May 2026 11:54AM UTC coverage: 83.89% (+0.06%) from 83.829%
25374805339

push

github

web-flow
feat(tracing): OpenTelemetry spans for core operations (#1211)

* feat(tracing): instrument publish, subscribe, subscriptions, and Bolt history with OpenTelemetry spans

Spans are obtained via trace.SpanFromContext(ctx).TracerProvider(), so
they nest under the parent span carried in the request context — in
particular the HTTP span produced by Caddy's `tracing` directive, which
already honors the standard OTEL_* environment variables.

When no parent span is active, the lookup yields the noop tracer, so
there is no runtime cost and no globals are touched.

* chore(tracing): fix CI, address review feedback

- tracer.go: silence ireturn/spancheck linters (trace.Span is an
  interface by design).
- subscription.go: deduplicate the two handler prologues via a
  refactored initSubscription that starts the span itself, and downgrade
  the span kind to Internal per OpenTelemetry conventions (Caddy's
  tracing directive already produces the outer HTTP server span).
- publish.go / subscribe.go: gate span.SetAttributes calls on
  span.IsRecording() so no attribute slices are allocated when tracing
  is disabled.
- Lint nolint bumps (gocognit, funlen, nestif, contextcheck) where the
  new error-handling added one extra level of nesting but the logic is
  intentionally local.
- docs/hub/{metrics,tracing}.md: Markdown tables reformatted by
  prettier; subscriptions kind updated to Internal.

* chore(tracing): restore ctx := r.Context() pattern in subscription handlers

initSubscription no longer propagates the span context through
r.WithContext; the span is returned and ended by the caller instead.
This keeps the handlers' r untouched, so the existing ctx := r.Context()
pattern works as it did on main and contextcheck stays happy.

* chore(lint): allow trace.Span returns in ireturn

Configure the ireturn linter to allow go.opentelemetry.io/otel/trace.Span
as a permitted interface return type, and drop the per-function
//nolint:ireturn directives from startSpan and... (continued)

79 of 92 new or added lines in 6 files covered. (85.87%)

1807 of 2154 relevant lines covered (83.89%)

49.69 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
82.91
-0.25% publish.go
5
77.78
-2.01% subscription.go
2
80.0
-0.37% bolt.go
Jobs
ID Job ID Ran Files Coverage
1 0 - 25374805339.1 05 May 2026 11:56AM UTC 24
83.89
GitHub Action Run
Source Files on build 25374805339
  • Tree
  • List 24
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • fad403c2 on github
  • Prev Build on main (#25374495535)
  • Next Build on main (#25376019647)
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