sherlock.go file from Setup, in either of its two variants. The result is the same data in Sherlock, with these differences.
Setup
Exemplars
Both mean the same thing on the Metrics page:
01 opens a trace, 00 has none.
HTTP instrumentation
- No default ignore list. Health check paths are traced and counted until you add
otelhttp.WithFilter. See Skip health checks. - Route on metrics, not on spans.
http.routecomes from theServeMuxpattern on the metric and in the span name. The span attribute needs the middleware.otelhttp.WithRouteTagno longer exists in v0.71.0. - Stable names only.
OTEL_SEMCONV_STABILITY_OPT_INis gone. The histograms arehttp.server.request.durationandhttp.client.request.durationin seconds, with no_msvariants. - 5xx responses. The span status is
Errorfor status 500 and above. The server data point carrieshttp.response.status_code=500and noerror.type. - A filtered request still traces its outbound calls, without a parent.
- Counters. The Node.js Express adapter adds
app.http.server.countandapp.http.server.errors.otelhttpemits no counters; count requests from the histogram, or add your own.
Runtime switches
- No kill-switch environment variables.
SHERLOCK_TRACES_ENABLEDandSHERLOCK_METRICS_ENABLEDare Node.js SDK features. The kill switches section shows the two wrappers that give Go the same behavior, with a flag you own. - Sampling across services. Go’s
ParentBasedsampler follows the caller’s decision for a remote parent. The Node.js SDK resamples remote parents with its local ratio.
Logs
- The Node.js SDK stamps pino lines and leaves shipping to a pino transport or a collector. Go can send logs itself over OTLP through the
otelslogbridge, or stamp stdout lines with a 13-lineslog.Handlerwrapper for a collector. In both, only context-aware calls such asInfoContextget the ids.
Traps that are specific to Go
- Only the first
otel.SetMeterProviderdelegates. Instruments handed out before a second call keep writing to the first provider, silently. CallSetuponce, and never rebuild the provider at runtime. - Two views that match one instrument export it twice. Keep every histogram rule inside
sherlockView. Hostheader.WithHeaders(map[string]string{"Host": ...})is ignored by Go’s HTTP client. UseWithHTTPClientwith a transport that setsreq.Host, and reapply timeout, proxy, and TLS settings on that client. See Endpoint on a private network.WithEndpointURLkeeps the path you give it.sherlock.goappends/v1/tracesand/v1/metricsitself. A base URL alone sends every export to/.- Exporter self-reporting is not a concern. The OTLP exporters use their own HTTP client, so wrapping
http.DefaultTransportwithotelhttp.NewTransportdoes not trace the exports.
Related topics
Go setup
The bootstrap file in both variants and a complete main.go.
Node.js SDK overview
What the distribution sets for you.

