Skip to content

PAM Native Observability

Every PAM Native product runs on the PAM runtime. Install and verify PAM first, create a Native application, and add this package through PAM Composer:

Terminal window
curl -fsSL https://github.com/push-in/pam/releases/latest/download/install.sh | sh
pam doctor
pam init my-app --template native
cd my-app
pam composer require pushinbr/pam-native-observability
pam doctor
pam native dev
$telemetry = new Observability($config, new CurlTelemetryTransport());
$span = $telemetry->span('feed.load');
try {
loadFeed();
$span->status(SpanStatus::Ok);
} catch (Throwable $error) {
$span->exception($error);
throw $error;
} finally {
$span->end();
$telemetry->flush();
}

Observability creates spans, structured logs, counters, gauges, crash context, and batches. ObservabilityConfig defines HTTPS endpoint, service identity, sampling, queue, and batch policy. Span/SpanStatus, Severity, and SignalKind are typed enums. TelemetryTransport supports Sentry, Datadog, Honeycomb, New Relic, gateways, or offline spools; CurlTelemetryTransport is the dependency-light HTTPS default.

The bounded queue drops oldest under pressure and restores failed exports to the front. Signals collect no secrets/personal data automatically: define an attribute allowlist. Flush on lifecycle transitions without indefinitely blocking UI, distinguish permanent/transient transport failure, and monitor dropped-signal counters.