Skip to content

Add direct Tinybird auction telemetry#818

Open
ChristianPavilonis wants to merge 5 commits into
server-side-ad-templates-implfrom
auction-telemetry-direct-tinybird
Open

Add direct Tinybird auction telemetry#818
ChristianPavilonis wants to merge 5 commits into
server-side-ad-templates-implfrom
auction-telemetry-direct-tinybird

Conversation

@ChristianPavilonis

Copy link
Copy Markdown
Collaborator

Summary

  • Adds direct, best-effort Tinybird Events API ingestion for auction telemetry from Fastly Compute.
  • Introduces privacy-preserving core auction telemetry rows plus a Fastly fire-and-forget sink using Secret Store APPEND tokens.
  • Adds Tinybird datasources, rollups, endpoint pipes, fixtures, and YAML test contracts for Grafana-facing telemetry.

Changes

File Change
crates/trusted-server-core/src/auction/telemetry.rs Adds auction observation context, row model, NDJSON batching, privacy-preserving page path normalization, terminal outcomes, no-op sink, and best-effort emit helper.
crates/trusted-server-core/src/auction/endpoints.rs Emits skipped/completed/execution-failed telemetry for POST /auction without changing response behavior.
crates/trusted-server-core/src/publisher.rs Emits completed/skipped/dispatch-failed/abandoned telemetry for initial-navigation SSAT and SPA /__ts/page-bids paths.
crates/trusted-server-core/src/auction/orchestrator.rs Tracks split dispatch outcomes, retained launch failures, timeout rows, and explicit abandonment metadata.
crates/trusted-server-core/src/platform/types.rs Adds AuctionTelemetrySink plumbing to RuntimeServices.
crates/trusted-server-core/src/settings.rs, trusted-server.toml, fastly.toml Adds disabled-by-default Tinybird config, validation, and fake local Secret Store placeholders.
crates/trusted-server-adapter-fastly/src/tinybird.rs Adds Fastly Tinybird sink that builds NDJSON Events API POSTs, calls send_async, and drops pending responses.
crates/trusted-server-adapter-fastly/src/app.rs, src/main.rs, src/platform.rs Wires the configured telemetry sink through EdgeZero and legacy runtime services.
tinybird/** Adds raw/rollup datasources, materialized and endpoint pipes, fixture NDJSON, and YAML endpoint test contracts.
docs/superpowers/** Adds revised spec and implementation plan for direct Tinybird ingestion.

Closes

Closes #817

Test plan

  • cargo test --workspace
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • JS tests: cd crates/trusted-server-js/lib && npx vitest run
  • JS format: cd crates/trusted-server-js/lib && npm run format
  • Docs format: cd docs && npm run format
  • WASM build: cargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1
  • Manual testing via fastly compute serve
  • Other: cd tinybird && TB_CLI_TELEMETRY_OPTOUT=1 uvx --from tinybird-cli tb check
  • Other: YAML test contract parse check with python3/yaml
  • Other: git diff --check

Note: tb test run -v was attempted, but the available Tinybird CLI exited opaquely with Error: ** before executing scenarios; tb check validates the datafiles and YAML test contracts parse successfully.

Checklist

  • Changes follow CLAUDE.md conventions
  • No unwrap() in production code — use expect("should ...")
  • Uses tracing macros (not println!)
  • New code has tests
  • No secrets or credentials committed

@aram356 aram356 marked this pull request as draft June 26, 2026 15:36
@ChristianPavilonis ChristianPavilonis linked an issue Jun 29, 2026 that may be closed by this pull request
@ChristianPavilonis ChristianPavilonis marked this pull request as ready for review June 29, 2026 15:20
@aram356 aram356 requested review from aram356 and prk-Jr and removed request for aram356 June 29, 2026 15:48
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.

Implement direct Tinybird auction telemetry ingestion

1 participant