Internal observability utilities for Rust and TypeScript services.
This repo contains two language-specific packages that standardize logging, tracing, and metrics around OpenTelemetry, plus local examples for validating integrations against SigNoz or any OTLP-compatible backend.
engineering-toolkit/
|-- rust/
| |-- Cargo.toml
| |-- README.md
| |-- check_build.sh
| |-- examples/
| `-- src/
`-- ts/
|-- package.json
|-- README.md
|-- src/
`-- dist/
| Package | Path | Purpose |
|---|---|---|
Rust internal-utils |
rust/ |
tracing-based logging, OpenTelemetry export, SQLx helpers, OpenAPI helpers |
TypeScript internal-utils |
ts/ |
structured logging, span helpers, metrics helpers, OTLP export |
Path: rust/
The Rust crate exposes tracing setup and optional integrations behind feature flags.
Features:
otel- OpenTelemetry traces, metrics, and logs via OTLPdb- Postgres helpers built onsqlxopenapi- OpenAPI support viautoipaandutoipa-axum
Default features: otel, db, openapi
Useful entry points:
rust/src/lib.rs-TracingBuilder,OtelParams, telemetry guards, re-exportsrust/src/metrics.rs- metric helpersrust/examples/tracing_example.rs- end-to-end tracing and metrics examplerust/examples/openapi.rs- OpenAPI generation examplerust/check_build.sh- verifies important feature combinations
Common commands:
cargo build --manifest-path rust/Cargo.toml
bash rust/check_build.sh
cargo run --manifest-path rust/Cargo.toml --example tracing_example
cargo run --manifest-path rust/Cargo.toml --example openapiMore Rust-specific details live in rust/README.md.
Path: ts/
The TypeScript package targets Node.js services and ships ESM builds plus type declarations.
Included capabilities:
- structured logging
TracingBuilderfor OpenTelemetry SDK setupwithSpanandwithSpanSynchelpers- metric helpers for counters, histograms, gauges, and timed measurements
- direct access to OTel tracers and meters when lower-level control is needed
Requirements:
- Node.js
>=20
Useful entry points:
ts/src/index.ts- main exportsts/src/tracing/index.ts- tracing helpers and public API surfacets/src/example.ts- feature walkthroughts/src/example-service.ts- realistic service flow example
Common commands:
npm --prefix ts run build
npm --prefix ts run typecheck
npm --prefix ts test
npx tsx ts/src/example.ts
npx tsx ts/src/example-service.tsMore TypeScript-specific details live in ts/README.md.
The examples assume a local OTLP-compatible backend. SigNoz is the easiest setup used in this repo.
git clone https://github.com/SigNoz/signoz.git
cd signoz/deploy/docker/clickhouse-setup
docker compose up -d
# Open http://localhost:8080/Default OTLP HTTP endpoints:
- Traces:
http://localhost:4318/v1/traces - Metrics:
http://localhost:4318/v1/metrics - Logs:
http://localhost:4318/v1/logs
Stop SigNoz:
docker compose down -v- The top-level repo is documentation and package source only; build commands run from
rust/orts/ - Rust examples use the crate in
rust/directly - TypeScript builds output to
ts/dist/ - Long-form package docs live in
rust/README.mdandts/README.md