Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions deploy/helm/ourios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,42 @@ passing `--config` to the binary. The file is the authoritative source of
Ourios's data-plane configuration (storage, roles, compaction); the `values.yaml`
settings map onto it. Object-store credentials are **not** written into the file
— they appear as `${env:OURIOS_S3_*}` references resolved from the `Secret` via
`envFrom` (see [Credentials](#credentials)). The self-telemetry `OTEL_*` endpoint
`envFrom` (see [Credentials](#credentials)). The self-telemetry `OTEL_*` settings
and the AWS SDK region stay plain environment variables — those are read by their
own SDKs, never modelled in the config (RFC 0020 §3.8). A `checksum/config` pod
Comment thread
jensholdgaard marked this conversation as resolved.
Resolved
annotation rolls the workloads when the rendered config changes.

## Self-telemetry

Ourios is a telemetry backend, so it is instrumented as one (`CLAUDE.md` §6.3).
`otel.exporterEndpoint` carries **three** signals, not just metrics:

| Signal | What it carries |
|---|---|
| Metrics | the per-subsystem meters — miner counters, ingest/query latency, pruning |
| Logs | Ourios's own structured logs, bridged to OTLP |
| Traces | request-scoped spans on ingest, query, `/mcp` and sweep (RFC 0038), continuing an inbound caller's trace (RFC 0039), with a DataFusion operator span tree under a query (RFC 0040) |

Two things worth setting deliberately before running this in anger:

- **Sampling.** The SDK default is `parentbased_always_on`, so *every* request
is traced. Spans are request-scoped and never per log record, so the volume
tracks request rate rather than ingest rate — but a receiver taking large
OTLP batches at a high rate will still produce a lot. Set
`otel.traces.sampler: parentbased_traceidratio` with
`otel.traces.samplerArg: "0.01"` to trim it. Because it is *parent*-based, a
caller that already sampled its trace still gets its Ourios spans — RFC 0039
keeps the caller's decision authoritative.
- **Don't self-export directly.** Pointing `exporterEndpoint` at this same
release's receiver is a feedback loop: ingesting a batch emits logs and spans
about ingesting it, which are then ingested. Dogfooding is supported and
intended — route it through a Collector, and drop or sample Ourios's own
telemetry there.

Every knob maps 1:1 onto a standard `OTEL_*` variable; Ourios models no bespoke
telemetry config. Anything not in the table (per-signal endpoints, headers,
`OTEL_SDK_DISABLED`, protocol) can be set verbatim through `extraEnv`.

## Credentials

Credentials are **never** chart config as plaintext, and never written into the
Expand Down Expand Up @@ -304,7 +335,12 @@ is intentionally out of scope. Tune the cadence via `compactor.intervalSecs`.
| `<role>.serviceAccount.create` | `false` | Role-scoped ServiceAccount for `receiver`/`querier`/`compactor` — the least-privilege IAM seam ("Per-role IAM" above). `false` falls back to the shared `serviceAccount`. |
| `<role>.serviceAccount.annotations` | `{}` | The role's own IRSA `role-arn` (querier read-only, receiver no-delete, compactor sole delete-holder). |
| `<role>.serviceAccount.name` | `""` | With `create=true`: overrides the rendered `<fullname>-<role>` name. With `create=false`: binds an **existing** ServiceAccount of that name (managed out-of-band). |
| `otel.exporterEndpoint` | `""` | OTLP endpoint for Ourios's own self-telemetry. |
| `otel.exporterEndpoint` | `""` | `OTEL_EXPORTER_OTLP_ENDPOINT` — where Ourios exports **all three** of its own signals (metrics, logs, traces). Per-signal endpoints go in `extraEnv`. |
| `otel.traces.enabled` | `true` | `false` renders `OTEL_TRACES_EXPORTER=none`. |
| `otel.traces.sampler` / `.samplerArg` | `""` | `OTEL_TRACES_SAMPLER` / `_ARG`. Empty keeps the SDK default `parentbased_always_on` — **every** served request is sampled; see "Self-telemetry" below. |
Comment thread
jensholdgaard marked this conversation as resolved.
Resolved
| `otel.metrics.enabled` | `true` | `false` renders `OTEL_METRICS_EXPORTER=none`. |
| `otel.metrics.exportInterval` | `""` | `OTEL_METRIC_EXPORT_INTERVAL` in ms. Empty = SDK default `60000`. |
| `otel.logs.enabled` | `true` | `false` renders `OTEL_LOGS_EXPORTER=none`; Ourios's logs stay on stderr. |
| `extraEnv` | `[]` | Extra env vars (e.g. `OTEL_*`). No plaintext creds. |

The image runs as nonroot (uid 65532) with a read-only root filesystem; the
Expand Down
28 changes: 27 additions & 1 deletion deploy/helm/ourios/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ compaction:

{{/*
Env common to every workload. The data-plane config is the mounted --config file
(RFC 0020); the only env vars are the self-telemetry OTLP endpoint, the AWS SDK
(RFC 0020); the only env vars are the self-telemetry OTLP settings (endpoint
plus the per-signal traces/metrics/logs knobs, each a standard OTEL_* name —
Ourios models no bespoke telemetry config), the AWS SDK
region (which drives the credential chain for s3), and any extraEnv — OTEL_* /
AWS_* are read directly by their SDKs, never modeled in the config (RFC 0020
§3.8). May render empty (the workloads guard the `env:` block). The dedicated
Expand All @@ -197,6 +199,30 @@ receiver/querier), so it must be enabled.
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: {{ . | quote }}
{{- end }}
{{- if not .Values.otel.traces.enabled }}
- name: OTEL_TRACES_EXPORTER
value: "none"
{{- end }}
{{- with .Values.otel.traces.sampler }}
- name: OTEL_TRACES_SAMPLER
value: {{ . | quote }}
{{- end }}
{{- with .Values.otel.traces.samplerArg }}
- name: OTEL_TRACES_SAMPLER_ARG
value: {{ . | quote }}
{{- end }}
{{- if not .Values.otel.metrics.enabled }}
- name: OTEL_METRICS_EXPORTER
value: "none"
{{- end }}
{{- with .Values.otel.metrics.exportInterval }}
- name: OTEL_METRIC_EXPORT_INTERVAL
value: {{ . | quote }}
{{- end }}
{{- if not .Values.otel.logs.enabled }}
- name: OTEL_LOGS_EXPORTER
value: "none"
{{- end }}
Comment thread
jensholdgaard marked this conversation as resolved.
Resolved
{{- with .Values.extraEnv }}
{{- toYaml . }}
{{- end }}
Expand Down
42 changes: 38 additions & 4 deletions deploy/helm/ourios/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,47 @@ compactor:
podAnnotations: {}
podLabels: {}

# Ourios's own self-telemetry (RFC 0001 §6.8): the OTLP endpoint its meter
# exports to. Empty leaves the OpenTelemetry SDK default
# (OTEL_EXPORTER_OTLP_ENDPOINT unset). Standard OTEL_* env can also be set via
# extraEnv.
# Ourios's own self-telemetry: the OTLP endpoint every signal it emits is
# exported to. That is now three signals, not just the meter — metrics
# (CLAUDE.md §6.3), logs, and, since RFC 0038/0039/0040, traces (request-scoped
# spans on ingest/query/MCP/sweep, continuing an inbound caller's trace, with
# DataFusion operator spans under a query).
#
# Every key below maps 1:1 onto a standard OTEL_* env var: Ourios models no
# bespoke telemetry config, it reads the SDK's own variables (RFC 0038 slice
# 4). Anything not modeled here can still be set verbatim via extraEnv.
#
# Pointing this at Ourios's own receiver is the intended dogfood setup, but
# send it through a Collector rather than directly: Ourios emits logs *about*
# ingesting, so a direct self-export is a feedback loop.
otel:
# OTEL_EXPORTER_OTLP_ENDPOINT — all three signals. Empty leaves it unset.
# Per-signal endpoints (OTEL_EXPORTER_OTLP_TRACES_ENDPOINT and friends) go
# in extraEnv.
exporterEndpoint: ""

traces:
# false renders OTEL_TRACES_EXPORTER=none — the span pipeline is not built.
enabled: true
# OTEL_TRACES_SAMPLER / OTEL_TRACES_SAMPLER_ARG. Empty keeps the SDK
# default, parentbased_always_on: every request Ourios serves is sampled.
# Spans are request-scoped, never per log record (RFC 0038 §3), so this is
# bounded by request rate — but on a busy receiver prefer
# parentbased_traceidratio with samplerArg: "0.01".
sampler: ""
samplerArg: ""

metrics:
# false renders OTEL_METRICS_EXPORTER=none.
enabled: true
# OTEL_METRIC_EXPORT_INTERVAL, in milliseconds. Empty = SDK default 60000.
exportInterval: ""

logs:
# false renders OTEL_LOGS_EXPORTER=none. Ourios's own structured logs are
# bridged to OTLP; disabling this leaves them on stderr only.
enabled: true

# Extra environment variables appended verbatim to every container (e.g. OTEL_*
# overrides). Do NOT put object-store credentials here as plaintext — use
# storage.s3.existingSecret above.
Expand Down