Collector components
Skep adds two components to an OpenTelemetry Collector:
skepobserver(processor) reads the telemetry that passes through a pipeline and summarizes it: keys, shapes, counts and sketches. It never changes, drops, delays or reorders telemetry, and it makes no network calls.skepcontrol(extension) does all the network work: it registers the collector, uploads the observers’ summaries, fetches the policy snapshot and sends heartbeats.
Both ship in the skep-otelcol distribution. To add them to your own Collector build, see Your own Collector. Both are alpha stability and support traces, metrics and logs.
skepobserver
Section titled “skepobserver”Put one observer in each pipeline you want Skep to see. Name instances by position, for example skepobserver/pre before a sampler and skepobserver/post after it. Observers with the same name share one summary across the traces, metrics and logs pipelines.
processors: skepobserver/pre: position: pre_sampling control_extension: skepcontrol| Field | Type | Default | Meaning |
|---|---|---|---|
position |
string | unknown |
Where this observer sits relative to your sampler: pre_sampling (sees everything that exists), post_sampling (sees what the backend receives) or unknown |
control_extension |
component ID | first skepcontrol found |
The skepcontrol extension that uploads this observer’s batches. With none configured, batches are logged at debug level and discarded |
window |
duration | 60s |
Length of one observation window. At least 1s |
top_k |
int | 20 |
How many values to keep per attribute per shape per window, only for attributes classed ALLOW_VALUE or HASH_VALUE. 0 to 1000 |
value_policy_source |
string | snapshot |
Where attribute policy classes come from. Only snapshot is supported |
limits.max_shapes |
int | 50000 |
Most distinct shapes tracked |
limits.max_attributes_per_shape |
int | 512 |
Most attributes tracked per shape |
limits.max_buckets |
int | 20000 |
Most sampling buckets tracked |
limits.max_edges |
int | 10000 |
Most dependency edges tracked |
limits.max_memory_mb |
int | 256 |
Memory bound for the observer’s state |
limits.max_span_index |
int | 200000 |
Size of the span ID index used to find parent and child spans across services |
sampling_awareness.read_sample_rate_attribute |
bool | true |
Read a stamped sample rate attribute to estimate counts before sampling |
sampling_awareness.read_tracestate_threshold |
bool | true |
Read the sampling threshold from tracestate |
schema_sampling.high_throughput_sample |
float | 0.1 |
Above the threshold, the share of items whose attributes are analyzed. Greater than 0, at most 1. Counts stay exact |
schema_sampling.throughput_threshold |
int | 20000 |
Items per window above which attribute analysis is sampled |
All limits must be positive. When a limit is reached, the observer stops tracking new items and reports them as dropped_observations. Your telemetry still flows unchanged.
skepcontrol
Section titled “skepcontrol”Add one skepcontrol extension per collector and list it under service.extensions.
extensions: skepcontrol: endpoint: ${env:SKEP_ENDPOINT} api_key: ${env:SKEP_API_KEY} environment: production state_dir: /var/lib/skep-otelcol| Field | Type | Default | Meaning |
|---|---|---|---|
endpoint |
string | none | Your Skep URL, for example https://app.skep.observer. Required unless offline.outbox_dir is set |
api_key |
string (secret) | none | A collector key (skc_). Required when endpoint is set. It can only register the collector and upload observations |
environment |
string | none | The environment this collector reports into. A resource’s deployment.environment.name overrides it for that resource |
name |
string | the host name | How the collector is named in Skep, kept across restarts |
fleet |
string | none | The fleet this collector joins, such as linux-hosts. Skep creates the fleet the first time it sees the name. Empty leaves the collector unassigned |
tier |
string | none | The collector’s role: edge (an agent on each host or node) or gateway (receives from edges, samples, exports). Empty means not declared |
distro |
string | from the binary | skep inside the skep-otelcol distribution, byo otherwise. It labels the collector and grants nothing |
timeout |
duration | 10s |
Timeout for each call to Skep |
snapshot_refresh_interval |
duration | 60s |
How often to fetch the policy snapshot |
heartbeat_interval |
duration | 30s |
How often to report health |
state_dir |
string | none | Keeps the instance ID, the last snapshot and (by default) the upload queue on disk, so a restarted collector keeps its identity and policy while offline |
queue.max_size_mib |
int | 64 |
Upload queue bound. When full, the oldest batch is dropped and counted, and shows in Skep as a gap |
queue.storage |
string | disk when a directory is known, else memory |
disk keeps queued batches in a bounded spool that survives restarts. memory keeps them in memory |
queue.directory |
string | <state_dir>/queue |
Spool directory for disk storage |
offline.snapshot_file |
string | none | A snapshot JSON file read instead of, or before, downloading one (air gapped) |
offline.outbox_dir |
string | none | Writes gzip JSON batches here for upload by other means, instead of uploading them (air gapped) |
sampler_stats.tail_sampling |
string | auto |
Read this collector’s tail_sampling processor counters from its own metrics: auto (when the processor is present) or off |
sampler_stats.internal_metrics_url |
string | http://localhost:8888/metrics |
The collector’s own Prometheus endpoint |
sampler_stats.refinery_metrics_url |
string | none | A Refinery Prometheus endpoint inside your network, such as http://refinery:9090/metrics. Empty turns it off |
sampler_stats.interval |
duration | 60s |
How often sampler counters are read |
follow_cell_endpoints |
bool | true |
Use the API and upload URLs Skep returns at registration for your organization. endpoint stays the fallback |
timeout and both intervals must be positive. queue.storage: disk needs queue.directory or state_dir.
Full example: a gateway with tail sampling
Section titled “Full example: a gateway with tail sampling”A gateway that receives OTLP, counts everything before sampling, samples traces, counts what is kept, and exports to Honeycomb. This is what Skep’s install guide generates for a gateway with tail sampling (Collectors, then Add collector).
extensions: skepcontrol: endpoint: ${env:SKEP_ENDPOINT} api_key: ${env:SKEP_API_KEY} environment: ${env:SKEP_ENVIRONMENT} name: ${env:SKEP_COLLECTOR_NAME:-} fleet: ${env:SKEP_FLEET} tier: ${env:SKEP_TIER} state_dir: /var/lib/skep-otelcol health_check: endpoint: 0.0.0.0:13133 # Exporter sending queues persist here, so a restart does not lose # queued telemetry. file_storage/queue: directory: /var/lib/skep-otelcol/queue create_directory: true
receivers: otlp: protocols: grpc: endpoint: 0.0.0.0:4317 # Lets the observer see which tier already counted an item. include_metadata: true http: endpoint: 0.0.0.0:4318 include_metadata: true
processors: # First in every pipeline. memory_limiter: check_interval: 1s limit_percentage: 80 spike_limit_percentage: 20 skepobserver/pre: position: pre_sampling control_extension: skepcontrol # A starting policy. Skep's sampling advisor compiles one tuned to # your services. tail_sampling: decision_wait: 10s num_traces: 100000 expected_new_traces_per_sec: 100 policies: - name: keep-errors type: status_code status_code: status_codes: [ERROR] - name: keep-slow type: latency latency: threshold_ms: 1000 - name: baseline-10pct type: probabilistic probabilistic: sampling_percentage: 10 skepobserver/post: position: post_sampling control_extension: skepcontrol
exporters: otlp_grpc/honeycomb: endpoint: api.honeycomb.io:443 headers: x-honeycomb-team: ${env:HONEYCOMB_API_KEY} # Batches form in the sending queue (no batch processor), bounded in # bytes and persisted with file_storage/queue. sending_queue: enabled: true storage: file_storage/queue sizer: bytes queue_size: 104857600 batch: flush_timeout: 1s min_size: 1000000 max_size: 3500000
service: extensions: [health_check, skepcontrol, file_storage/queue] pipelines: traces: receivers: [otlp] processors: [memory_limiter, skepobserver/pre, tail_sampling, skepobserver/post] exporters: [otlp_grpc/honeycomb] metrics: receivers: [otlp] processors: [memory_limiter, skepobserver/pre] exporters: [otlp_grpc/honeycomb] logs: receivers: [otlp] processors: [memory_limiter, skepobserver/pre] exporters: [otlp_grpc/honeycomb]What to keep from this example in your own configuration:
memory_limiterfirst in every pipeline.skepobserver/prebefore the sampler andskepobserver/postafter it. With both, Skep shows what exists next to what your backend keeps.- No
batchprocessor before an observer (see the hop header below). Batch in the exporter’s sending queue instead.
The hop header
Section titled “The hop header”When an edge collector forwards to a gateway and both run observers, the gateway would count the same items again. The edge marks what it already counted with a request header, and the gateway’s observers skip counting items whose position is in that header. They still forward every item, and report the skipped ones as items_upstream_observed in the collector’s health.
On the edge, add the header to the exporter that sends to the gateway:
exporters: otlp_grpc/gateway: endpoint: ${env:SKEP_GATEWAY_ENDPOINT} headers: x-skep-observed: pre_samplingOn the gateway, two settings make the header reach the observer:
- The OTLP receiver sets
include_metadata: trueunder each protocol (grpcandhttp). - No
batchprocessor sits before the observer, because batching drops request metadata. If you must batch there, listx-skep-observedin the batch processor’smetadata_keys.
Without both, items marked by the edge are counted twice. The fleet topology in Skep shows a gateway link as verified once the gateway reports items counted upstream.
Built-in profiles
Section titled “Built-in profiles”The skep-otelcol image carries two observe-only profiles:
| Profile | Path | Pipeline |
|---|---|---|
| Gateway (the image’s default) | /etc/skep-otelcol/profiles/gateway.yaml |
OTLP in, memory_limiter, skepobserver/pre, nop |
| Agent | /etc/skep-otelcol/profiles/agent.yaml |
OTLP and host metrics in, memory_limiter, resource_detection, skepobserver/pre, nop |
Both observe only: Skep sees the telemetry, and nothing is forwarded to a backend. To forward, use a configuration from Skep’s install guide instead. Both keep state in /var/lib/skep-otelcol and serve a health check on port 13133. The agent profile reads host metrics from /hostfs.
They read these environment variables:
| Variable | Meaning |
|---|---|
SKEP_ENDPOINT |
Your Skep URL |
SKEP_API_KEY |
A collector key (skc_) |
SKEP_ENVIRONMENT |
Environment name. Default production |
SKEP_COLLECTOR_NAME |
Display name. Default: the host name |
docker run --rm \ -e SKEP_ENDPOINT=https://app.skep.observer \ -e SKEP_API_KEY=skc_... \ -p 4317:4317 -p 4318:4318 \ ghcr.io/skephq/skep-otelcol:0.1.0To run the agent profile, pass --config /etc/skep-otelcol/profiles/agent.yaml after the image name. The deb and rpm packages install the agent profile as /etc/skep-otelcol/config.yaml. For every variable the distribution reads, see Environment variables.