Setup guide

Already sending Claude telemetry to another tool?

Run one small service, called a collector, that receives Claude's activity records and sends a copy to each tool that needs them. Your existing tool keeps getting everything it gets today, and SightLift gets its own copy.

Who · Whoever looks after your monitoring tools or servers Time · ~30 min, plus an HTTPS address if you don't have one You'll need · A server that runs Docker, and an HTTPS address for it (step 6)
← Back to the dashboard

Is this the guide you want?

Yes if a tool such as Datadog, Splunk, Grafana, Honeycomb or Jellyfish already receives your Claude telemetry through OpenTelemetry, and you want to add SightLift.

No if no tool receives it yet, or if your existing tool gets Claude usage through Anthropic's API instead. You don't need a collector: use Connect Claude to SightLift.

A few words this page uses

  • Telemetry: the activity records Claude Code and Cowork send while people work.
  • OpenTelemetry (OTel): the open standard those records follow. OTLP is its delivery format, and every tool on this page understands it.
  • Logs and traces: two kinds of record. Logs say what happened: a prompt, a tool run, a cost. Traces are made of spans, which show how the steps fit together and carry each tool's output. SightLift needs both.
  • Collector: a free, open-source service from the OpenTelemetry project. It receives records and passes them on.
  • Pipeline and exporter: in the collector's config, a pipeline is the route for one kind of record, and an exporter is one destination.

Before you start

Write down what you have today

Before changing anything, save a copy of how Claude sends telemetry now:

  • The env section of your Claude Code managed settings (claude.ai → Organization settings → Claude Code → Managed settings). Take the keys out if you keep the copy somewhere shared.
  • Cowork's Monitoring settings (Organization settings → Data and privacy → Monitoring), if you use Cowork.

This copy does two jobs:

  • It's your way back. To undo this setup, put the saved settings back. Developers pick them up the next time they start Claude Code.
  • It shows what your existing tool receives today. The …_EXPORTER lines show which record types it gets (logs, traces, metrics). The OTEL_LOG_… lines show whether it gets prompts and tool details. Steps 4 and 7 come back to both.

Step 1: the shape

How this fits together

Claude Code and Cowork send their records to one place: your collector. The collector sends a copy to each destination you list. Your existing tool and SightLift are each one of those destinations.

  Claude Code  ─┐
                │        ┌─────────────────────────┐      ┌──────────────────────┐
  Cowork       ─┼───────►│  YOUR collector         │─────►│  your existing tool   │
                │        │  (you run it)           │      └──────────────────────┘
  anything else ┘        │                         │      ┌──────────────────────┐
                         │                         │─────►│  SightLift            │
                         └─────────────────────────┘      └──────────────────────┘

This is the setup the OpenTelemetry project recommends for a team (they call it a gateway). There's one outbound connection for your network team to approve. Adding or removing a destination later, us included, is a small change to one file rather than a settings change for every developer.

Step 2: what to send

What SightLift needs

Each SightLift feature depends on a setting in Claude and on the collector passing the records along. This table shows what each feature needs.

What you get in SightLiftTurn on in ClaudeArrives asRecord type
Activity, adoption, cost CLAUDE_CODE_ENABLE_TELEMETRY
OTEL_LOGS_EXPORTER
log records logs
Accurate topic classification OTEL_LOG_USER_PROMPTS the prompt field on user_prompt log records logs
The MCP servers and skills your team uses; with automation harvesting on in Settings, candidate automations (the command that ran) OTEL_LOG_TOOL_DETAILS
OTEL_METRICS_INCLUDE_REPOSITORY (Claude Code 2.1.269 or newer)
the tool_parameters and tool_input fields, and the vcs.* attributes. SightLift keeps the names and the commit in tool_parameters, the vcs.* attributes, and from each Bash command only the branch it pushed and the pull request it created. It drops the rest on loading, unless automation harvesting is on logs
Verified capabilities (proof an automation reproduces your results) CLAUDE_CODE_ENHANCED_TELEMETRY_BETA
OTEL_TRACES_EXPORTER
OTEL_LOG_TOOL_CONTENT
a tool.output event on a span traces
Cowork activity Cowork's Monitoring settings, plus otlpContentCapture on each device
(metadata only without it)
log records (spans only where Anthropic exports Cowork traces) logs
Send both logs and traces. A tool's output travels in traces. A setup that sends only logs looks healthy and reports no errors, but SightLift can't verify automations without the traces. This is the most common thing to miss.
Good to knowWhy
Content is switched on in Claude The collector can remove information but can't add it back. If prompts are off in Claude (OTEL_LOG_USER_PROMPTS), they arrive as <REDACTED>, and nothing later in the chain can restore them.
Send SightLift the full stream SightLift ignores what it doesn't use, so there's no need to trim what goes to us. To limit what another tool receives, do it on that tool's route (see the optional section).
Metrics go to your existing tool only Metrics are summary counts that dashboards use. SightLift doesn't take them (it answers 405, "not accepted"), so the config below sends them only to your existing tool.

Step 3: keys

Get your SightLift key

You need the Admin role in SightLift.

Navigate to
app.sightlift.ai→ Settings→ Data & sources→ Anthropic Claude→ Live telemetry
  1. Choose your organization's plan under Your Anthropic plan, then open the Live telemetry tab.
  2. Generate your first key and copy the OTLP headers value straight away. It's shown only once.
Keep only the key.
You copied: Authorization=Bearer slk-otel-…
The collector needs: slk-otel-…
Delete Authorization=Bearer from the front. The collector adds Bearer itself. If you paste the whole string, the collector sends Bearer twice, and SightLift refuses every batch with a 401, which looks like a bad key.

If you don't have the Admin role, ask a SightLift admin at your company to create the key and send it to you securely. The same screen lists every key and can revoke one, so you can switch to a new key later without a gap: add the new one, update .env, then revoke the old one.

Also get your existing tool's OpenTelemetry details, from its setup docs or your contact there: the address to send to, the name of the header it expects, and its key. They go in the files in steps 4 and 5.

Step 4: the collector config

Which collector, and its config

Run this one

otelcol-contrib 0.157.0, the OpenTelemetry project's own collector (Docker image otel/opentelemetry-collector-contrib:0.157.0). Step 5 runs it as one container, and you install nothing else. Use this "contrib" edition rather than the plain one: the optional sections below need features only it includes.

Already running a collector? Skip steps 4 and 5. Add the otlp_http/sightlift exporter below to your config and list it on your logs and traces pipelines. Check two things first. It should be one shared collector that every machine sends to, not one running on each laptop. And its settings shouldn't already remove the content step 2 needs: many setups drop extra fields by default.

The config

Make a folder for the files. This is the first one, complete as shown: it receives from Claude and sends to two places.

collector.yaml

# Receive records from Claude Code, Cowork, and anything else you point here.
receivers:
  otlp:
    protocols:
      http:
        endpoint: 0.0.0.0:4318

processors:
  # Stops the collector using too much memory in a burst. Keep it first.
  memory_limiter:
    check_interval: 1s
    limit_mib: 512
    spike_limit_mib: 128
  batch: {}                     # groups records before sending. Keep it last.

exporters:
  # SightLift. These two addresses are used exactly as written, so they
  # include the full path. There's no metrics address, on purpose.
  otlp_http/sightlift:
    logs_endpoint: https://app.sightlift.ai/v1/logs
    traces_endpoint: https://app.sightlift.ai/v1/traces
    headers:
      Authorization: "Bearer ${env:SIGHTLIFT_INGEST_KEY}"

  # Your existing tool. Use the address and header name from its setup docs.
  # An address without a path, like this one, gets /v1/logs, /v1/traces and
  # /v1/metrics added automatically. If your tool provides its own exporter
  # (Datadog has one called `datadog`), you can use that here instead.
  otlp_http/existing:
    endpoint: https://otlp.your-tool.example
    headers:
      api-key: "${env:EXISTING_TOOL_API_KEY}"

service:
  pipelines:
    # Listing both destinations is what sends a copy to each.
    logs:
      receivers: [otlp]
      processors: [memory_limiter, batch]
      exporters: [otlp_http/sightlift, otlp_http/existing]

    # Keep this one: a tool's output travels in traces, not logs.
    traces:
      receivers: [otlp]
      processors: [memory_limiter, batch]
      exporters: [otlp_http/sightlift, otlp_http/existing]

    # Metrics go to your existing tool only. SightLift doesn't take them.
    metrics:
      receivers: [otlp]
      processors: [memory_limiter, batch]
      exporters: [otlp_http/existing]

  telemetry:
    # The collector's own counters, which step 8 uses to show that each
    # destination is receiving. 0.0.0.0 lets you read them from outside the
    # container. Step 5 keeps them private to the server.
    metrics:
      readers:
        - pull:
            exporter:
              prometheus:
                host: 0.0.0.0
                port: 8888
                # keeps the counter names as step 8 lists them
                without_type_suffix: true

Each destination works on its own. If one is slow or offline, the collector holds its records and retries, without holding up the other.

Send your existing tool only the record types it gets today. Check the copy you saved before you started. If it had no OTEL_TRACES_EXPORTER line, take otlp_http/existing out of the traces pipeline's exporters. A tool that doesn't accept traces would otherwise show as failing in step 8. Do the same for metrics if it had no OTEL_METRICS_EXPORTER line.

Step 5: run it

Add your keys and start the collector

Both keys go in a file named .env, in the same folder as collector.yaml. That keeps them out of the config file and your command history.

.env

# The SightLift key on its own, with no "Authorization=Bearer" in front. See step 3.
SIGHTLIFT_INGEST_KEY=your_slk-otel-key_here
EXISTING_TOOL_API_KEY=your_existing_tool_key

Then the Docker Compose file. It names an exact version, so the collector only changes when you choose to upgrade.

compose.yaml

services:
  otelcol:
    image: otel/opentelemetry-collector-contrib:0.157.0
    restart: unless-stopped
    env_file: .env
    volumes:
      # This image reads its config from this exact path, with the -contrib.
      - ./collector.yaml:/etc/otelcol-contrib/config.yaml:ro
    ports:
      - "4318:4318"                  # where Claude Code and Cowork send
      - "127.0.0.1:8888:8888"       # its own counters, this server only

Check the config first. This reads the file and checks each part, then stops without starting anything:

docker run --rm --env-file .env \
  -v "$PWD/collector.yaml:/etc/otelcol-contrib/config.yaml:ro" \
  otel/opentelemetry-collector-contrib:0.157.0 \
  validate --config=/etc/otelcol-contrib/config.yaml

No output means the config is valid. It doesn't test your keys: step 8 does that. Start the collector:

docker compose up -d
docker compose logs -f otelcol

Look for Everything is ready. Begin running and processing data. Step 8 shows whether records are reaching each destination.

Changed a file later? Run docker compose up -d again. docker compose restart keeps the old .env values, so a new key would be ignored.

Note: the collector image is deliberately minimal, so you can't open a shell inside it (docker compose exec otelcol sh fails). Use the validate command above and the counters in step 8 instead.

Step 6: give it an address

Put the collector behind HTTPS

Claude Code runs on each developer's machine, so the collector needs an https:// address those machines can reach, on the VPN and off it. If you use Cowork in the cloud, those sessions send from outside your network. In that case the address must also be reachable from the internet, with a certificate from a public authority rather than a self-signed or internal one.

The collector itself uses plain HTTP on port 4318. Choose one way to add HTTPS in front of it:

OptionWhenYour address
Your load balancer (most teams) You already have something that handles HTTPS for your services: a cloud load balancer, a Kubernetes ingress, or a web server such as nginx. Add a hostname there and send it to port 4318 on the collector's server. https://otel.example.com
Caddy beside the collector Nothing sits in front of the server yet. Caddy is a small, free web server that gets and renews a certificate by itself. It needs a DNS name pointing at the server, and ports 80 and 443 open to the internet. https://otel.example.com
Private network only For testing, or if every developer is always on the VPN. Laptops off the VPN won't report, and Cowork in the cloud can't reach it. http://otel.internal:4318

The Caddy option

Add this to compose.yaml and change otel.example.com to your hostname. Caddy now receives the traffic, so the collector's own port only needs to answer on the server: change its line to "127.0.0.1:4318:4318".

compose.yaml: add under services, and add the volumes section

  caddy:
    image: caddy:2.10.2
    restart: unless-stopped
    command: caddy reverse-proxy --from otel.example.com --to otelcol:4318
    ports:
      - "80:80"                      # used to get the certificate
      - "443:443"                    # HTTPS from Claude
    volumes:
      - caddy_data:/data             # keeps the certificate across restarts

volumes:
  caddy_data: {}

Keep port 8888 private whichever option you choose. It holds no conversation content, but it does show how much traffic you send.

Limit who can send to it

The collector accepts records from anything that can reach its address, and passes them on to SightLift and your existing tool using your keys. Limit who can reach it: allow only your office and VPN ranges in your firewall or load balancer.

If it has to be open to the internet (for Cowork in the cloud, say), also require a token. Make up a long random value, add it to .env as COLLECTOR_TOKEN=…, and add this to collector.yaml:

# 1. A new section at the top level.
extensions:
  bearertokenauth/claude:
    token: "${env:COLLECTOR_TOKEN}"

# 2. In receivers, under otlp / protocols / http, next to endpoint:
        auth:
          authenticator: bearertokenauth/claude

# 3. Under service, next to pipelines.
  extensions: [bearertokenauth/claude]

Then give Claude the same token. In step 7's block, add "OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer <your token>". In Cowork's Monitoring settings, put the same header in the headers field. Anything sent without the token is refused with a 401.

Step 7: point Claude at it

Send Claude Code and Cowork to your collector

This is the same as Connect Claude to SightLift, with two differences. The address is your collector. And there's no SightLift key here, because the collector holds the keys now. (If you set a collector token in step 6, add its header as that step says.)

Navigate to
claude.ai→ Organization settings→ Claude Code→ Managed settings→ Manage

Replace https://otel.example.com with your address from step 6. If your organization already has managed settings, add these lines to its env section rather than replacing the whole file.

{
  "env": {
    "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
    "CLAUDE_CODE_ENHANCED_TELEMETRY_BETA": "1",
    "OTEL_LOGS_EXPORTER": "otlp",
    "OTEL_TRACES_EXPORTER": "otlp",
    "OTEL_METRICS_EXPORTER": "otlp",
    "OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
    "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT": "https://otel.example.com/v1/logs",
    "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT": "https://otel.example.com/v1/traces",
    "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "https://otel.example.com/v1/metrics",
    "OTEL_LOG_USER_PROMPTS": "1",
    "OTEL_LOG_ASSISTANT_RESPONSES": "1",
    "OTEL_LOG_TOOL_DETAILS": "1",
    "OTEL_METRICS_INCLUDE_REPOSITORY": "true",
    "OTEL_LOG_TOOL_CONTENT": "1"
  }
}

OTEL_METRICS_INCLUDE_REPOSITORY needs Claude Code 2.1.269 or newer.

One address per record type, each with its full path. Claude uses these three exactly as written, so each ends in its own /v1/…. They're set one per type on purpose: a per-type setting always takes priority over the general OTEL_EXPORTER_OTLP_ENDPOINT, so setting all three here means no older value can take priority over them.

Move your existing tool's settings over as you go. If Claude Code sends straight to your existing tool today, your managed settings probably include:
  • OTEL_EXPORTER_OTLP_ENDPOINT
  • per-type addresses (…_LOGS_ENDPOINT, …_TRACES_ENDPOINT, …_METRICS_ENDPOINT)
  • OTEL_EXPORTER_OTLP_HEADERS, holding that tool's key
Replace the addresses with the block above. Remove the headers line: that key now lives in the collector's .env file. (The one exception is a collector token from step 6.) Ask developers to remove the same settings from their own ~/.claude/settings.json or shell profile, so every machine goes through the collector.
The OTEL_LOG_* lines turn on the content SightLift learns from. They're off by default and can only be turned on here, in Claude. Anything left off never reaches your collector, so it can't be passed on. Turn them on team by team as your security review allows. What each one unlocks: data access & privacy.
These settings reach every destination, not just SightLift. With step 4's config, your existing tool receives the same prompts and tool details as SightLift. Check the copy you saved before you started. If those OTEL_LOG_… lines were off, this is new data for your existing tool, and your security or privacy review may want to see it first. To keep that tool's copy as it was, use the "no conversation content" setting in the optional section.

Cowork

Go to Organization settings → Data and privacy → Monitoring. In the Cowork, Cowork in the cloud, and unified chat and Cowork section, set OTLP endpoint to your address from step 6 (https://otel.example.com, with no path) and the protocol to http/json. Leave headers and resource attributes blank. When you save, Cowork allows your address through its sandbox and shows a note under the field to say so.

That sets where Cowork sends its records, not what they carry. For prompt text and tool details, deploy the otlpContentCapture device setting in the setup guide. Without it, current versions of Claude Desktop send metadata only. Like the OTEL_LOG_… lines above, that content reaches every destination your collector sends to, so check what your existing tool should receive before IT deploys it.

Step 8: check it works

Confirm both destinations are receiving

Run a Claude Code session on a machine that has the new settings. Claude Code reads these settings only when it starts, so restart it first. Then, on the collector's server, ask the collector what it has done:

curl -s localhost:8888/metrics | grep -E 'otelcol_(receiver_accepted|exporter_sent|exporter_send_failed|exporter_queue_size)'

Read the output in this order:

CounterWhat it tells you
otelcol_receiver_accepted_log_records
otelcol_receiver_accepted_spans
Claude is reaching the collector. Both should go up: spans as well as logs.
otelcol_exporter_sent_log_records
otelcol_exporter_sent_spans
Records delivered, per destination. You should see a separate rising number for otlp_http/sightlift and for otlp_http/existing.
otelcol_exporter_send_failed_log_records
otelcol_exporter_send_failed_spans
Should stay at zero. The destination's name on the line tells you which settings to check.
otelcol_exporter_queue_sizeShould stay near zero. A number that stays up means that destination can't be reached and the collector is retrying.

Before any records arrive, the command prints nothing at all, and a send_failed line appears only after a first failure. A missing line means zero.

Each destination gets its own line, so "SightLift is receiving" and "my existing tool is still receiving" are two separate checks. You can confirm both today rather than taking either on trust.

Allow five minutes for a problem to show. A wrong key shows as failed straight away. A destination the collector can't reach at all (a wrong address, or a firewall) is retried for up to five minutes first. Until then it shows only as a queue_size above zero.

Once sent goes up for otlp_http/sightlift on both logs and spans, you're done. Activity appears in SightLift within the hour. SightLift starts from now: it can't fetch earlier activity this way.

Troubleshooting

Nothing showing up? Find where it stops

"No data in SightLift" looks the same wherever the problem is, so work down this table rather than changing several things at once. The counters from step 8 tell you which row you're in.

What you seeWhere it stopsWhat to check
receiver_accepted stays at zero Claude → collector Claude Code reads its settings only when it starts, so restart it. Check the address works from that machine, and that each address setting ends in its /v1/… path. Then look for older address settings (step 7) still pointing at your existing tool.
Logs arriving, spans at zero Claude's settings Needs CLAUDE_CODE_ENHANCED_TELEMETRY_BETA and OTEL_TRACES_EXPORTER set, and a traces pipeline in your config.
send_failed going up for otlp_http/sightlift collector → SightLift Almost always the key: SIGHTLIFT_INGEST_KEY must be the key on its own. Records refused for a wrong key aren't retried, so fix the key and the next records will go through.
queue_size stays up, no send_failed yet collector → that destination The collector can't reach it and is retrying. Check DNS and outbound firewall rules from the collector's server to that destination's address.
Everything looks healthy, still nothing in SightLift the key The key tells SightLift which organization the data belongs to. A key from a different SightLift organization works, but the data lands there. Create a new key in Live telemetry.
Data arriving, prompts read <REDACTED> Claude's settings OTEL_LOG_USER_PROMPTS is off. Only Claude's settings can change this.
Collector running, sending nothing anywhere the config file location It isn't reading your file and is running its built-in default. The path must be /etc/otelcol-contrib/config.yaml, with the -contrib. That default also writes everything it receives, prompts included, into the collector's own log. Once the path is fixed, run docker compose down and then docker compose up -d: removing the container clears that log.

Still stuck? We're happy to help. Send the step-8 curl output and your collector.yaml (with keys removed) to support@sightlift.ai.

Optional

Send each tool only what it needs

Each destination can get its own version of the stream. SightLift wants everything from Claude Code and Cowork. Your existing tool may need less. This file gives it two independent settings, and you can use either one or both:

  • Claude Code only. Your existing tool gets no Cowork records. Useful when it is built around engineering work, as many developer-analytics tools are.
  • No conversation content. Your existing tool still gets every event, with timings, tokens and costs. It doesn't get the text of prompts, replies, commands or tool output. Check with your tool's team first: if any of its features read prompt text, leave this one out.

This is a complete collector.yaml that replaces the one from step 4. Each destination gets its own pipelines, and the two settings sit only on your existing tool's.

collector.yaml (replaces step 4's)

receivers:
  otlp:
    protocols:
      http:
        endpoint: 0.0.0.0:4318

processors:
  memory_limiter:
    check_interval: 1s
    limit_mib: 512
    spike_limit_mib: 128
  batch: {}

  # Setting 1, "Claude Code only": leaves out records from Cowork.
  filter/claude_code_only:
    error_mode: ignore
    logs:
      log_record:
        - 'resource.attributes["service.name"] == "cowork"'
    traces:
      span:
        - 'resource.attributes["service.name"] == "cowork"'
    metrics:
      metric:
        - 'resource.attributes["service.name"] == "cowork"'

  # Setting 2, "no conversation content": removes the prompt, the reply,
  # the tool's input and the command that ran. Event names, prompt.id,
  # tool names, timings, tokens and cost all stay.
  transform/no_content:
    error_mode: ignore
    log_statements:
      - delete_matching_keys(log.attributes, "^(prompt|response|tool_input|tool_parameters)$")
    trace_statements:
      - delete_matching_keys(span.attributes, "^(user_prompt|full_command|tool[.]output)$")
  # Part of setting 2: removes the tool's output, which travels in traces.
  filter/no_tool_output:
    error_mode: ignore
    traces:
      spanevent:
        - 'name == "tool.output"'

exporters:
  otlp_http/sightlift:
    logs_endpoint: https://app.sightlift.ai/v1/logs
    traces_endpoint: https://app.sightlift.ai/v1/traces
    headers:
      Authorization: "Bearer ${env:SIGHTLIFT_INGEST_KEY}"
  otlp_http/existing:
    endpoint: https://otlp.your-tool.example
    headers:
      api-key: "${env:EXISTING_TOOL_API_KEY}"

service:
  pipelines:
    # SightLift: everything, from Claude Code and Cowork.
    logs/sightlift:
      receivers: [otlp]
      processors: [memory_limiter, batch]
      exporters: [otlp_http/sightlift]
    traces/sightlift:
      receivers: [otlp]
      processors: [memory_limiter, batch]
      exporters: [otlp_http/sightlift]

    # Your existing tool. To drop a setting, delete its name from these lists:
    # filter/claude_code_only for setting 1, and transform/no_content and
    # filter/no_tool_output for setting 2.
    logs/existing:
      receivers: [otlp]
      processors: [memory_limiter, filter/claude_code_only, transform/no_content, batch]
      exporters: [otlp_http/existing]
    traces/existing:
      receivers: [otlp]
      processors: [memory_limiter, filter/claude_code_only, transform/no_content, filter/no_tool_output, batch]
      exporters: [otlp_http/existing]
    metrics:
      receivers: [otlp]
      processors: [memory_limiter, filter/claude_code_only, batch]
      exporters: [otlp_http/existing]

  telemetry:
    metrics:
      readers:
        - pull:
            exporter:
              prometheus:
                host: 0.0.0.0
                port: 8888
                without_type_suffix: true

One receiver can feed any number of pipelines, and each one gets its own copy. Names like logs/sightlift are just how the collector tells two pipelines for the same record type apart. Check the file and restart, as in step 5.

See exactly what your existing tool receives. The field names above are the ones Claude Code and Cowork send today. If Claude adds a new field later, setting 2 won't remove it until you add it to the list. To check, add the debug exporter (debug: {verbosity: detailed}) to your existing tool's pipelines for a few minutes, then read docker compose logs otelcol.

Use these on your existing tool's pipelines only. On SightLift's they'd remove what classification and automation checks rely on, and work done while they were on can't be recovered later. If your security review says content can't leave your network at all, talk to us about a metadata-only setup.

Optional

Keep records safe through a restart

When a destination can't be reached, the collector holds its records in memory to send later. If the collector restarts during that time, what it was holding is lost. Saving that queue to disk prevents this (SightLift's own collector does the same). Make three changes to collector.yaml:

# 1. A new section at the top level.
extensions:
  file_storage/queue:
    directory: /var/lib/otelcol/storage
    timeout: 10s

# 2. Under BOTH exporters (otlp_http/sightlift and otlp_http/existing), next to
#    their addresses and headers:
    sending_queue:
      enabled: true
      storage: file_storage/queue
    retry_on_failure:
      enabled: true
      initial_interval: 5s
      max_interval: 30s
      max_elapsed_time: 300s

# 3. Under service, next to pipelines. The collector needs both 1 and 3.
  extensions: [file_storage/queue]

Then make a folder for the queue, owned by the user the collector runs as (user number 10001):

mkdir -p ./otelcol-queue
sudo chown 10001:10001 ./otelcol-queue

Add the folder to compose.yaml, next to the config file:

    volumes:
      - ./collector.yaml:/etc/otelcol-contrib/config.yaml:ro
      - ./otelcol-queue:/var/lib/otelcol/storage

The step-5 check needs the folder too, or it stops with directory must exist:

docker run --rm --env-file .env \
  -v "$PWD/collector.yaml:/etc/otelcol-contrib/config.yaml:ro" \
  -v "$PWD/otelcol-queue:/var/lib/otelcol/storage" \
  otel/opentelemetry-collector-contrib:0.157.0 \
  validate --config=/etc/otelcol-contrib/config.yaml
On Linux, run the chown line. A new folder belongs to root, and the collector runs as user 10001, so without it the collector can't write there and stops with a permission error. Docker Desktop on a Mac handles this for you.

What the queue doesn't cover: a wrong key. Records refused for a wrong key aren't retried, with or without the queue.

Reference

Notes and other environments

Kubernetes

The official Helm chart open-telemetry/opentelemetry-collector with mode: deployment gives the same setup. Put the collector.yaml above under the chart's config: key. The chart leaves image.repository empty, so set it to otel/opentelemetry-collector-contrib. Your ingress does step 6's job. We're glad to walk through your setup with you.

Upstream documentation