CLI phase telemetry
ProAuth CLI and the AdminApp resource initializer can export optional OpenTelemetry traces and metrics. This is disabled by default and does not change import behavior.
Set these environment variables on the CLI or resource initializer process:
PROAUTH_CLI_TELEMETRY=true
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobufUse the normal OpenTelemetry exporter configuration for TLS and authentication. The endpoint must be reachable from the process executing the command. Dispose/exit flushes the providers; an abruptly terminated process may lose its final batch.
The activity source and meter are named ProAuth.Cli.Performance. Traces cover command execution, YAML parsing and placeholder resolution, management and user-store upserts, relationship reconciliation, synchronization, user-store readiness, label parsing/upload, and view-set parsing/validation/replacement. HTTP client spans describe the requests within those phases. The proauth.cli.resource.writes counter separates successful top-level YAML creates/updates, accepted label import batches, and view-set apply requests by operation. It counts accepted client writes, not database rows changed or every nested HTTP write; an unchanged apply can still increment it.
The resource initializer propagates W3C trace context to its child CLI processes through TRACEPARENT and TRACESTATE. A caller may provide these variables to continue an existing trace. Invalid parent context starts a new trace. Optional PERF_RUN_ID adds a correlation attribute and prints the root trace ID; it does not belong in metric labels.
Phase spans do not record command arguments, entity identifiers, credentials, or imported payloads. Normal HTTP instrumentation can include endpoint metadata. Apply your existing trace access and retention controls.