doca-telemetry-exporter

Guides agents through publishing structured telemetry from DOCA applications via the Telemetry Exporter C API.

3.2k|370|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/NVIDIA/skills --skill doca-telemetry-exporter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doca-telemetry-exporter
Source: https://github.com/NVIDIA/skills/tree/main/skills/doca-telemetry-exporter
Command: npx skills add https://github.com/NVIDIA/skills --skill doca-telemetry-exporter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers writing DOCA applications often confuse the publisher-side Telemetry Exporter library with the receiving Telemetry Service, misuse the schema-to-source lifecycle, and hit DOCA_ERROR_* failures without a clear diagnosis path. This Skill gives an AI agent the exact lifecycle, publish-surface selection rules, error taxonomy, and debug workflow for the doca_telemetry_exporter_* API.

Core Features & Use Cases

  • Publish-surface selection: Chooses between typed structured events, opaque events, the Metrics API (counter/gauge/histogram), OTLP logs, and the NetFlow/IPFIX sibling API based on user intent.
  • Lifecycle and error guidance: Walks the schema_init → schema_start → source_create → source_start → report → flush → destroy sequence and maps DOCA_ERROR_BAD_STATE, INVALID_VALUE, NO_MEMORY, INITIALIZATION, and UNKNOWN to root causes.
  • Task workflows: Provides configure, build, modify-from-shipped-sample, run, test, and debug verbs grounded in the installed DOCA samples under /opt/mellanox/doca/samples/doca_telemetry_exporter/.
  • Use Case: A developer wants their DOCA Flow program to publish per-second packet counters to a downstream collector; the agent identifies the Metrics API as the right surface, starts from the telemetry_export_metrics sample, and validates delivery with a file-write smoke test.

Quick Start

Ask your agent to help you emit a structured event or counter from your DOCA application using the DOCA Telemetry Exporter library on your installed DOCA host.

Frequently Asked Questions about doca-telemetry-exporter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish structured events from a DOCA application?

Define a doca_telemetry_exporter_schema, register event types with fields before schema_start, then create and start a source and call doca_telemetry_exporter_source_report. Start from the shipped telemetry_export sample under /opt/mellanox/doca/samples/doca_telemetry_exporter/.

What is the difference between DOCA Telemetry Exporter and the DOCA Telemetry Service?

The Telemetry Exporter is the publisher library your application links to emit telemetry. The Telemetry Service (DTS) is a separate receiving and aggregating DOCA service with its own guide; this Skill covers only the publisher side.

Why does doca_telemetry_exporter_source_report return DOCA_ERROR_BAD_STATE?

BAD_STATE indicates a lifecycle order violation: the source was never started, or an OTLP logs call was made before its context existed. Ensure schema_start precedes source_create, source_start precedes any report, and metrics or OTLP contexts are created only after source_start.

Does DOCA Telemetry Exporter support NetFlow and Prometheus export?

Yes. NetFlow/IPFIX records use the sibling _netflow_* API in doca_telemetry_exporter_netflow.h, and metrics can be exposed to Prometheus by setting the PROMETHEUS_ENDPOINT environment variable before schema_init.

Why does my exporter report success but the collector sees nothing?

This usually means the receiver is not up or IPC is not connected. Check doca_telemetry_exporter_check_ipc_status for CONNECTED status, start the receiver before the application, and enable file write to verify the publish path independently.

Can I query device capabilities for the telemetry exporter with doca_caps?

No. This library has no doca_devinfo capability-query family and its doca_caps dump is a stub. Runtime introspection is limited to check_ipc_status, the opaque report max data size getter, and the schema_get_* config getters.