[PR #18] [MERGED] feat(otel): add OpenTelemetry ingest, query, and frontend traces UI #22

Closed
opened 2026-03-02 05:12:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/gotempsh/temps/pull/18
Author: @dviejokfs
Created: 2/26/2026
Status: Merged
Merged: 2/27/2026
Merged by: @dviejokfs

Base: mainHead: feat/add-otel


📝 Commits (10+)

  • ab6e9f5 feat(otel): add OpenTelemetry support with new permissions and plugin integration
  • d9be36b feat: update workspace and dependencies for new features
  • e9f08e4 feat: enhance monitoring features and resource management
  • 63d5828 feat(otel): add OpenTelemetry ingest, query, and frontend traces UI
  • a5dbe11 ci(otel): install protobuf-compiler in CI and document prerequisites
  • f188ad0 feat(otel): add trace-level pagination with TraceSummary endpoint
  • dee9060 style(otel): add mobile responsiveness to traces list and detail views
  • 14c2683 feat(otel): add Traces to project command palette (Ctrl+K)
  • c840c2a fix(otel): resolve environment name from deployments table in trace summaries
  • a205d76 fix(otel): add horizontal overflow to span detail panel

📊 Changes

64 files changed (+14429 additions, -48 deletions)

View changed files

📝 .github/workflows/rust-tests.yml (+16 -0)
📝 CHANGELOG.md (+3 -0)
📝 CLAUDE.md (+10 -0)
📝 CONTRIBUTING.md (+31 -0)
📝 Cargo.lock (+93 -1)
📝 Cargo.toml (+1 -0)
📝 crates/temps-auth/src/context.rs (+31 -2)
📝 crates/temps-auth/src/deployment_token_service.rs (+10 -0)
📝 crates/temps-auth/src/middleware.rs (+1 -0)
📝 crates/temps-auth/src/permissions.rs (+15 -0)
📝 crates/temps-auth/src/temps_middleware.rs (+1 -0)
📝 crates/temps-cli/Cargo.toml (+1 -0)
📝 crates/temps-cli/src/commands/serve/console.rs (+16 -0)
📝 crates/temps-deployments/src/services/deployment_token_service.rs (+24 -1)
📝 crates/temps-deployments/src/services/workflow_planner.rs (+49 -2)
📝 crates/temps-entities/src/deployment_tokens.rs (+15 -0)
crates/temps-migrations/src/migration/m20260225_000001_create_otel_tables.rs (+634 -0)
crates/temps-migrations/src/migration/m20260226_000001_add_deployment_id_to_deployment_tokens.rs (+100 -0)
📝 crates/temps-migrations/src/migration/mod.rs (+4 -0)
crates/temps-otel/Cargo.toml (+75 -0)

...and 44 more files

📄 Description

Description

Add a complete OpenTelemetry observability stack to Temps — from OTLP/HTTP protobuf ingest through TimescaleDB storage to a frontend traces visualization UI.

Backend (temps-otel crate)

  • OTLP/HTTP protobuf ingest for traces, metrics, and logs (gzip/zstd decompression)
  • Dual auth: API keys (tk_) and deployment tokens (dt_), with header-based and path-based ingest routes
  • TimescaleDB storage with hypertables, continuous aggregates, compression, and retention
  • Query API: filter/list spans, get trace, query metrics with time_bucket, query logs, pipeline stats, health summaries, insights
  • Rate limiting, storage quota checks, anomaly detection, health compute service
  • OpenAPI annotations on all 12+ endpoints, 117 passing unit tests

Auth & Permissions

  • OtelRead/OtelWrite permissions added
  • deployment_id added to deployment tokens for full OTel context propagation
  • Migration for the new column

Frontend

  • Traces list with filtering (time range, service, status, trace ID search) and trace-level error aggregation
  • Trace detail with span waterfall visualization, span detail panel, and refresh button
  • Setup section with environment selector, OTLP endpoint, and Next.js code snippets
  • Sidebar nav item added

Notable fixes

  • Protobuf Span.flags changed from uint32 to fixed32 per OTLP v1.1.0+ spec
  • Removed server-side tail sampling — sampling is the client SDK's responsibility
  • Fixed TraceDetail data extraction (data.data not data.spans)
  • Fixed status code comparisons (uppercase ERROR/OK from API)
  • Fixed waterfall duration label visibility for wide spans

Type of change

  • New feature (non-breaking change that adds functionality)

Checklist

  • I have written tests that cover the changes
  • All new and existing tests pass (cargo test --lib)
  • cargo check --lib passes with no warnings
  • My commits follow the Conventional Commits format
  • I have updated documentation where necessary

Ref #17


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/gotempsh/temps/pull/18 **Author:** [@dviejokfs](https://github.com/dviejokfs) **Created:** 2/26/2026 **Status:** ✅ Merged **Merged:** 2/27/2026 **Merged by:** [@dviejokfs](https://github.com/dviejokfs) **Base:** `main` ← **Head:** `feat/add-otel` --- ### 📝 Commits (10+) - [`ab6e9f5`](https://github.com/gotempsh/temps/commit/ab6e9f599943a49e255d44ce432afbfe3c9e33f3) feat(otel): add OpenTelemetry support with new permissions and plugin integration - [`d9be36b`](https://github.com/gotempsh/temps/commit/d9be36b0d943bfb6235b867d883b494b8cae53a9) feat: update workspace and dependencies for new features - [`e9f08e4`](https://github.com/gotempsh/temps/commit/e9f08e46e4f612cd088bf804bdaa636242408ab7) feat: enhance monitoring features and resource management - [`63d5828`](https://github.com/gotempsh/temps/commit/63d582845c17bf684b5a6f6bdb3d2da67c060aef) feat(otel): add OpenTelemetry ingest, query, and frontend traces UI - [`a5dbe11`](https://github.com/gotempsh/temps/commit/a5dbe113e92e968c549ee28968c07a4c0edeed8b) ci(otel): install protobuf-compiler in CI and document prerequisites - [`f188ad0`](https://github.com/gotempsh/temps/commit/f188ad0bf5ac891b637b12b57b0c36a8b8d0fedb) feat(otel): add trace-level pagination with TraceSummary endpoint - [`dee9060`](https://github.com/gotempsh/temps/commit/dee90600e1a9b2b0b7c83787c02bf47feea7d39b) style(otel): add mobile responsiveness to traces list and detail views - [`14c2683`](https://github.com/gotempsh/temps/commit/14c2683f2546644d717ee3622b87003d9b06503f) feat(otel): add Traces to project command palette (Ctrl+K) - [`c840c2a`](https://github.com/gotempsh/temps/commit/c840c2a379f4f5e0d7ee2712a3ae85761d8f1b95) fix(otel): resolve environment name from deployments table in trace summaries - [`a205d76`](https://github.com/gotempsh/temps/commit/a205d76a94d03465f0c42ec22d8cf1c5ba7d63f0) fix(otel): add horizontal overflow to span detail panel ### 📊 Changes **64 files changed** (+14429 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/rust-tests.yml` (+16 -0) 📝 `CHANGELOG.md` (+3 -0) 📝 `CLAUDE.md` (+10 -0) 📝 `CONTRIBUTING.md` (+31 -0) 📝 `Cargo.lock` (+93 -1) 📝 `Cargo.toml` (+1 -0) 📝 `crates/temps-auth/src/context.rs` (+31 -2) 📝 `crates/temps-auth/src/deployment_token_service.rs` (+10 -0) 📝 `crates/temps-auth/src/middleware.rs` (+1 -0) 📝 `crates/temps-auth/src/permissions.rs` (+15 -0) 📝 `crates/temps-auth/src/temps_middleware.rs` (+1 -0) 📝 `crates/temps-cli/Cargo.toml` (+1 -0) 📝 `crates/temps-cli/src/commands/serve/console.rs` (+16 -0) 📝 `crates/temps-deployments/src/services/deployment_token_service.rs` (+24 -1) 📝 `crates/temps-deployments/src/services/workflow_planner.rs` (+49 -2) 📝 `crates/temps-entities/src/deployment_tokens.rs` (+15 -0) ➕ `crates/temps-migrations/src/migration/m20260225_000001_create_otel_tables.rs` (+634 -0) ➕ `crates/temps-migrations/src/migration/m20260226_000001_add_deployment_id_to_deployment_tokens.rs` (+100 -0) 📝 `crates/temps-migrations/src/migration/mod.rs` (+4 -0) ➕ `crates/temps-otel/Cargo.toml` (+75 -0) _...and 44 more files_ </details> ### 📄 Description ## Description Add a complete OpenTelemetry observability stack to Temps — from OTLP/HTTP protobuf ingest through TimescaleDB storage to a frontend traces visualization UI. ### Backend (`temps-otel` crate) - OTLP/HTTP protobuf ingest for traces, metrics, and logs (gzip/zstd decompression) - Dual auth: API keys (`tk_`) and deployment tokens (`dt_`), with header-based and path-based ingest routes - TimescaleDB storage with hypertables, continuous aggregates, compression, and retention - Query API: filter/list spans, get trace, query metrics with `time_bucket`, query logs, pipeline stats, health summaries, insights - Rate limiting, storage quota checks, anomaly detection, health compute service - OpenAPI annotations on all 12+ endpoints, 117 passing unit tests ### Auth & Permissions - `OtelRead`/`OtelWrite` permissions added - `deployment_id` added to deployment tokens for full OTel context propagation - Migration for the new column ### Frontend - Traces list with filtering (time range, service, status, trace ID search) and trace-level error aggregation - Trace detail with span waterfall visualization, span detail panel, and refresh button - Setup section with environment selector, OTLP endpoint, and Next.js code snippets - Sidebar nav item added ### Notable fixes - Protobuf `Span.flags` changed from `uint32` to `fixed32` per OTLP v1.1.0+ spec - Removed server-side tail sampling — sampling is the client SDK's responsibility - Fixed `TraceDetail` data extraction (`data.data` not `data.spans`) - Fixed status code comparisons (uppercase `ERROR`/`OK` from API) - Fixed waterfall duration label visibility for wide spans ## Type of change - [x] New feature (non-breaking change that adds functionality) ## Checklist - [x] I have written tests that cover the changes - [x] All new and existing tests pass (`cargo test --lib`) - [x] `cargo check --lib` passes with no warnings - [x] My commits follow the [Conventional Commits](https://www.conventionalcommits.org/) format - [x] I have updated documentation where necessary ## Related issues Ref #17 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem closed this issue 2026-03-02 05:12:34 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/temps#22
No description provided.