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

MapColonies / shigola / 456db4385
57%
master: 44%

Build:
Build:
LAST BUILD BRANCH: chore/drop-vendor
DEFAULT BRANCH: master
Ran 09 Sep 2026 02:43PM UTC
Jobs 1
Files 126
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

09 Sep 2026 02:39PM UTC coverage: 55.662% (+0.3%) from 55.336%
456db4385

push

github

web-flow
feat(log): put trace and span ids on records inside a trace (MAPCO-11494) (#23)

* feat(log): put trace and span ids on records inside a trace

Every log line written while serving a traced request now carries
trace_id and span_id, so a trace in Tempo reaches the log lines it
produced and a log line reaches its trace.

The ids come from the span context on the context slog.Handler.Handle is
already handed, which is why this is cheap: no call site has to be
taught to pass them, and a record outside a trace yields the zero span
context and so gains nothing. Sampling is deliberately not consulted —
at the default 1% ratio most requests are unsampled, and dropping their
ids would leave 99% of requests' log lines uncorrelated with each other,
which is the cheaper half of what this is for.

Two supporting pieces:

ServiceAttrs replaces the WithGroup("shigola") the binaries used. An
open group qualifies everything after it, including the attributes
Handle adds per record, so correlation would have been logged as
shigola.trace_id — not a name a log pipeline looks for. As one grouped
attribute the group nests only its own contents, so what it writes is
byte-for-byte what WithGroup wrote; the one visible change is that the
stack trace on an error record is now top-level too. It returns an
slog.Attr rather than a logger because an slog.Attr can only reach a
logger through With, so the placement cannot be undone by a caller
reaching for WithGroup out of habit.

The *fContext helpers are the migration path for the request path's
existing printf-style call sites: they let a site gain correlation
without its message changing, so nothing that greps today's logs has to
be re-taught for the sake of two fields. They go the same way as their
context-free siblings when that TODO is done.

Costs nothing when tracing is off, and is not gated on the config:
BenchmarkHandleWithoutATrace is within run noise of the same handler
without the context lookup, at zero allocations.

... (continued)

110 of 151 new or added lines in 12 files covered. (72.85%)

5810 of 10438 relevant lines covered (55.66%)

122.86 hits per line

Uncovered Changes

Lines Coverage ∆ File
20
77.01
internal/fakelog/fakelog.go
7
57.07
0.0% provider/postgis/postgis.go
4
75.2
0.0% server/ogc/handle_tile.go
4
77.33
-2.12% server/ogc/handlers.go
3
0.0
0.0% cache/gcs/gcs.go
1
20.22
0.44% cmd/shigola/cmd/root.go
1
81.82
0.0% server/ogc/api.go
1
80.0
0.0% server/ogc/negotiate.go
Jobs
ID Job ID Ran Files Coverage
1 456db4385.1 09 Sep 2026 02:43PM UTC 126
55.66
GitHub Action Run
Source Files on build 456db4385
  • Tree
  • List 126
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 456db438 on github
  • Prev Build on development (#BF16266BF)
  • Next Build on development (#AEA18CDAE)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc