Honeycomb
SpanSlice runs your rules inside each service’s process. The spans it keeps go straight from that process to Honeycomb,
and they don’t pass through SpanSlice. Honeycomb receives fewer events, already reshaped. Each event carries the
SampleRate your rules gave it, so counts and sums in your queries still reflect real traffic.
Connect Honeycomb
Section titled “Connect Honeycomb”Connect a team during onboarding with Connect Honeycomb, or later under Project settings › Honeycomb. The settings page has four steps:
- Connection: your Honeycomb team slug (from your Honeycomb URLs) and a management key with the api-keys and environments scopes. A read-only management key also works, but then you paste each environment’s keys yourself.
- Environments: choose the Honeycomb environments you need, and name each one in SpanSlice. Each SpanSlice environment (production, staging, …) maps to one Honeycomb environment.
- Keys: each environment needs a configuration key, so SpanSlice can read its datasets, and an ingest key, which your services send with. Generate all keys creates both. Or paste keys you made in Honeycomb.
- Detect services: datasets with the same name across a project’s environments become one service. You can also create a new service. Creating a service also creates its dataset in every environment.
Connecting requires the admin role in SpanSlice.
Where data goes
Section titled “Where data goes”With the SDK’s default exporter, SpanSlice works out each process’s destination from its environment and service:
| Signal | Sent to | With |
|---|---|---|
| Traces | https://api.honeycomb.io/v1/traces |
the environment’s ingest key; the service’s dataset (the one it was mapped to, or else its slug) |
| Metrics | https://api.honeycomb.io/v1/metrics |
the same key; the service’s metrics dataset (see below) |
- An environment with no ingest key sends nothing to Honeycomb.
- By default, the metrics dataset is the dataset plus
metrics, joined by whichever of-or_comes last in the name, or by_if the name has neither. Soapigetsapi_metrics, andnode-servicegetsnode-service-metrics. - Connecting creates a Honeycomb exporter under Organization settings › Exporters. It’s on for every project. Use Project settings › Exporters to switch it per environment and service.
- Metrics export is off by default, because Honeycomb bills per data point. To turn it on, enable Export metrics under Metrics › Runtime. Enabling Export metrics also sets the metrics dataset.
- Changing ingest keys or datasets doesn’t require a restart. When the config changes, the SDK moves to the new destination.
Choose how you send
Section titled “Choose how you send”- OpenTelemetry: services instrumented with OpenTelemetry, including those
that use Honeycomb’s
@honeycombio/opentelemetry-node. Thespanslicepackage replaces that setup. - libhoney: services that build Honeycomb events with
libhoneyand set their owntrace.*fields.spanslice/libhoneygives them the same rules without moving to OpenTelemetry.
A process can use both. libhoney events go out through libhoney, and OpenTelemetry spans go out through the SDK’s exporter. The same rules apply to each.