Built by the creator of tx|Primitives for memory, tasks & orchestrationVisit tx docs
tx-agent-kit
Observability

Monitoring Stack

Local and production monitoring tools including Jaeger, Prometheus, Grafana, and GCP backends

tx-agent-kit provides a complete monitoring stack for both local development and production. Locally, open-source tools run in Docker. In staging and production, the OTEL Collector routes signals to GCP managed services.

Local monitoring tools

Jaeger (traces)

PropertyValue
URLhttp://localhost:16686
SignalDistributed traces
Imagejaegertracing/jaeger:2.15.1

Jaeger provides a trace search UI with filtering by service, operation, tags, and duration. Use it to debug request latency, identify bottlenecks, and trace cross-service calls.

Prometheus (metrics)

PropertyValue
URLhttp://localhost:9090
SignalApplication and infrastructure metrics
Imageprom/prometheus:v3.9.1

Prometheus stores time-series metrics and provides PromQL for querying. It receives metrics via both OTLP push (from the collector) and pull-based scraping (from node-exporter and other targets).

Alert rules are defined in monitoring/local/prometheus/rules/ and evaluated by Prometheus. The lifecycle API is enabled for runtime configuration reloading.

Grafana (dashboards)

PropertyValue
URLhttp://localhost:3001
SignalVisualization of all signals
Imagegrafana/grafana:12.3.3
Credentialsadmin / admin

Grafana is pre-provisioned with datasources for Prometheus, Loki, and Jaeger, along with pre-built dashboards stored in monitoring/local/grafana/dashboards/. It unifies traces, metrics, and logs in a single UI, letting you correlate a metric spike with traces from the same time window.

Loki (logs)

PropertyValue
URLhttp://localhost:3100
SignalStructured logs
Imagegrafana/loki:3.6.6

Loki aggregates logs collected by Promtail from Docker container stdout/stderr. Query logs via Grafana's Explore view using LogQL.

Supporting services

ServicePurpose
PromtailShips Docker container logs to Loki
Node ExporterExposes host system metrics (CPU, memory, disk) on port 9100
OTEL CollectorCentral telemetry routing hub

Production monitoring

In staging and production, the OTEL Collector configuration switches backends based on the OTEL_COLLECTOR_BACKEND environment variable.

GCP backend (OTEL_COLLECTOR_BACKEND=gcp)

SignalGCP Service
TracesCloud Trace
MetricsCloud Monitoring
LogsCloud Logging

The collector uses the googlecloud exporter, which requires GOOGLE_CLOUD_PROJECT set to the GCP project ID and service account credentials mounted at OTEL_COLLECTOR_GCP_CREDENTIALS_DIR.

OSS backend (OTEL_COLLECTOR_BACKEND=oss)

SignalBackend
TracesJaeger (OTEL_JAEGER_ENDPOINT)
MetricsPrometheus (OTEL_PROMETHEUS_OTLP_ENDPOINT)
LogsLoki (OTEL_LOKI_OTLP_ENDPOINT)

The OSS backend is useful for self-hosted staging environments or when GCP is not available.

MCP servers for agent access

Two MCP servers expose monitoring data for programmatic access by AI agents.

Prometheus MCP

pnpm mcp:prometheus

Provides tools for executing PromQL queries, listing metrics, getting metric metadata, and checking Prometheus targets.

Jaeger MCP

pnpm mcp:jaeger

Provides tools for finding traces, getting trace details, listing services, and getting operations for a service.

These servers are configured in .mcp.json and run via project wrapper scripts in scripts/mcp/.

Collector configuration

The OTEL Collector uses different configuration files per environment:

EnvironmentConfig file
Localmonitoring/local/otel-collector/otel-collector-config.yaml
Staging/Prod (GCP)monitoring/production/otel-collector.gcp.yaml
Staging/Prod (OSS)monitoring/production/otel-collector.oss.yaml

The staging/prod Docker Compose files select the configuration dynamically:

command:
  - --config=/etc/otel-collector/otel-collector.${OTEL_COLLECTOR_BACKEND:-gcp}.yaml

On this page