Observability Module (OpenTelemetry)
Composable OpenTelemetry instrumentation module for TypeScript services. Provides one-call SDK initialization with pluggable exporters (console, OTLP, Datadog), structured logging with trace context propagation, and optional metrics and tracing helpers. Designed to be layered into any TypeScript service as a drop-in telemetry layer.
| Name | module-observability-ts |
| Version | 0.1.0 |
| Category | composable-modules |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | observability, opentelemetry, tracing, metrics, typescript |
| Source | templates/module-observability-ts |
Render it
Three front doors, one catalog. Pick whichever suits the caller.
# CLI
npx @nanohype/sdk render module-observability-ts --out ./my-app
# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "module-observability-ts", variables);
# MCP — from an agent
get_template({ name: "module-observability-ts" })Prerequisites
| Tool | Version | Why |
|---|---|---|
node | >=22 | Node.js runtime for OpenTelemetry SDK |
Variables
Required
ProjectNamestring- Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.
Optional
Descriptionstring — defaults toOpenTelemetry observability module- Short project description for package.json and README
Exporterstring — defaults toconsole- Default telemetry exporter (console, otlp, datadog, or a custom name)
IncludeMetricsbool — defaults totrue- Include metrics helpers (counters, histograms)
IncludeTracingbool — defaults totrue- Include tracing helpers (tracer wrapper, span creation)
What it produces
20 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.
.env.example
.gitignore
biome.json
package.json
README.md
src/telemetry/__tests__/logger.test.ts
src/telemetry/__tests__/registry.test.ts
src/telemetry/bootstrap.ts
src/telemetry/exporters/console.ts
src/telemetry/exporters/datadog.ts
src/telemetry/exporters/index.ts
src/telemetry/exporters/otlp.ts
src/telemetry/exporters/registry.ts
src/telemetry/exporters/types.ts
src/telemetry/index.ts
src/telemetry/logger.ts
src/telemetry/metrics.ts
src/telemetry/tracer.ts
tsconfig.json
vitest.config.tsComposes with
- Pairs with
ts-service - Pairs with
go-service - Pairs with
agentic-loop - Pairs with
mcp-server-ts - Nests inside
monorepo
Composites that use it
- AI Web Application — Full-stack web application with Next.js frontend, RAG pipeline, authentication, database, and deployment..
- Background Processor — Async job processing service with queue, database, storage, observability, and deployment.
- Enterprise AI Infrastructure — Full enterprise AI stack with agents, tool servers, safety guardrails, evaluation, prompt management, observability, and Kubernetes deployment..
- Production API Service — Production-grade TypeScript API service with auth, database, caching, rate limiting, background jobs, observability, and deployment..