Add Skep to your own Collector
If you already build your own OpenTelemetry Collector, keep it. Add Skep’s two components to your build and a few lines to your configuration. Nothing else in your collector changes: the observers are read only and add no exporters.
skepobserveris a processor. It summarizes what passes through the pipeline and never changes, drops or delays it.skepcontrolis an extension. It registers the collector with Skep and uploads the observer’s summaries. It is the only part that talks to the network.
Before you start
Section titled “Before you start”- A Collector you build with the OpenTelemetry Collector Builder (ocb).
- Your other components on Collector core v0.161.0, the release the Skep components are built against.
- A copy of the Skep source. The module (
github.com/skephq/skep) is not published to a public Go module proxy, so your build points at a checked out or vendored copy. - A collector key (
skc_...). The install flow creates one. See What you need first. - The collector can reach Skep over HTTPS.
Open the install guide
Section titled “Open the install guide”- In Skep, open Collectors, then Add collector. On a new organization, Home shows the same choices.
- Choose Connect your first collector.
- Answer Does it already tail sample? With Yes, it runs tail_sampling, Skep adds one observer before your sampler and one after it.
- Select Create collector key. The key is filled into the commands.
The guide gives you two files: builder-config.yaml (additions to your ocb
manifest) and skep-config.yaml (additions to your collector
configuration).
Add the components to your build
Section titled “Add the components to your build”-
Add both components to your ocb manifest, next to your existing ones. Point
replacesat your copy of the Skep source (absolute paths, or relative todist.output_path), so Go never fetches the module:processors:- gomod: github.com/skephq/skep/collector v0.1.0import: github.com/skephq/skep/collector/processor/skepobserverextensions:- gomod: github.com/skephq/skep/collector v0.1.0import: github.com/skephq/skep/collector/extension/skepcontrolreplaces:- github.com/skephq/skep/collector => /src/skep/collector- github.com/skephq/skep/pkg => /src/skep/pkg -
Rebuild your collector.
Terminal window builder --config builder-config.yamlTo be sure the build used your copy and nothing was fetched, build with
GOPRIVATE=github.com/skephq. A fetch then fails instead of reaching a proxy. Check that both components are in the binary with<your-collector> components.
Configure it
Section titled “Configure it”-
Make the collector key available to the collector process: in its systemd unit, container environment or Kubernetes Secret.
Terminal window export SKEP_API_KEY=skc_...export SKEP_COLLECTOR_NAME=production-collector -
Merge
skep-config.yamlinto your configuration. Keep your receivers, exporters and other processors. Only the parts marked Skep are new:extensions:# Skep: registration, policy snapshots and observation upload.skepcontrol:endpoint: https://app.skep.observerapi_key: ${env:SKEP_API_KEY}environment: productionname: ${env:SKEP_COLLECTOR_NAME:-production-collector}# Keeps the collector's identity across restarts; any writable directory.state_dir: /var/lib/skep-otelcolprocessors:# Skep: observe what exists, before your sampler.skepobserver/pre:position: pre_samplingcontrol_extension: skepcontrol# Skep: observe what your backend receives, after your sampler.skepobserver/post:position: post_samplingcontrol_extension: skepcontrolservice:extensions: [skepcontrol] # plus your existing extensionspipelines:traces:processors: [memory_limiter, skepobserver/pre, tail_sampling, skepobserver/post]metrics:processors: [memory_limiter, skepobserver/pre]logs:processors: [memory_limiter, skepobserver/pre]Without tail sampling there is no
skepobserver/post, and every pipeline gets[memory_limiter, skepobserver/pre]plus your own processors. -
Restart your collector. It registers with Skep on start and uploads its first observations within a minute.
Where the observer goes
Section titled “Where the observer goes”- Put
skepobserver/preearly in every pipeline, right aftermemory_limiter, which stays first. - With tail sampling, put
skepobserver/prebeforetail_samplingandskepobserver/postafter it. Skep compares the two to show what sampling costs your questions. - Batch in your exporters’
sending_queuerather than with abatchprocessor. Abatchprocessor before the observer hides thex-skep-observedrequest header from it, and Skep then cannot tell what an earlier tier already counted.
Check that it worked
Section titled “Check that it worked”- The guide’s last step, Wait for it to register, checks every 3
seconds. It shows the collector’s name (by default
<environment>-collector), its status and its observer positions when it registers. - The collector’s log shows
skepcontrol: registered with control plane. - Collectors lists it as online. Services appear in Data within about a minute.
Troubleshooting
Section titled “Troubleshooting”- ocb tries to download
github.com/skephq/skep. Thereplacespaths are wrong. They are absolute, or relative todist.output_path, and must point at thecollectorandpkgdirectories of your copy. - The build fails on module versions. Keep your other components on Collector core v0.161.0.
- The collector fails to start with an unknown component. The binary
you run is not the one you rebuilt. Check with
<your-collector> components. - The log says
skepcontrol: control plane not reachable; collector keeps exporting. The collector cannot register. The error after it says why: a 401 means the key is wrong or revoked (create a new collector key), a network error means the collector cannot reach Skep. Your telemetry still flows to your backend meanwhile. - Registered, but no post sampling counts.
skepobserver/postis not in the traces pipeline aftertail_sampling.
Rather not maintain a build? Run the Skep distribution instead: the upstream Collector with these components included. Every setting of both components is in Collector components.