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

rm-hull / dot-block / 27073968791
61%

Build:
DEFAULT BRANCH: main
Ran 06 Jun 2026 09:11PM 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

06 Jun 2026 09:09PM UTC coverage: 46.49% (-0.9%) from 47.39%
27073968791

push

github

web-flow
feat: add OpenTelemetry tracing to DNS requests (#140)

* feat: add OpenTelemetry tracing to DNS requests

- Integrated `go.opentelemetry.io` for distributed tracing.
- Added a `TracingHandler` to inject `trace_id` and `span_id` into JSON
logs.
- Instrumented `DNSDispatcher` methods (`HandleDNSRequest`,
`processQuestion`, `resolveUpstream`, `forwardQuery`) to capture request
 lifecycles and latency.
- Configured OTLP exporter for trace collection.

* feat: add distributed tracing support via OpenTelemetry

- Integrated OpenTelemetry (OTel) for end-to-end DNS request tracing.
- Added support for OTLP gRPC exports.
- Introduced `OTEL_SAMPLING_RATIO` and `OTEL_EXPORTER_OTLP_ENDPOINT`
environment variables.
- Configured parent-based sampling to improve observability while
managing data volume.

* style: fix indentation in ConnPool struct

* Update internal/telemetry/telemetry.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update internal/forwarder/dispatcher.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* refactor: add timeout to tracer shutdown and set default OTLP

- Wrap tracer shutdown in a 5-second context timeout to prevent
  hanging during application exit.
- Define a default OTLP endpoint ("localhost:4317") when the
  `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable is unset.

* feat: configure OTLP exporter with insecure connection

Explicitly set the OTLP endpoint and enable insecure mode for the GRPC
exporter to ensure connectivity to local collectors without TLS
handshake overhead.

* fix: handle nil DNS requests and OTLP exporter errors

- Add safety check for nil `req` in `DNSDispatcher` to prevent panics.
- Return error if OTLP exporter creation fails in
`telemetry.InitTracer`.

* fix: set span status on error in dispatcher

Ensure OpenTelemetry spans are correctly marked as failed when an
upstream
DNS query results in ... (continued)

62 of 147 new or added lines in 6 files covered. (42.18%)

841 of 1809 relevant lines covered (46.49%)

965.34 hits per line

Uncovered Changes

Lines Coverage ∆ File
41
6.82
internal/telemetry/telemetry.go
20
0.0
internal/logging/tracing_handler.go
11
0.0
0.0% internal/app.go
11
86.38
-1.32% internal/forwarder/dispatcher.go
2
0.0
0.0% main.go
Jobs
ID Job ID Ran Files Coverage
1 27073968791.1 06 Jun 2026 09:11PM UTC 24
46.49
GitHub Action Run
Source Files on build 27073968791
  • Tree
  • List 24
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • b3f62deb on github
  • Prev Build on main (#27073954914)
  • Next Build on main (#27077225011)
  • Delete
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