OpenTelemetry
Ping CLI includes optional support for exporting telemetry data using the OpenTelemetry (OTel) standard. When enabled, Ping CLI exports trace spans and metrics for commands and API calls to an OTLP-compatible collector, providing observability into CLI usage patterns in automated environments.
Telemetry is disabled by default. No data is collected or transmitted unless you explicitly enable it.
Enabling telemetry
Telemetry can be enabled using the telemetry.enabled configuration key or the equivalent environment variable:
pingcli config set "telemetry.enabled=true"
Or using an environment variable for session-scoped activation:
export PINGCLI_TELEMETRY_ENABLED=true
Configuring the OTLP endpoint
Telemetry data is exported to an OTLP-compatible collector endpoint. Set the endpoint URL using the telemetry.otlp.endpoint configuration key or the standard OTel environment variable:
pingcli config set "telemetry.otlp.endpoint=http://localhost:4318"
Or:
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
Protocol
Ping CLI supports two OTLP export protocols:
| Protocol | Description |
|---|---|
|
Exports data over HTTP using protobuf encoding. Suitable for most standard collector configurations. |
|
Exports data using gRPC transport. Use this option when your collector is configured to receive gRPC connections. |
To configure the protocol:
pingcli config set "telemetry.otlp.protocol=grpc"
Or:
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
Metrics
In addition to trace spans, Ping CLI exports OTLP metrics covering command invocations and connector operations. The following instruments are emitted:
| Instrument | Unit | Attributes |
|---|---|---|
|
|
|
|
|
same |
|
|
|
|
|
same |
The metric export interval defaults to 60 seconds. To change it:
pingcli config set "telemetry.metric.exportInterval=30s"
Or:
export OTEL_METRIC_EXPORT_INTERVAL=30s
TLS configuration
When connecting to an OTLP endpoint over HTTPS or gRPC with TLS, first enable TLS explicitly, then configure certificate trust and mutual TLS (mTLS) as needed.
Enabling TLS
TLS must be enabled before any certificate configuration takes effect:
pingcli config set "telemetry.tls.enabled=true"
Or using an environment variable:
export OTEL_EXPORTER_OTLP_TLS_ENABLED=true
Trusting a custom CA certificate
If your OTLP collector uses a certificate issued by a private CA, configure Ping CLI to trust it by providing the PEM-encoded CA certificate file:
pingcli config set "telemetry.tls.caFile=/path/to/ca.pem"
Mutual TLS (mTLS)
For environments that require client certificate authentication, configure the client certificate and key:
pingcli config set "telemetry.tls.certFile=/path/to/client.pem"
pingcli config set "telemetry.tls.keyFile=/path/to/client-key.pem"
Trust any certificate (insecure)
For development and testing environments using self-signed certificates:
The telemetry.tls.insecureSkipVerify configuration key, when set to
true, is insecure and is intended for development and testing only. You
shouldn’t enable this option for production use.
|
pingcli config set "telemetry.tls.insecureSkipVerify=true"
Data scope
When telemetry is enabled, Ping CLI exports trace spans and metrics covering the execution of CLI commands and API calls. Only proprietary Ping CLI operational data is included in trace spans. No authentication credentials, request payloads, or response bodies are included in telemetry data.