# Collector profiles

Bucker publishes five **collector profiles**: versioned configurations for the upstream
OpenTelemetry Collector (`otelcol-contrib`, `otelcol-k8s`) or Grafana Alloy, which send a host's, a
machine's, a service's or a small cluster's own metrics to your Bucker project over OTLP/HTTP.

There is no Bucker binary and no host agent. A profile is **data**: Bucker never installs it, never
connects to your systems to apply it, and never holds your Collector's credentials. You copy the
configuration into software you run. Bucker does not emit a Vector document: Vector's OTLP sink does
not carry metrics, so a Vector configuration would send nothing the allowlist priced.

## How a profile works

- **Your DSN stays in your environment.** Every configuration reads the project DSN from
  `${env:BUCKER_DSN}` and sends it as `Authorization: DSN …`. The key is never written in the file.
  The endpoint is the project's own OTLP base URL (the examples below use a placeholder).
- **An allowlist of series.** A `filter/allowlist` processor drops every metric the revision does not
  name, so what your Collector sends is exactly what was priced. Two tiers per profile, `minimal` and
  `standard`. The saturation floor (liveness, memory against its limit, restarts) is collected at every
  tier and no narrowing can remove it.
- **Defaults.** 60 s interval, `cumulativetodelta`, a file-backed `sending_queue`, `memory_limiter`,
  a `resource` step that stamps `bucker.profile.id` and `bucker.profile.revision` on every point,
  read-only RBAC where Kubernetes is involved, and Stable or Beta components only.
- **Revisions.** Every change is a new revision; superseded revisions are kept 90 days. A change that
  only narrows (a lower tier, a longer interval, metrics left off the allowlist) is proposed by an agent
  or a person and needs a human's yes. A change that widens (a metric or receiver added, a shorter
  interval, `minimal` to `standard`) is a person's act with `org:admin`.
- **What it costs, before you install it.** Each profile states its series and units per entity at
  60 s, at the weight the meter charges a metric point today (0.05) and at the weight proposed for
  infrastructure series (0.005, not yet decided). One series is 43,200 points in a 30-day month.

100 hosts x 50 series at 10 s is 1,500 units a minute at 0.05: it empties Free in 33 minutes and Pro in 5.6 hours.

## The five profiles

| Profile | One entity is | Series | Units a month at 0.05 | at 0.005 | Entities on Free / Pro / Team at 0.05 | at 0.005 |
|---|---|---|---|---|---|---|
| `fly` | Fly machine | 10 | 21,600 | 2,160 | 2 / 23 / 115 | 23 / 231 / 1157 |
| `serverless` | function or service | 8 | 17,280 | 1,728 | 2 / 28 / 144 | 28 / 289 / 1446 |
| `render` | Render instance | 6 | 12,960 | 1,296 | 3 / 38 / 192 | 38 / 385 / 1929 |
| `vm` | host | 12 | 25,920 | 2,592 | 1 / 19 / 96 | 19 / 192 / 964 |
| `k8s_small` | node with 10 pods and 3 workloads | 70 | 151,200 | 15,120 | 0 / 3 / 16 | 3 / 33 / 165 |

## `fly`: Fly.io machines

A Collector app on Fly federates the organization’s managed Prometheus and pushes OTLP/HTTP to Bucker.

Series per Fly machine: **10** at the standard tier. Basis:

- 10 series per Fly machine: the sum of the 9 allowlisted metrics
- 43,200 points a series in a 30-day month at 60 s
- units = points x weight; weights 0.05 (charged today) and 0.005 (proposed, OD-DP-06, undecided)

| Metric | Series | Per | Tier | Floor |
|---|---|---|---|---|
| `fly_instance_up` | 1 | entity | minimal and standard | yes |
| `fly_instance_cpu` | 2 | entity | minimal and standard |  |
| `fly_instance_memory_mem_total` | 1 | entity | standard |  |
| `fly_instance_memory_mem_available` | 1 | entity | minimal and standard | yes |
| `fly_instance_memory_mem_free` | 1 | entity | standard |  |
| `fly_instance_load_average` | 1 | entity | standard |  |
| `fly_instance_net_recv_bytes` | 1 | entity | standard |  |
| `fly_instance_net_sent_bytes` | 1 | entity | standard |  |
| `fly_instance_filesystem_blocks_avail` | 1 | entity | minimal and standard | yes |

- The federation request carries `${env:FLY_API_TOKEN}`: a read-only organization token held by the customer, never by Bucker.
- Machine and app come from the federated labels `instance` and `app`, mapped to resource attributes by a `transform` step.

Configuration for `otelcol-contrib` (`fly-single.otelcol-contrib.yaml`). Alloy runs the same document with `alloy otel --config=<file>`.

<!-- profile:fly:otelcol-contrib:single -->
```yaml
# Bucker collector profile: Fly.io machines (fly, standard tier)
# Profile PROFILE_ID, revision 1. Generated; change it through the profile, not by hand.
# Interval 60s. Role: single.
# Set BUCKER_DSN (the project DSN) in the environment of the process; it is never written here.
# Validate with: otelcol-contrib validate --config=<this file>
extensions:
  health_check:
    endpoint: 0.0.0.0:13133
  file_storage/bucker:
    directory: /var/lib/otelcol/bucker-queue
    create_directory: true
receivers:
  prometheus/fly:
    config:
      scrape_configs:
        - job_name: fly-federate
          scheme: https
          honor_labels: true
          metrics_path: /prometheus/${env:FLY_ORG}/federate
          authorization:
            type: Bearer
            credentials: ${env:FLY_API_TOKEN}
          params:
            match[]:
              - '{__name__=~"fly_instance_.*"}'
          static_configs:
            - targets:
                - api.fly.io
          scrape_interval: 60s
          scrape_timeout: 30s
processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 20
  transform/fly:
    error_mode: ignore
    metric_statements:
      - context: datapoint
        statements:
          - set(resource.attributes["fly.machine.id"], attributes["instance"]) where attributes["instance"] != nil
          - set(resource.attributes["fly.app.name"], attributes["app"]) where attributes["app"] != nil
          - set(resource.attributes["fly.region"], attributes["region"]) where attributes["region"] != nil
  filter/allowlist:
    error_mode: ignore
    metrics:
      metric:
        - not (name == "fly_instance_up" or name == "fly_instance_cpu" or name == "fly_instance_memory_mem_total" or name == "fly_instance_memory_mem_available" or name == "fly_instance_memory_mem_free" or name == "fly_instance_load_average" or name == "fly_instance_net_recv_bytes" or name == "fly_instance_net_sent_bytes" or name == "fly_instance_filesystem_blocks_avail")
  cumulativetodelta: {}
  resource/bucker:
    attributes:
      - key: bucker.profile.id
        value: PROFILE_ID
        action: upsert
      - key: bucker.profile.revision
        value: 1
        action: upsert
      - key: cloud.provider
        value: fly_io
        action: upsert
  batch:
    timeout: 10s
    send_batch_size: 2000
    send_batch_max_size: 2500
exporters:
  otlphttp/bucker:
    endpoint: https://us.ingest.example.com/api/PROJECT_ID/otlp
    headers:
      Authorization: DSN ${env:BUCKER_DSN}
    compression: gzip
    sending_queue:
      enabled: true
      storage: file_storage/bucker
      queue_size: 5000
    retry_on_failure:
      enabled: true
      initial_interval: 5s
      max_interval: 30s
      max_elapsed_time: 300s
service:
  extensions:
    - health_check
    - file_storage/bucker
  pipelines:
    metrics:
      receivers:
        - prometheus/fly
      processors:
        - memory_limiter
        - transform/fly
        - filter/allowlist
        - cumulativetodelta
        - resource/bucker
        - batch
      exporters:
        - otlphttp/bucker
```

## `serverless`: AWS Lambda and ECS Fargate

CloudWatch Metric Streams (OTel 1.0) reach a Collector’s Firehose receiver, which pushes OTLP/HTTP to Bucker.

Series per function or service: **8** at the standard tier. Basis:

- 8 series per function or service: the sum of the 8 allowlisted metrics
- 43,200 points a series in a 30-day month at 60 s
- units = points x weight; weights 0.05 (charged today) and 0.005 (proposed, OD-DP-06, undecided)
- an upper bound: a function reports the Lambda half of the allowlist, a service the ECS half

| Metric | Series | Per | Tier | Floor |
|---|---|---|---|---|
| `amazonaws.com/AWS/Lambda/Invocations` | 1 | entity | minimal and standard |  |
| `amazonaws.com/AWS/Lambda/Errors` | 1 | entity | minimal and standard | yes |
| `amazonaws.com/AWS/Lambda/Throttles` | 1 | entity | standard |  |
| `amazonaws.com/AWS/Lambda/Duration` | 1 | entity | minimal and standard |  |
| `amazonaws.com/AWS/Lambda/ConcurrentExecutions` | 1 | entity | standard |  |
| `amazonaws.com/AWS/ECS/CPUUtilization` | 1 | entity | standard |  |
| `amazonaws.com/AWS/ECS/MemoryUtilization` | 1 | entity | minimal and standard | yes |
| `amazonaws.com/ECS/ContainerInsights/RunningTaskCount` | 1 | entity | standard |  |

- The Firehose delivery stream needs the receiver’s HTTPS endpoint and the access key in `${env:FIREHOSE_ACCESS_KEY}`.
- Cloud Run and Azure Container Apps are not covered by this revision.

Configuration for `otelcol-contrib` (`serverless-single.otelcol-contrib.yaml`). Alloy runs the same document with `alloy otel --config=<file>`.

<!-- profile:serverless:otelcol-contrib:single -->
```yaml
# Bucker collector profile: AWS Lambda and ECS Fargate (serverless, standard tier)
# Profile PROFILE_ID, revision 1. Generated; change it through the profile, not by hand.
# Interval 60s. Role: single.
# Set BUCKER_DSN (the project DSN) in the environment of the process; it is never written here.
# Validate with: otelcol-contrib validate --config=<this file>
extensions:
  health_check:
    endpoint: 0.0.0.0:13133
  file_storage/bucker:
    directory: /var/lib/otelcol/bucker-queue
    create_directory: true
receivers:
  awsfirehose:
    endpoint: 0.0.0.0:4433
    record_type: otlp_v1
    access_key: ${env:FIREHOSE_ACCESS_KEY}
processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 20
  transform/faas:
    error_mode: ignore
    metric_statements:
      - context: datapoint
        statements:
          - set(resource.attributes["faas.name"], attributes["FunctionName"]) where attributes["FunctionName"] != nil
          - set(resource.attributes["cloud.platform"], "aws_lambda") where attributes["FunctionName"] != nil
  filter/allowlist:
    error_mode: ignore
    metrics:
      metric:
        - not (name == "amazonaws.com/AWS/Lambda/Invocations" or name == "amazonaws.com/AWS/Lambda/Errors" or name == "amazonaws.com/AWS/Lambda/Throttles" or name == "amazonaws.com/AWS/Lambda/Duration" or name == "amazonaws.com/AWS/Lambda/ConcurrentExecutions" or name == "amazonaws.com/AWS/ECS/CPUUtilization" or name == "amazonaws.com/AWS/ECS/MemoryUtilization" or name == "amazonaws.com/ECS/ContainerInsights/RunningTaskCount")
  cumulativetodelta: {}
  resource/bucker:
    attributes:
      - key: bucker.profile.id
        value: PROFILE_ID
        action: upsert
      - key: bucker.profile.revision
        value: 1
        action: upsert
  batch:
    timeout: 10s
    send_batch_size: 2000
    send_batch_max_size: 2500
exporters:
  otlphttp/bucker:
    endpoint: https://us.ingest.example.com/api/PROJECT_ID/otlp
    headers:
      Authorization: DSN ${env:BUCKER_DSN}
    compression: gzip
    sending_queue:
      enabled: true
      storage: file_storage/bucker
      queue_size: 5000
    retry_on_failure:
      enabled: true
      initial_interval: 5s
      max_interval: 30s
      max_elapsed_time: 300s
service:
  extensions:
    - health_check
    - file_storage/bucker
  pipelines:
    metrics:
      receivers:
        - awsfirehose
      processors:
        - memory_limiter
        - transform/faas
        - filter/allowlist
        - cumulativetodelta
        - resource/bucker
        - batch
      exporters:
        - otlphttp/bucker
```

## `render`: Render services

Render streams OTLP metrics to a relay Collector the customer runs, which filters and pushes OTLP/HTTP to Bucker.

Series per Render instance: **6** at the standard tier. Basis:

- 6 series per Render instance: the sum of the 6 allowlisted metrics
- 43,200 points a series in a 30-day month at 60 s
- units = points x weight; weights 0.05 (charged today) and 0.005 (proposed, OD-DP-06, undecided)

| Metric | Series | Per | Tier | Floor |
|---|---|---|---|---|
| `render.instance.count` | 1 | entity | minimal and standard | yes |
| `render.cpu.usage` | 1 | entity | minimal and standard |  |
| `render.memory.usage` | 1 | entity | minimal and standard | yes |
| `render.memory.limit` | 1 | entity | minimal and standard | yes |
| `render.http.requests` | 1 | entity | standard |  |
| `render.network.bandwidth` | 1 | entity | standard |  |

- The relay authenticates Render with `${env:RENDER_STREAM_TOKEN}`; Render sends it as a bearer token.
- Metric names are provisional until confirmed against a live Render stream.

Configuration for `otelcol-contrib` (`render-single.otelcol-contrib.yaml`). Alloy runs the same document with `alloy otel --config=<file>`.

<!-- profile:render:otelcol-contrib:single -->
```yaml
# Bucker collector profile: Render services (render, standard tier)
# Profile PROFILE_ID, revision 1. Generated; change it through the profile, not by hand.
# Interval 60s. Role: single.
# Set BUCKER_DSN (the project DSN) in the environment of the process; it is never written here.
# Validate with: otelcol-contrib validate --config=<this file>
extensions:
  health_check:
    endpoint: 0.0.0.0:13133
  file_storage/bucker:
    directory: /var/lib/otelcol/bucker-queue
    create_directory: true
  bearertokenauth/render:
    token: ${env:RENDER_STREAM_TOKEN}
receivers:
  otlp/render:
    protocols:
      http:
        endpoint: 0.0.0.0:4318
        auth:
          authenticator: bearertokenauth/render
processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 20
  filter/allowlist:
    error_mode: ignore
    metrics:
      metric:
        - not (name == "render.instance.count" or name == "render.cpu.usage" or name == "render.memory.usage" or name == "render.memory.limit" or name == "render.http.requests" or name == "render.network.bandwidth")
  cumulativetodelta: {}
  resource/bucker:
    attributes:
      - key: bucker.profile.id
        value: PROFILE_ID
        action: upsert
      - key: bucker.profile.revision
        value: 1
        action: upsert
  batch:
    timeout: 10s
    send_batch_size: 2000
    send_batch_max_size: 2500
exporters:
  otlphttp/bucker:
    endpoint: https://us.ingest.example.com/api/PROJECT_ID/otlp
    headers:
      Authorization: DSN ${env:BUCKER_DSN}
    compression: gzip
    sending_queue:
      enabled: true
      storage: file_storage/bucker
      queue_size: 5000
    retry_on_failure:
      enabled: true
      initial_interval: 5s
      max_interval: 30s
      max_elapsed_time: 300s
service:
  extensions:
    - health_check
    - file_storage/bucker
    - bearertokenauth/render
  pipelines:
    metrics:
      receivers:
        - otlp/render
      processors:
        - memory_limiter
        - filter/allowlist
        - cumulativetodelta
        - resource/bucker
        - batch
      exporters:
        - otlphttp/bucker
```

## `vm`: Virtual machine or bare-metal host

The Collector runs on the host and scrapes it with `hostmetrics`, then pushes OTLP/HTTP to Bucker.

Series per host: **12** at the standard tier. Basis:

- 12 series per host: the sum of the 9 allowlisted metrics
- 43,200 points a series in a 30-day month at 60 s
- units = points x weight; weights 0.05 (charged today) and 0.005 (proposed, OD-DP-06, undecided)

| Metric | Series | Per | Tier | Floor |
|---|---|---|---|---|
| `system.cpu.utilization` | 2 | entity | minimal and standard |  |
| `system.cpu.load_average.1m` | 1 | entity | minimal and standard |  |
| `system.cpu.load_average.5m` | 1 | entity | standard |  |
| `system.cpu.load_average.15m` | 1 | entity | standard |  |
| `system.memory.utilization` | 1 | entity | minimal and standard | yes |
| `system.memory.usage` | 1 | entity | standard |  |
| `system.filesystem.utilization` | 1 | entity | minimal and standard | yes |
| `system.disk.io` | 2 | entity | standard |  |
| `system.network.io` | 2 | entity | standard |  |

- Run as a systemd service or Windows service; the queue directory must survive a restart.
- The opt-in `process` scraper adds a series per process and is a widening.

Configuration for `otelcol-contrib` (`vm-single.otelcol-contrib.yaml`). Alloy runs the same document with `alloy otel --config=<file>`.

<!-- profile:vm:otelcol-contrib:single -->
```yaml
# Bucker collector profile: Virtual machine or bare-metal host (vm, standard tier)
# Profile PROFILE_ID, revision 1. Generated; change it through the profile, not by hand.
# Interval 60s. Role: single.
# Set BUCKER_DSN (the project DSN) in the environment of the process; it is never written here.
# Validate with: otelcol-contrib validate --config=<this file>
extensions:
  health_check:
    endpoint: 0.0.0.0:13133
  file_storage/bucker:
    directory: /var/lib/otelcol/bucker-queue
    create_directory: true
receivers:
  hostmetrics:
    collection_interval: 60s
    scrapers:
      cpu:
        metrics:
          system.cpu.utilization:
            enabled: true
      load: {}
      memory:
        metrics:
          system.memory.utilization:
            enabled: true
      filesystem:
        metrics:
          system.filesystem.utilization:
            enabled: true
      disk: {}
      network: {}
processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 20
  resourcedetection:
    detectors:
      - env
      - system
      - ec2
      - gcp
      - azure
    timeout: 5s
    override: false
    system:
      hostname_sources:
        - os
      resource_attributes:
        host.id:
          enabled: true
        host.name:
          enabled: true
  filter/allowlist:
    error_mode: ignore
    metrics:
      metric:
        - not (name == "system.cpu.utilization" or name == "system.cpu.load_average.1m" or name == "system.cpu.load_average.5m" or name == "system.cpu.load_average.15m" or name == "system.memory.utilization" or name == "system.memory.usage" or name == "system.filesystem.utilization" or name == "system.disk.io" or name == "system.network.io")
  cumulativetodelta: {}
  resource/bucker:
    attributes:
      - key: bucker.profile.id
        value: PROFILE_ID
        action: upsert
      - key: bucker.profile.revision
        value: 1
        action: upsert
  batch:
    timeout: 10s
    send_batch_size: 2000
    send_batch_max_size: 2500
exporters:
  otlphttp/bucker:
    endpoint: https://us.ingest.example.com/api/PROJECT_ID/otlp
    headers:
      Authorization: DSN ${env:BUCKER_DSN}
    compression: gzip
    sending_queue:
      enabled: true
      storage: file_storage/bucker
      queue_size: 5000
    retry_on_failure:
      enabled: true
      initial_interval: 5s
      max_interval: 30s
      max_elapsed_time: 300s
service:
  extensions:
    - health_check
    - file_storage/bucker
  pipelines:
    metrics:
      receivers:
        - hostmetrics
      processors:
        - memory_limiter
        - resourcedetection
        - filter/allowlist
        - cumulativetodelta
        - resource/bucker
        - batch
      exporters:
        - otlphttp/bucker
```

## `k8s_small`: Small Kubernetes cluster

A node DaemonSet and one cluster Deployment run the upstream Collector with read-only RBAC and push OTLP/HTTP to Bucker.

Series per node with 10 pods and 3 workloads: **70** at the standard tier. Basis:

- 70 series per node with 10 pods and 3 workloads: the sum of the 12 allowlisted metrics
- 43,200 points a series in a 30-day month at 60 s
- units = points x weight; weights 0.05 (charged today) and 0.005 (proposed, OD-DP-06, undecided)
- stated for 10 pods and 3 workloads a node

| Metric | Series | Per | Tier | Floor |
|---|---|---|---|---|
| `k8s.node.cpu.utilization` | 1 | entity | minimal and standard |  |
| `k8s.node.memory.working_set` | 1 | entity | standard |  |
| `k8s.node.memory.available` | 1 | entity | minimal and standard | yes |
| `k8s.node.network.io` | 2 | entity | standard |  |
| `k8s.pod.cpu.utilization` | 1 | pod | standard |  |
| `k8s.pod.memory.working_set` | 1 | pod | standard |  |
| `k8s.pod.network.io` | 2 | pod | standard |  |
| `k8s.pod.memory_limit_utilization` | 1 | pod | minimal and standard | yes |
| `k8s.container.restarts` | 1 | pod | minimal and standard | yes |
| `system.filesystem.utilization` | 1 | entity | standard |  |
| `k8s.node.condition_ready` | 1 | entity | minimal and standard | yes |
| `k8s.deployment.available` | 1 | workload | minimal and standard |  |

- Read-only RBAC: get, list and watch on nodes, pods, namespaces, events and the workload kinds; nothing else.
- `insecure_skip_verify` is the kubelet’s self-signed in-cluster default; replace it with the cluster CA where one is available.
- Events (`k8sobjects`) are log records priced by the log weights, not by the metric series figure.
- Container include and exclude rules by namespace, label and image are a later narrowing and are priced when added.

Configuration for `otelcol-k8s`, role `node` (`k8s_small-node.otelcol-k8s.yaml`). Alloy runs the same document with `alloy otel --config=<file>`.

<!-- profile:k8s_small:otelcol-k8s:node -->
```yaml
# Bucker collector profile: Small Kubernetes cluster (k8s_small, standard tier)
# Profile PROFILE_ID, revision 1. Generated; change it through the profile, not by hand.
# Interval 60s. Role: node.
# Set BUCKER_DSN (the project DSN) in the environment of the process; it is never written here.
# Validate with: otelcol-k8s validate --config=<this file>
extensions:
  health_check:
    endpoint: 0.0.0.0:13133
  file_storage/bucker:
    directory: /var/lib/otelcol/bucker-queue
    create_directory: true
receivers:
  kubeletstats:
    collection_interval: 60s
    auth_type: serviceAccount
    endpoint: https://${env:K8S_NODE_IP}:10250
    insecure_skip_verify: true
    metric_groups:
      - node
      - pod
    metrics:
      k8s.node.cpu.utilization:
        enabled: true
      k8s.pod.cpu.utilization:
        enabled: true
      k8s.pod.memory_limit_utilization:
        enabled: true
  hostmetrics:
    collection_interval: 60s
    root_path: /hostfs
    scrapers:
      filesystem:
        metrics:
          system.filesystem.utilization:
            enabled: true
processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 20
  k8sattributes:
    auth_type: serviceAccount
    passthrough: false
    extract:
      metadata:
        - k8s.node.name
        - k8s.namespace.name
        - k8s.pod.name
        - k8s.pod.uid
        - k8s.deployment.name
        - k8s.statefulset.name
        - k8s.daemonset.name
    pod_association:
      - sources:
          - from: resource_attribute
            name: k8s.pod.uid
      - sources:
          - from: connection
  filter/allowlist:
    error_mode: ignore
    metrics:
      metric:
        - not (name == "k8s.node.cpu.utilization" or name == "k8s.node.memory.working_set" or name == "k8s.node.memory.available" or name == "k8s.node.network.io" or name == "k8s.pod.cpu.utilization" or name == "k8s.pod.memory.working_set" or name == "k8s.pod.network.io" or name == "k8s.pod.memory_limit_utilization" or name == "k8s.container.restarts" or name == "system.filesystem.utilization")
  cumulativetodelta: {}
  resource/bucker:
    attributes:
      - key: bucker.profile.id
        value: PROFILE_ID
        action: upsert
      - key: bucker.profile.revision
        value: 1
        action: upsert
      - key: k8s.cluster.name
        value: ${env:K8S_CLUSTER_NAME}
        action: upsert
      - key: k8s.node.name
        value: ${env:K8S_NODE_NAME}
        action: insert
  batch:
    timeout: 10s
    send_batch_size: 2000
    send_batch_max_size: 2500
exporters:
  otlphttp/bucker:
    endpoint: https://us.ingest.example.com/api/PROJECT_ID/otlp
    headers:
      Authorization: DSN ${env:BUCKER_DSN}
    compression: gzip
    sending_queue:
      enabled: true
      storage: file_storage/bucker
      queue_size: 5000
    retry_on_failure:
      enabled: true
      initial_interval: 5s
      max_interval: 30s
      max_elapsed_time: 300s
service:
  extensions:
    - health_check
    - file_storage/bucker
  pipelines:
    metrics:
      receivers:
        - kubeletstats
        - hostmetrics
      processors:
        - memory_limiter
        - k8sattributes
        - filter/allowlist
        - cumulativetodelta
        - resource/bucker
        - batch
      exporters:
        - otlphttp/bucker
```

Configuration for `otelcol-k8s`, role `cluster` (`k8s_small-cluster.otelcol-k8s.yaml`). Alloy runs the same document with `alloy otel --config=<file>`.

<!-- profile:k8s_small:otelcol-k8s:cluster -->
```yaml
# Bucker collector profile: Small Kubernetes cluster (k8s_small, standard tier)
# Profile PROFILE_ID, revision 1. Generated; change it through the profile, not by hand.
# Interval 60s. Role: cluster.
# Set BUCKER_DSN (the project DSN) in the environment of the process; it is never written here.
# Validate with: otelcol-k8s validate --config=<this file>
extensions:
  health_check:
    endpoint: 0.0.0.0:13133
  file_storage/bucker:
    directory: /var/lib/otelcol/bucker-queue
    create_directory: true
receivers:
  k8s_cluster:
    collection_interval: 60s
    auth_type: serviceAccount
    node_conditions_to_report:
      - Ready
      - MemoryPressure
    allocatable_types_to_report:
      - cpu
      - memory
  k8sobjects:
    auth_type: serviceAccount
    objects:
      - name: events
        mode: watch
        group: events.k8s.io
processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 20
  k8sattributes:
    auth_type: serviceAccount
    passthrough: false
    extract:
      metadata:
        - k8s.node.name
        - k8s.namespace.name
        - k8s.pod.name
        - k8s.pod.uid
        - k8s.deployment.name
        - k8s.statefulset.name
        - k8s.daemonset.name
    pod_association:
      - sources:
          - from: resource_attribute
            name: k8s.pod.uid
      - sources:
          - from: connection
  filter/allowlist:
    error_mode: ignore
    metrics:
      metric:
        - not (name == "k8s.node.condition_ready" or name == "k8s.deployment.available")
  cumulativetodelta: {}
  resource/bucker:
    attributes:
      - key: bucker.profile.id
        value: PROFILE_ID
        action: upsert
      - key: bucker.profile.revision
        value: 1
        action: upsert
      - key: k8s.cluster.name
        value: ${env:K8S_CLUSTER_NAME}
        action: upsert
  batch:
    timeout: 10s
    send_batch_size: 2000
    send_batch_max_size: 2500
exporters:
  otlphttp/bucker:
    endpoint: https://us.ingest.example.com/api/PROJECT_ID/otlp
    headers:
      Authorization: DSN ${env:BUCKER_DSN}
    compression: gzip
    sending_queue:
      enabled: true
      storage: file_storage/bucker
      queue_size: 5000
    retry_on_failure:
      enabled: true
      initial_interval: 5s
      max_interval: 30s
      max_elapsed_time: 300s
service:
  extensions:
    - health_check
    - file_storage/bucker
  pipelines:
    metrics:
      receivers:
        - k8s_cluster
      processors:
        - memory_limiter
        - k8sattributes
        - filter/allowlist
        - cumulativetodelta
        - resource/bucker
        - batch
      exporters:
        - otlphttp/bucker
    logs:
      receivers:
        - k8sobjects
      processors:
        - memory_limiter
        - k8sattributes
        - resource/bucker
        - batch
      exporters:
        - otlphttp/bucker
```

## Before you rely on a profile

These are open items a person owns, recorded rather than assumed:

- Validate each document with the distribution's own validator before deploying it (`otelcol validate`, or `alloy otel validate`).
- The Render metric names are provisional until confirmed against a live Render metrics stream.
- The Fly metric names follow Fly's documented `fly_instance_*` set; confirm them against your organization's federate endpoint.
- Render's stream can only reach Bucker directly once `Authorization: Bearer <public key>` is accepted on the project-scoped OTLP path; until then the relay Collector above carries the DSN form.

## Keeping this page true

The YAML documents above are rendered from the profile definitions, byte for byte, and `api/test/infra/collector-render.test.ts` fails when this page drifts from them. After a deliberate change to a profile or the emitter, run `UPDATE_COLLECTOR_README=1 pnpm --filter @bucker/api exec vitest run test/infra/collector-render.test.ts` to rewrite the blocks, and review the diff.
