Skip to content
Prilog / Docs
Monitoring / Monitoring overview

Monitoring overview

Collect application logs, traces, and exceptions with Prilog's OpenTelemetry SDKs or your existing OTLP instrumentation.

Choose a runtime

Prilog monitoring collects logs, spans, and exceptions through OpenTelemetry. Use a distinct service name for each deployable component so traces and the System Map can identify the components involved in a request.

  • Node.js — npm install @prilog/monitoring; automatic Node framework/client instrumentation, console logs, spans, and exceptions.
  • Browser and React — npm install @prilog/monitoring-browser; page loads, fetch/XHR, errors, and promise rejections.
  • Go — go get github.com/Prilog-ai/prilog-monitoring/golang@v0.1.0; HTTP middleware, structured logging, and explicit error capture. Requires Go 1.25 or later.
  • Python — installable SDK archive while PyPI organization approval is pending. The Python setup tab is temporarily hidden.
  • Other runtimes and collectors — standard OTLP HTTP exporters for logs and traces.

The monitoring SDKs are MIT-licensed. See the public source.

TypeScript setup

The Node.js and browser examples use TypeScript. The published SDK packages do not yet bundle type declarations. If your compiler reports a missing declaration, add src/types/prilog-monitoring.d.ts and include it in your tsconfig.json source files:

declare module '@prilog/monitoring';
declare module '@prilog/monitoring-browser';

Keep only the declaration for the package you use. These temporary declarations enable imports but do not provide SDK API type checking. Your application's own types still use your normal TypeScript checks.

Provision a connection

In the service setup flow, choose Add free Prilog monitoring. Prilog provisions a monitoring source scoped to your workspace, project, and repository and displays the DSN, hostname, ingest token, and runtime setup instructions.

Copy the DSN from that screen. Initialize the SDK in your application's startup, run the application, and wait for its startup log and span to arrive. Prilog verifies the connection automatically after receiving the startup signals.

DSN and permissions

A DSN looks like this, with placeholders for your actual values:

https://pk_prilog_PUBLIC_KEY@HOST/api/otel/orgs/WORKSPACE/projects/PROJECT/connections/CONNECTION

The DSN authorizes telemetry ingestion for that connection. It does not grant read access to logs, traces, projects, or source configuration. Use an authenticated Prilog session, CLI, or OAuth MCP connection to read data.

Browser applications use the publishable ingest DSN. Server applications should load the DSN from PRILOG_DSN. Rotating credentials or disconnecting the service invalidates the previous DSN.

Initialization and lifecycle

Initialize once, before instrumented libraries load. SDKs send a startup log and span and use bounded queues and batching. Without a DSN they remain disabled.

Keep the monitoring instance and flush it in the application's graceful-shutdown path. Short-lived processes must allow time for telemetry export. Browser telemetry flush is attempted on page hide.

Correlating services

Use consistent service.name, service.version, and deployment.environment.name resource attributes. Each deployable service should have a distinct name. Preserve W3C trace and span IDs and parent relationships across network boundaries.

For a browser calling another origin, allow trace propagation to your API and configure the API's CORS headers. See the browser SDK.

Data handling

Prilog strips common sensitive structured attributes and URL credentials before storing telemetry. Keep credentials, personal information, and secrets out of free-form log messages and exception text. Configure capture and sampling for your application's workload.

Prilog's ingest contract accepts logs and traces; metrics export is disabled. For the exact transport and authentication contract, see OpenTelemetry and OTLP.