forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to src/telemetry.rsClear filter

2026-09-23

✨ feat: school identity is the uuid; drop the slugAhmet Kaan Gümüş · 2918040
✨ feat: school identity is the uuid; drop the slug

The school slug is gone from every surface: the session cookie prefix,
the /schools/{id} builder routes, FILES_PATH blob dirs, the hab/2 frame
school value, DTOs, and the /limits contract. SchoolId::try_parse is the
one wire parse (hyphenated uuid only); a non-uuid frame school answers
unknown_school. Register gets a public picker via the new unauthenticated
GET /auth/schools returning active [{id, name}]. The control migration
drops school_slug and the slug column, which invalidates every existing
session — old cookie prefixes cannot resolve.
Local-Gate: 3fafffd98aec59c68e2606833b87785d0abf2fee (1510 passed, 425s)

2026-09-14

✨ feat: mint OpenObserve OTLP Basic from ZO_ROOT_USER_*Ahmet Kaan Gümüş · 9ce59bf
✨ feat: mint OpenObserve OTLP Basic from ZO_ROOT_USER_*

When OTEL_EXPORTER_OTLP_ENDPOINT is set and HEADERS is not, the process
builds Authorization=Basic from ZO_ROOT_USER_EMAIL/PASSWORD. No hand
base64 in the env file.

2026-09-12

🧹 chore: drop keepalive-era telemetry instruments + tighten claim-fn visibility; Postgres docs (README/CLAUDE.md); ship migrations/ in the imageAhmet Kaan Gümüş · a2a344c
🧹 chore: drop keepalive-era telemetry instruments + tighten claim-fn visibility; Postgres docs (README/CLAUDE.md); ship migrations/ in the image

2026-09-07

📝 docs: telemetry header names the resource-id allowance; global() doc lists its real callersAhmet Kaan Gümüş · 66c56ad
📝 docs: telemetry header names the resource-id allowance; global() doc lists its real callers

Claude-Session: https://claude.ai/code/session_018sqvyBCZ9kpQP6vnGomT2s
🐛 fix: stamp OTLP log records with their observed timeAhmet Kaan Gümüş · 382bfca
🐛 fix: stamp OTLP log records with their observed time

opentelemetry-appender-tracing 0.32 never sets a record's `timestamp`; the
SDK fills only `observed_timestamp`, so collectors render every exported log
as 1970-01-01 and consumers ordering on `timestamp` sort them first forever.
A one-method `LogProcessor`, registered ahead of the batch exporter, copies
the observed time across when `timestamp` is empty. No clock is read — that
would invent a time the record does not have.

Claude-Session: https://claude.ai/code/session_018sqvyBCZ9kpQP6vnGomT2s
✨ feat: rate-limit, DB liveness, WebSocket and tenant-cache telemetryAhmet Kaan Gümüş · e87c2a2
✨ feat: rate-limit, DB liveness, WebSocket and tenant-cache telemetry

Four instruments that were declared at the OpenTelemetry bootstrap and
recorded by nobody now have their call sites.

The rate limiter counts every refusal under the tier that refused it. The
tier's name already exists — `share()` is told it — so the limiter learns
it there instead of growing a constructor argument the router would have
to pass. Counting sits in one wrapper around `check`, so the overflow
budget's refusals cannot slip past it, and it is a counter only: a log
line per rejection is a flood amplifier, and the fields that would make
one useful (who, from where) are exactly the ones telemetry may not carry.
For the same reason the two existing warnings no longer name the client's
IP or the user — with events now exported as OTLP logs, those fields would
leave the process.

The keepalive ping is timed and its verdict published, and the log is now
about the transitions rather than the tick: down once, up once, with the
outage's length on recovery.

Every room socket is counted by a `Connected` guard whose `Drop` is the
decrement, since a room has several ways out and a decrement written at
one of them is a gauge that only ever climbs. It names the exam, not the
attempt — an attempt names one student.

The instruments reach those places through `Metrics::global()`, published
by `init`: the limiter is built before the state exists, and the keepalive
task and the tenant cache have no handle to one either.

Claude-Session: https://claude.ai/code/session_018sqvyBCZ9kpQP6vnGomT2s
✨ feat: real /health, error and panic telemetryAhmet Kaan Gümüş · c00f83a
✨ feat: real /health, error and panic telemetry

`/health` (and its `/` mirror) now answers what the process can actually do —
`{status, db, ai:{enabled,workers}}`, 200 when the database is up and 503 with
`"db":"down"` when it is not. It is exempt from the db guard alongside
`/limits`: a probe refused by the outage it exists to report names nothing.

Every `AppError` arm now records a stable snake_case class on the request span
(`error.type`) and counts itself into `errors_total` with that class and the
status. One log line per refusal, by severity: 5xx at error! with the
underlying error (which the arm's own Display hides), 429 and the reconnect
503 at warn!, the caller's 4xx at debug! — no path, no user, no body anywhere.
`record_response` no longer overwrites `error.type` with the status code.

Panics are no longer a dropped connection: a process-wide hook logs
`exception.type/message/stacktrace` and counts `panics_total`, and a
`CatchPanicLayer` inside the trace layer answers the same `{"error":"internal
server error"}` 500 every other internal error answers, tagging its span
`panic`.

Claude-Session: https://claude.ai/code/session_018sqvyBCZ9kpQP6vnGomT2s
✨ feat: OpenTelemetry bootstrap — OTLP traces/metrics/logs, request spans, request idsAhmet Kaan Gümüş · 057a7fa
✨ feat: OpenTelemetry bootstrap — OTLP traces/metrics/logs, request spans, request ids

Telemetry is off unless OTEL_EXPORTER_OTLP_ENDPOINT is set, mirroring the
AI bridge's "off unless configured" shape. With it unset the process logs
exactly as before; every instrument binds to the noop meter provider, so
call sites never branch on whether telemetry is on.

Privacy is the design constraint (KVKK): a span carries the method, the
route TEMPLATE, the status, a random request id and the school slug —
never a user, an IP, a URL path, a body, a header or a cookie.
tests/telemetry.rs fails the build if a forbidden attribute key appears.

New variables (all documented in .env.example):
  OTEL_EXPORTER_OTLP_ENDPOINT   presence turns export on
  OTEL_EXPORTER_OTLP_PROTOCOL   grpc (default) | http/protobuf
  OTEL_EXPORTER_OTLP_HEADERS    read by the SDK
  OTEL_SERVICE_NAME             read by the SDK, defaults hezarfen_backend
  OTEL_TRACES_SAMPLER(_ARG)     read by the SDK, parent-based always-on
  LOG_FORMAT                    pretty (default) | json; anything else refuses to boot
  DEPLOY_ENV                    deployment.environment.name

Claude-Session: https://claude.ai/code/session_018sqvyBCZ9kpQP6vnGomT2s