Telemetry export
What the HotCodePush telemetry export sends to an OTLP/HTTP endpoint, the log record and metric names, how to set it up with Grafana Cloud, Honeycomb or a collector, and how deliveries are retried.
The telemetry export sends your organization's audit events and update metrics to one OpenTelemetry backend over OTLP/HTTP. Every audit event becomes one log record the moment it happens. Once an hour one metrics document carries the counters of every app. There is one export per organization, managed by its Admins and Owners, on the paying plans.
Experimental
The export is the other half of Tag releases in your telemetry. Your app tags its own traces and crashes with the release it runs. The export sends our side with the same keys, so one backend joins both.
Set it up
You need the base URL of your backend's OTLP/HTTP endpoint and the header it authenticates with. HotCodePush appends /v1/logs and /v1/metrics to the base URL itself, so a URL that already ends in one of those paths is refused.
| Backend | Base URL | Header |
|---|---|---|
| Grafana Cloud | https://otlp-gateway-<region>.grafana.net/otlp, from the stack's OpenTelemetry page | Authorization: Basic <base64 of instanceId:token> |
| Honeycomb | https://api.honeycomb.io, or https://api.eu1.honeycomb.io in the EU | x-honeycomb-team: <API key> |
| Your own collector | The public https URL of its OTLP/HTTP receiver, port 4318 by default | Whatever its receiver expects, or none |
Set the export in the Telemetry export island of the organization's settings page in the console, with hotcodepush telemetry-export set or with organizations.telemetryExport.set in the Node.js client and organizations.telemetry_export.set in the Python client, each with a signed-in session:
hotcodepush telemetry-export set --url https://api.honeycomb.io --header "x-honeycomb-team=$HONEYCOMB_API_KEY" --signal logs,metrics
hotcodepush telemetry-export test- url is the
httpsbase URL, neither a loopback nor a private address. - headers are sent with every request, and their values are never shown again.
- signals is
logs,metricsor both.
Every request also sends User-Agent: HotCodePush-TelemetryExport/1.0 (+https://hotcodepush.com/docs/telemetry-export). Allow that value when a firewall sits in front of your backend.
The exact rules of each field are on the telemetry-export operations of the Swagger reference.
Setting the export again replaces it whole, headers included. test sends one record per enabled signal through the real delivery path and prints each delivery with the backend's answer. That is how a wrong URL or key shows up.
The log records
Each audit event is posted to /v1/logs as one log record, with your organization as the resource:
| Field | Value |
|---|---|
resource | service.name = hotcodepush, hotcodepush.organization.id |
eventName | The event type, such as release.created |
body | The event's title, such as Release #12 created |
timeUnixNano | When the event happened |
severityNumber | 9, INFO |
attributes | hotcodepush.audit.id, hotcodepush.actor.type, hotcodepush.user.id and hotcodepush.app.id where set, the release keys where the event names a release, and hotcodepush.snapshot |
The release keys are the ones Tag releases in your telemetry has your app attach, every value a string. hotcodepush.snapshot carries the event's snapshot as a nested key-value list, so a backend can query its fields.
Every event type goes out, the internal ones included, since the export is a log drain rather than a subscription. Snapshots name your members by email where the event is about them, so the backend you chose receives those addresses. Privacy says what that means for your own policy.
The metrics
Once an hour one document is posted to /v1/metrics, one resource per app with service.name = hotcodepush and hotcodepush.app.id. The counts are cumulative: each point carries the total so far, and your backend derives rates and deltas.
| Metric | Kind | Unit | Attributes |
|---|---|---|---|
hotcodepush.update.applied | cumulative sum | {update} | hotcodepush.channel.id, hotcodepush.release.id, hotcodepush.release.number |
hotcodepush.update.confirmed | cumulative sum | {update} | the same |
hotcodepush.update.failed | cumulative sum | {update} | the same, plus hotcodepush.update.failure.reason: crash, download, readiness_timeout, reported or verification |
hotcodepush.update.rolled_back | cumulative sum | {update} | the same three |
hotcodepush.device.monthly_active | gauge | {device} | none, for the current month |
hotcodepush.app.data_transfer | cumulative sum | By | none, for the current month as of the previous day's rollup |
hotcodepush.channel.active_devices | gauge | {device} | hotcodepush.channel.id, for the previous UTC day |
A release's sums start at its creation, so confirmed / applied is its confirmation rate and failed / applied its failure rate over any window your backend draws. Adoption in Analytics is a different ratio, the share of a day's active devices running the release, which these sums do not carry.
Deliveries, retries and the disable rule
Every record and every document is one delivery, listed on the export's deliveries page in the console, with hotcodepush telemetry-export-delivery list and in the API, for the retention period. A failed delivery is retried on the same timeout and ladder as a webhook.
Consecutive failures disable the export the way they disable a webhook, and the organization's members get a mail. The export's page, telemetry-export update --enabled or PATCH turns it on again.
A redelivery sends a log record again as it was. A redelivered metrics document carries the current numbers, since the document is built when it is sent.
The API and the CLI
The export is the resource /v1/organizations/{organizationId}/telemetry-export, with /test, /deliveries and /deliveries/{deliveryId}/redeliver beside it, in the Swagger reference. Setting, switching and removing it take a signed-in session, never an API token, and setting, switching, testing and redelivering need a paying plan. The CLI's telemetry-export and telemetry-export-delivery cover the same operations from the terminal.
Last updated on