Skip to content

Parity with AX dcdfd0a: OpenTelemetry in rax-server, per-resource protos with buf, Substrate v1.0.0 - #17

Merged
h0ffmann merged 5 commits into
mainfrom
claude/project-thread-mi5qax
Nov 10, 2026
Merged

h0ffmann merged 5 commits into
mainfrom
claude/project-thread-mi5qax

Conversation

@h0ffmann

Copy link
Copy Markdown
Collaborator

Requested by Hoffmann · project thread

This PR brings the AX sync to main. It was reviewed and merged as #16, but #16's base was #14's branch, and #14 had already merged into main by then. So these four commits never reached main. The changes are the same as in #16, with main merged in.

Brings RAX to parity with AX's main at dcdfd0a (2026-11-10). The previous parity point was 241bc4d.

  • OpenTelemetry in rax-server (rax-server::telemetry, rax-server::axattr)
    • Traces, metrics and events go over OTLP/gRPC, with 10% of new traces sampled (parent based).
    • Prometheus /metrics is served on --metrics-addr (default :9090).
    • Log lines are JSON in slog's shape, with trace IDs while a span is active.
    • OTEL_* values that rax-server does not understand are logged and the default is kept, as in AX.
    • Covered in docs/observability.md.
  • Per-resource protos: AX's protos are copied unchanged to proto/pkg/apis/v1alpha1. AX's buf.yaml comes along, and CI and just proto-lint run buf format and buf lint.
  • Substrate v1.0.0:
    • ateapi.proto is updated to v1.0.0 (only comments changed).
    • just deploy installs Substrate from its release images, with the worker image pinned by digest.
    • If the checkout isn't a clean release tag, it falls back to building from source.
  • Known differences
    • OTLP export is plaintext. Turning on tonic's TLS features breaks rax-substrate's rustls connector.
    • There are no go_* runtime metrics.
    • The service name is service.name=rax-server.

cargo test --all: 191 passed. Clippy, rustfmt, buf lint/format and shellcheck are clean.


Generated by Claude Code

…s AX now does

AX moved its messages out of ax.proto into common, task, workspace and
model.proto, leaving the AX service in ax.proto, with no wire changes.
Copy the five files unchanged to proto/pkg/apis/v1alpha1, where their
repository-root-relative imports resolve, and compile them from there.
The generated Rust types are the same.

AX also formats and lints its protos with buf now. Add AX's buf.yaml
(module rooted at proto/), a `just proto-lint` recipe and the same check
in CI, with buf pinned at the version AX pins. RAX still generates code
with protox and prost, so there is no buf.gen.yaml.

Move proto/ateapi/v1/ateapi.proto to Substrate v1.0.0, which AX now
builds against. Only comments changed since v1.0.0-rc.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0193yhp2viybDSJp7DZcxhS9
…gs, as AX now does

AX's ax-server now sets up the OpenTelemetry SDK. Port it as the
telemetry module of rax-server:

- Traces export over OTLP/gRPC. New traces are sampled at 10%
  (parent based, trace-ID ratio), a caller's decision is followed, and
  only W3C trace context is propagated, not baggage.
- Metrics are pushed over OTLP and served for Prometheus on
  --metrics-addr (default :9090, empty disables it), with process
  metrics. Probes and the API stay on --addr.
- Events (Event, emit) go to stdout as JSON lines by default, over OTLP
  log records with OTEL_LOGS_EXPORTER=otlp, or both with otlp,console.
- Log lines are JSON in the shape of AX's slog output (time, level,
  msg, fields), with trace_id, span_id and trace_flags while a span is
  active. SDK errors are log lines too.
- OTEL_TRACES_SAMPLER and OTEL_*_EXPORTER are resolved by rax-server, as
  AX resolves them: an unknown or invalid value is logged and keeps the
  default. OTEL_SERVICE_NAME and OTEL_RESOURCE_ATTRIBUTES override the
  resource (service.name rax-server, service.instance.id the hostname).

axattr names the attributes AX emits. As in AX, nothing records spans or
emits events yet. AX's manifests, which `just deploy` renders, already
carry the ax-otel-config ConfigMap and the metrics port.

Ports AX's telemetry tests against an in-process OTLP collector, and
adds docs/observability.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0193yhp2viybDSJp7DZcxhS9
…etup now does

AX's E2E setup no longer builds Substrate: it installs the published
release images from ghcr.io/agent-substrate/substrate through ate-setup's
ATE_IMAGE_REPO and ATE_IMAGE_TAG, and pins the WorkerPool's worker image
by digest, looked up with an anonymous registry token.

Do the same in `just deploy` when the Substrate checkout is a clean
release tag, its ate-setup has --image-repo and every image is
published (SUBSTRATE_IMAGE_REPO points at a mirror). Unlike AX's setup,
anything else still builds Substrate from source with ko, so a local
Substrate checkout keeps working. The registry status check reads the
last status line, so a proxy's CONNECT response does not hide a 401.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0193yhp2viybDSJp7DZcxhS9
README: the parity point moves to dcdfd0a (2026-11-10), with the
telemetry row, Substrate v1.0.0, the per-resource protos and buf lint,
/metrics on :9090, the counted Go lines and the test counts (191).

Turning on opentelemetry-otlp's TLS features also turned on tonic's,
and tonic then refuses the https endpoint rax-substrate dials through
its own rustls connector ("Connecting to HTTPS without TLS enabled"),
which `cargo test --all` caught in the TLS client test. Keep them off:
OTLP export is plaintext, which AX's manifests use. Listed among the
known differences and in docs/observability.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0193yhp2viybDSJp7DZcxhS9
@h0ffmann h0ffmann self-assigned this Nov 10, 2026
@h0ffmann
h0ffmann merged commit 92e7f0d into main Nov 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants