Doca Telemetry Exporter
NVIDIAOfficialCreated by NVIDIA
- Skill
- Tool integration
- Software development
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides technical guidance for developers using the DOCA Telemetry Exporter library to publish structured telemetry data—such as counters, gauges, and events—from a DOCA-enabled application to an external consumer. It covers the schema-to-source lifecycle, selection of publish surfaces (including Metrics API, OTLP, and NetFlow), and debugging common runtime errors. It is strictly focused on the publisher side and does not cover the receiving DOCA Telemetry Service or general DOCA installation.
What it does
- Defines the schema-to-source lifecycle for telemetry emission.
- Assists in selecting appropriate publish surfaces like Metrics, OTLP, or NetFlow.
- Provides debugging strategies for DOCA_ERROR_* codes specific to the exporter.
- Clarifies the distinction between the exporter library and the receiving telemetry service.
- Guides users on verifying IPC transport liveness and exporter configuration.
- Supports integration of the C ABI into custom application code or language bindings.
When to use it
- When you need to emit structured telemetry from a DOCA application.
- When you encounter errors like DOCA_ERROR_BAD_STATE during report calls.
- When you are unsure whether to use the exporter library or the telemetry service.
- When you need to implement specific publish surfaces like counters or opaque events.
- When you need to verify if the exporter is correctly installed and connected to a transport.
Advantages
- Provides a clear, structured workflow for the exporter lifecycle.
- Helps avoid common pitfalls like incorrect initialization order.
- Distinguishes clearly between publisher and consumer responsibilities.
- Offers specific guidance on mapping application intent to publish surfaces.
- Integrates with standard DOCA debugging and versioning practices.
Usage examples
- “How do I emit a packets_processed event record from my DOCA Flow application?”
- The agent will guide you through the schema definition, source creation, and the report call sequence required to emit structured events.
- “My report call returns DOCA_ERROR_BAD_STATE on the first call, what is wrong?”
- The agent will help you verify the lifecycle order, ensuring the source was properly started and the OTLP context is initialized before reporting.
- “I want to publish per-interface packet counters and a bandwidth gauge, which API should I use?”
- The agent will direct you to the Metrics API and provide the necessary steps to implement counter and gauge reporting.
- “My report returns success, but the collector sees nothing. Where do I start?”
- The agent will walk you through verifying the receiver status, checking IPC connectivity, and performing a file-write smoke test to isolate the issue.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/doca-telemetry-exporter/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip doca-telemetry-exporter.zip -d .agents/skills
Documentation by NVIDIA
DOCA Telemetry Exporter
Examples
"Publishing counters from my DOCA app." — this is in scope. Walk schema-then-source; do not configure DTS here.
"BAD_STATE when I report an event." — check the lifecycle order before changing the report call.
Instructions
Follow Loading order below. Open the tasks companion for configure / publish / debug. Open the capabilities companion for publish surfaces. Do not open every companion file.
Where to start: This skill assumes DOCA is already installed and
the user is doing hands-on telemetry-exporter work — emitting
structured application telemetry (counters / events) from a
DOCA-using program to an external consumer. Open
the tasks companion if the user wants to do something (configure
/ build / modify + rebuild / run / test / debug); open
the capabilities companion when the question is what can
the exporter express on this install. If the user has not installed
DOCA yet, route to doca-setup/SKILL.md first.
If the user is confused about whether they want this library or the
DOCA Telemetry Service (the receiver) — read the
exporter-vs-service rule in
the capabilities companion
before configuring anything.
This library is NOT a DOCA Core context. There is no
doca_ctx_start()for the exporter and no per-doca_devinfocapability-query family (itsdoca_capsdump is a stub). The lifecycle isschema_init→ configure exporters → register type(s) →schema_start→source_create→source_start→ report → flush → destroy.
Example questions this skill answers well
The CLASSES of telemetry-exporter questions this skill is built to answer, each with one worked example. The agent should treat the class as the load-bearing piece — the worked example is a single instance.
"Which library do I want — the exporter or the telemetry service?" — worked example: "I want my DOCA Flow program to publish a per-second packets-processed counter to a downstream collector — which DOCA artifact do I link?". Answered by the exporter-vs-service rule in
Capabilities and modes
role-split table + the path-selection bullet, both of which name
doca-telemetry-exporteras the publisher the application links and route the receiving / consuming side away from this skill."How do I emit my first structured event from a DOCA program?" — worked example: "emit a
packets_processedevent record from my DOCA Flow application". Answered by the schema → source lifecycle inCapabilities and modes
object table + the workflow in
configure +
run step 3 (file-write smoke before
bulk), starting from the
telemetry_export/sample."Which publish surface do I want — typed events, metrics, OTLP logs, or NetFlow?" — worked example: "I want labeled per-interface packet counters and a bandwidth gauge". Answered by the publish-surface table in
Capabilities and modes
(that intent maps to the Metrics API —
_metrics_add_counter/_add_gauge— and thetelemetry_export_metrics/sample), plus the sample map in ## modify."My report call returns
DOCA_ERROR_BAD_STATE— what did I get wrong?" — worked example: "doca_telemetry_exporter_source_reportreturnsBAD_STATEon the first call". Answered by theBAD_STATErow inError taxonomy
(the source was never started, or an OTLP context is missing on write/flush) + the lifecycle order in
configure. Note there is NO
DOCA_ERROR_AGAINand NODOCA_ERROR_NOT_FOUNDon this API."My program reports, but the DTS / collector sees nothing — where do I start?" — worked example: "my report returns success, but the DTS log is empty". Answered by the receiver-up-first staging in
Safety policy
the file-write smoke and
check_ipc_statussteps in
test (prove the publish half with
file write, then confirm IPC is
CONNECTEDand the receiver is up)."How do I confirm the exporter is installed and my transport is live?" — worked example: "is the exporter on my DOCA 3.x install, and is IPC to DTS actually connected?". Answered by the version-compatibility overlay in
Version compatibility
(cross-linking the detection chain in
doca-version/SKILL.md) plus the honest introspection rule inCapabilities and modes
(
doca_telemetry_exporter_check_ipc_status, not a device cap-query).
Audience
This skill serves external developers building applications that
emit structured telemetry through DOCA Telemetry Exporter — i.e.,
users whose application code calls doca_telemetry_exporter_*
(directly in C/C++, or through FFI/bindings from another language)
to publish counters, gauges, and events from their DOCA-using
program to an external telemetry consumer. It is not for NVIDIA
developers contributing to DOCA Telemetry Exporter itself, and it
is not for users building the receiving / aggregating telemetry
service (the DOCA Telemetry Service is a separate DOCA service with
its own public guide, reached via
doca-public-knowledge-map/SKILL.md).
Language scope. DOCA Telemetry Exporter ships as a C library
with pkg-config module name doca-telemetry-exporter. The
shipped samples are written in C. C and C++ consumers are the
canonical case; the worked examples in the tasks companion assume that path.
Other-language consumers (Rust, Go, Python, …) consume the same
*.so through FFI or language-specific bindings; the skill's
contribution in that case is to keep the exporter-vs-service
distinction, the schema → source lifecycle, the transport-not-caps
discovery rule, the same-user-as-the-app permission rule, the
buffered flush-based delivery model, and the error-taxonomy
guidance language-neutral, and to route the agent to the public C
ABI as the authoritative surface that any wrapper will eventually
call.
When to load this skill
Load this skill when the user is doing hands-on DOCA Telemetry Exporter work, in any language. Concretely:
Defining a
doca_telemetry_exporter_schemafor the events the application will emit (field names + field types), and registering it with the exporter BEFORE any event is published.Creating one or more
doca_telemetry_exporter_sourceinstances to represent distinct logical sources of telemetry inside the application (e.g. one source per worker thread / per pipeline stage).Picking the right publish surface — typed structured events (
_source_report), opaque events (_source_opaque_report), the Metrics API (counter / gauge / histogram), OTLP logs, or the NetFlow sibling API — for what the application reports.Confirming the exporter's install + transport reality (there is NO
doca_devinfocap-query family and NOdoca_capsdata for this library):doca_telemetry_exporter_check_ipc_statusfor IPC liveness,_source_get_opaque_report_max_data_sizefor the opaque payload bound, and the_schema_get_*config getters.Debugging a
DOCA_ERROR_*returned from an exporter call (BAD_STATElifecycle-order vs.INVALID_VALUEtype/label mismatch vs.NO_MEMORYvs.INITIALIZATIONvs.UNKNOWNbackend) and the per-call status returned to the application.Choosing between Telemetry Exporter and an adjacent option (
doca_logwhen stdout / structured-log shipping is enough; a Prometheus client library when the user needs a non-DOCA-aware sink;doca-comch/SKILL.mdwhen the user needs a real-time event subscription back INTO the app — the exporter is publish-only / one-way).Designing or extending non-C bindings (Rust, Go, Python, …) that wrap the exporter C ABI — for the exporter-vs-service distinction, the schema → source lifecycle, the permission policy, the buffered flush-based delivery model, and the transport-introspection + error rules the wrapper must honor.
Do not load this skill for general DOCA orientation, install
of DOCA itself, the receiving telemetry service (the DOCA
Telemetry Service has its own public guide reachable through
doca-public-knowledge-map/SKILL.md),
or non-exporter library questions. For those, use
doca-public-knowledge-map/SKILL.md.
What this skill provides
This is a thin loader. The body keeps only the orientation needed to pick the right next file. The substantive exporter-specific material lives in two companion files:
the capabilities companion — what the exporter can express on this install: the exporter-vs-service role-split rule, the object family (
doca_telemetry_exporter_schema→_type/_field→_sourcewith the schema → source lifecycle), the four publish surfaces (typed events / opaque events / Metrics API / OTLP logs) plus the NetFlow sibling API, the transport-not-caps introspection rule (check_ipc_status,_get_opaque_report_max_data_size,_schema_get_*— NOdoca_capsdata, NO device cap-query), the exporter error taxonomy (mapped onto the cross-libraryDOCA_ERROR_*set, with the note that there is NOAGAINand NONOT_FOUNDon this surface), the observability surface (per-call status + IPC status + file-write inspection + the receiver side as the end-to-end signal), the safety policy that gates the same-user-as-the-app permission and the receiver-up-first staging, and the path-selection rule againstdoca_loganddoca-comch.the tasks companion — step-by-step workflows for the six in-scope exporter verbs:
configure,build,modify(followed by a rebuild),run,test,debug. Plus aDeferred task verbsblock that points out-of-scope questions at the right next skill.
The skill assumes a host where DOCA is already installed at the
standard location, the application runs as a user that can write
to the telemetry transport the exporter is configured for, and a
receiving telemetry consumer is reachable and started before the
exporter. It does not cover installing DOCA — that path goes
through doca-setup/SKILL.md — and it does
not cover configuring / operating the receiving telemetry service,
which is a separate DOCA service with its own public guide.
What this skill deliberately does not ship
This skill is agent guidance, not a samples or templates bundle. To keep the boundary clean, it deliberately does not contain — and pull requests should not add:
Pre-written DOCA Telemetry Exporter application source code, in any language. The verified exporter source code is the shipped C samples at
/opt/mellanox/doca/samples/doca_telemetry_exporter/. The agent's job is to route the user to those files and prescribe a minimum-diff modification on them via the universal modify-a-sample workflow indoca-programming-guide/SKILL.md, layered with the exporter-specific overrides inmodify.
A telemetry consumer / collector / receiving service. The DOCA Telemetry Service is a separate DOCA service with its own public guide; routing to it goes through
doca-public-knowledge-map/SKILL.md. This skill is about the publisher side only.Standalone build manifests (
meson.build,CMakeLists.txt,Cargo.toml, …) parked inside the skill. The agent constructs the build manifest in the user's project directory against the user's installed DOCA, wherepkg-config --modversion doca-telemetry-exporteris the source of truth.A
samples/,bindings/, orreference/subtree of any kind. A mock or incomplete artifact in this skill's tree, even one labeled "reference", is misleading: users will read it as buildable.
Loading order
Read this skill first to confirm the user's question is in scope.
For the exporter-vs-service rule, the object family, the schema → source lifecycle, the four publish surfaces + NetFlow, the transport-not-caps introspection rule, the error taxonomy (note: no
AGAIN, noNOT_FOUND), observability, the safety policy, and the path-selection rule againstdoca_log/ comch, see the capabilities companion.For step-by-step workflows — configure, build, modify, rebuild, run, test, debug — see the tasks companion.
Both companion files cross-link to each other,
doca-version/SKILL.md for the canonical
version-handling rules, and
doca-public-knowledge-map/SKILL.md
whenever the right answer is "look it up in the public docs or
the installed package layout" rather than "exporter-specific
guidance".
Related skills
doca-public-knowledge-map/SKILL.md— the routing table for every public DOCA documentation source and the on-disk layout of an installed DOCA package. The exporter's public guide URL ishttps://docs.nvidia.com/doca/sdk/DOCA-Telemetry-Exporter/index.html; the on-disk samples live under/opt/mellanox/doca/samples/doca_telemetry_exporter/. The DOCA Telemetry Service (the receiver, out of scope here) is a separate guide reachable through that same routing table.doca-setup/SKILL.md— env preparation, install verification, transport-side reachability checks, and the I have no install yet path with the public NGC DOCA container. This skill assumes its preconditions are satisfied (in particular, the application user can write to the telemetry transport).doca-version/SKILL.md— canonical DOCA version-handling rules. This skill's## Version compatibilitycross-links the four-way match rule + detection chain and adds the exporter-specific overlay rules.doca-structured-tools-contract/SKILL.md— the bundle's structured-tools precedence rule (detect / prefer / fall back / report). The Command appendix in the tasks companion honors this contract.doca-programming-guide/SKILL.md— general DOCA programming patterns shared by every library: the canonicalpkg-config+ meson build pattern, the universal modify-a-shipped-sample first-app workflow, the universal lifecycle, the cross-libraryDOCA_ERROR_*taxonomy, and the program-side debug order. This skill layers exporter specifics on top.doca-comch/SKILL.md— the right primitive when the user needs a real-time event subscription back INTO the application (host ↔ DPU control-plane messaging). The exporter is publish-only / one-way; this skill's path-selection rule routes there when subscription is the actual requirement.doca-debug/SKILL.md— the cross-cutting debug ladder (install / version / build / link / runtime / program / driver). Exporter-specific debug (receiver not up, lifecycle-orderBAD_STATE, type/labelINVALID_VALUE, opaque-path-not-enabled) overlays on top of that ladder.
Files
- ATTRIBUTION.mdAdded by AutoGineer927 B
- BENCHMARK.md10.0 KiB
- CAPABILITIES.md26.0 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md16.0 KiB
- SKILLCARD.yaml2.7 KiB
- TASKS.md27.4 KiB
- evals/evals.json2.6 KiB
- skill-card.md5.4 KiB
- skill.oms.sig5.1 KiB
CAPABILITIES.md
DOCA Telemetry Exporter capabilities, publish surfaces, version overlay, errors, observability, safety
Where to start: Pick the H2 anchor that matches your question (role-split / object family / publish-surface selection / version / errors / observability / safety) and read that section end-to-end. The tables in each section are the load-bearing content; the prose around them is interpretation.
Read this file when the loader sent you here from
SKILL.md. For the how of executing each pattern (the
verbs configure / build / modify / run / test / debug), jump to
TASKS.md. For the canonical DOCA version-handling rules
that this skill layers an exporter overlay on top of, see
doca-version/SKILL.md.
Ground-truth note. Every symbol, macro, error code, default path, and lifecycle step in this file is quoted from the public exporter headers (
doca_telemetry_exporter.h,doca_telemetry_exporter_netflow.h) and the shipped samples under/opt/mellanox/doca/samples/doca_telemetry_exporter/. The headers-win-over-docs rule (doca-version/SKILL.md) applies: if the installed header disagrees with anything here, the header is authoritative and the agent must re-read it before answering.
Pattern overview
Every telemetry-exporter question this skill teaches resolves into one of SIX patterns. The patterns are CLASSES — they apply across every exporter release and every DOCA-using application, not just the worked examples shown.
| Pattern | When it applies (class shape) | Where the substance lives |
|---|---|---|
| 1. Pick exporter, not the service | The application is the PUBLISHER of telemetry; the receiving / aggregating side (DOCA Telemetry Service, DTS) is a separate DOCA artifact out of this skill's scope | ## Capabilities and modes role-split table |
| 2. Pick the right publish surface | The library exposes FOUR distinct publish surfaces — typed structured events, opaque events, the Metrics API (counter/gauge/histogram), and the NetFlow/IPFIX API — plus the OTLP-logs API layered on a source. Picking the wrong one is the #1 first-app confusion | ## Capabilities and modes publish-surface table |
| 3. Register the schema/type BEFORE the first report | Typed events are shaped by a doca_telemetry_exporter_type added to a doca_telemetry_exporter_schema and finalized with doca_telemetry_exporter_schema_start() BEFORE any source is created; reporting against a source that was not started returns DOCA_ERROR_BAD_STATE | ## Capabilities and modes object table + TASKS.md ## configure |
| 4. Walk the schema → source lifecycle | schema_init → configure exporters (file / IPC / opaque) → type_create + field_* + schema_add_type → schema_start → source_create → source_set_id/tag → source_start → report → source_flush → source_destroy → schema_destroy | ## Capabilities and modes object table + TASKS.md ## configure |
| 5. Confirm the transport, not device caps | This library has NO per-doca_devinfo capability-query family and NO doca_caps data (its doca_caps dump is a stub). The real preconditions are transport ones: is a receiver up, is IPC connected (doca_telemetry_exporter_check_ipc_status), is the file-write data root writable | ## Capabilities and modes transport rule + ## Observability |
| 6. Diagnose an exporter error | Map the actual documented codes (DOCA_ERROR_BAD_STATE, DOCA_ERROR_INVALID_VALUE, DOCA_ERROR_NO_MEMORY, DOCA_ERROR_INITIALIZATION, DOCA_ERROR_UNKNOWN) to root cause; there is NO DOCA_ERROR_AGAIN and NO DOCA_ERROR_NOT_FOUND on this API surface | ## Error taxonomy + TASKS.md ## debug |
Two cross-cutting rules that apply to every pattern above:
The exporter is the publisher; the receiver is a separate artifact.
doca-telemetry-exporteris what the user's application links to publish telemetry. The aggregating / collecting side (the DOCA Telemetry Service, DTS — reached over IPC) and any downstream OpenTelemetry Collector are separate, each with its own public guide reachable throughdoca-public-knowledge-map/SKILL.md. Conflating the two is the #1 first-app confusion and the agent must surface the distinction before any code-level guidance.Delivery is buffered and flush-based, not a blocking submit. Reports accumulate in an internal buffer that is flushed when full or on an explicit
doca_telemetry_exporter_source_flush()(or the Metrics API's_metrics_flush/ auto flush interval). A_source_reportdoes NOT block on a full transport and does NOT returnDOCA_ERROR_AGAIN— there is no such return in this API. The NetFlow_netflow_sendreports how many records it actually sent via itsrecords_sentout-parameter; a short send is the backpressure signal on that surface.
Capabilities and modes
DOCA Telemetry Exporter is a publisher library,
not a DOCA Core Context. It does NOT use the
doca_ctx_create → doca_ctx_start lifecycle and there is no
doca_ctx handle for the exporter. The lifecycle is instead a
schema → source progression, with three optional per-source
publish contexts (metrics / OTLP logs) and one sibling top-level
API (NetFlow).
Role split — exporter (publisher) vs telemetry service (receiver). The exporter is asymmetric and the asymmetry is the #1 first-app confusion.
| Side | What it does | What it does NOT do | Where it lives |
|---|---|---|---|
| Exporter (this library) | Application-side publishing: define event/type schemas, create sources, report typed / opaque events, metrics, and NetFlow records into the configured exporters (file write, IPC to DTS, Prometheus for metrics, UDP collector for NetFlow) | Aggregate, persist, query, fan-out, or downstream-route telemetry | Linked INTO the user's DOCA-using application; runs as the application's user, in the application's process |
| Telemetry receiver (separate — DTS / OTel Collector / NetFlow collector) | Receive telemetry from one or more exporters, aggregate / persist / forward to downstream sinks | Publish telemetry itself | A separate DOCA service (DTS) or third-party collector with its own guide; reach via doca-public-knowledge-map/SKILL.md. NOT part of this skill |
Object family. The public surface is closed; the agent must not
invent additional object types or a doca_ctx.
| Object / handle | What it represents | Created / finalized by | Notes |
|---|---|---|---|
struct doca_telemetry_exporter_schema | The root publisher configuration: which exporters are enabled (file / IPC / opaque), buffer size, and the set of registered event types | doca_telemetry_exporter_schema_init(name, &schema); finalized by doca_telemetry_exporter_schema_start(schema); freed by doca_telemetry_exporter_schema_destroy | Configure exporters with the doca_telemetry_exporter_schema_set_* family BEFORE schema_start; per-type indexes through the public header via doca_telemetry_exporter_schema_set_indexes(schema, type_index, index_names, num_indexes) and read back with doca_telemetry_exporter_schema_get_indexes(schema, type_index, &index_names, &num_indexes). Do NOT add types after schema_start |
struct doca_telemetry_exporter_type | The shape (field list) of ONE structured event record | doca_telemetry_exporter_type_create(&type), fields added via doca_telemetry_exporter_type_add_field, registered into a schema with doca_telemetry_exporter_schema_add_type(schema, name, type, &type_index) | schema_add_type returns a doca_telemetry_exporter_type_index_t — the handle you pass to _source_report. Duplicate type name or bad field type → DOCA_ERROR_INVALID_VALUE |
struct doca_telemetry_exporter_field | One field of a type: name, description, type-name, array length | doca_telemetry_exporter_field_create, then _field_set_name / _field_set_description / _field_set_type_name / _field_set_array_len | Field type is one of the DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_* string macros (e.g. ..._UINT64, ..._INT32, ..._CHAR, ..._TIMESTAMP). Ownership transfers to the type on _type_add_field |
struct doca_telemetry_exporter_source | One logical reporter (per-worker / per-pipeline-stage / per-tenant) | doca_telemetry_exporter_source_create(schema, &source) (schema must be started first), _source_set_id / _source_set_tag, then doca_telemetry_exporter_source_start(source) | Report only after source_start. Multiple sources per schema are allowed. _source_flush forces a buffer flush; _source_destroy tears it down |
Publish surfaces. ONE source can drive several publish surfaces. The agent MUST pick the surface that matches intent before writing any report call.
| Publish surface | How to publish | Precondition | Stability |
|---|---|---|---|
| Typed structured events | doca_telemetry_exporter_source_report(source, type_index, data, count) where data is a read-only const void * to an array of count packed records matching the registered type | A type was added via _schema_add_type before schema_start; source started | DOCA_EXPERIMENTAL |
| Opaque events | doca_telemetry_exporter_source_opaque_report(source, app_id, user_defined1, user_defined2, data, data_size); size bound via doca_telemetry_exporter_source_get_opaque_report_max_data_size | doca_telemetry_exporter_schema_set_opaque_events_enabled(schema) BEFORE schema_start | DOCA_STABLE |
| Metrics (counter / gauge / histogram) | Create a metrics context on a STARTED source with doca_telemetry_exporter_metrics_create_context(source), then _metrics_add_counter / _add_counter_increment / _add_gauge / _add_gauge_uint64 / _add_histogram / _add_base_histogram / _metrics_histogram_observe / _metrics_base_histogram_observe; labels via _metrics_add_constant_label / _metrics_add_label_names; flush via _metrics_flush or _metrics_set_flush_interval_ms | Source started; metrics context created after source_start | DOCA_EXPERIMENTAL |
| OTLP logs | Create an OTLP-logs context on a STARTED source with doca_telemetry_exporter_otlp_logs_create_context(source), add resource(s) + scope(s), then _otlp_logs_write_event / _write_event_with_severity, _otlp_logs_flush | doca_telemetry_exporter_schema_set_opaque_events_enabled(schema) (OTLP logs ride the opaque path); source started | DOCA_EXPERIMENTAL |
| NetFlow / IPFIX records | Sibling top-level API in doca_telemetry_exporter_netflow.h: _netflow_init(source_id) → _netflow_set_collector_addr/port → _netflow_source_set_id/tag → build a _netflow_template (_netflow_template_create + _netflow_field_* + _netflow_template_add_field) → _netflow_start → _netflow_send(template, records, count, &records_sent) → _netflow_flush → _netflow_destroy | NetFlow field IDs are the DOCA_TELEMETRY_EXPORTER_NETFLOW_* macros (IPFIX element IDs) | DOCA_STABLE |
Export destinations (transports). Enabled on the schema (or via the NetFlow API / env var) BEFORE start. Multiple may be enabled at once.
| Destination | How to enable | Where it goes | Default path / knob |
|---|---|---|---|
| File write | doca_telemetry_exporter_schema_set_file_write_enabled(schema) | Binary telemetry files on local disk (dev / offline ingestion) | Data root default documented in the header as /opt/mellanox/doca/services/telemetry/data/; override with _schema_set_buf_data_root. File rotation via _schema_set_file_write_max_size / _max_age |
| IPC to DTS | doca_telemetry_exporter_schema_set_ipc_enabled(schema) | Streams to the DOCA Telemetry Service over a local socket | Socket dir default documented in the header as /opt/mellanox/doca/services/telemetry/ipc_sockets; override with _schema_set_ipc_sockets_dir. Reconnect knobs: _set_ipc_reconnect_time / _reconnect_tries / _socket_timeout. Liveness via doca_telemetry_exporter_check_ipc_status |
| Prometheus (metrics only) | Set PROMETHEUS_ENDPOINT=host:port in the environment before schema_init | Exposes a /metrics scrape endpoint | Env-var driven, per the metrics sample; not a schema_set_* call |
| NetFlow collector | _netflow_set_collector_addr / _netflow_set_collector_port (and/or _netflow_set_ipc_enabled / _netflow_set_file_write_enabled) | UDP NetFlow/IPFIX collector | Address/port are caller-supplied |
Capability discovery — the honest rule. Unlike accelerator
libraries (SHA, RDMA, Compress, Flow), DOCA Telemetry Exporter has
no doca_devinfo capability-query family and no doca_caps
data — the doca_caps telemetry-exporter dump is a stub that
returns success with no fields. Do NOT tell the user to run a
doca_telemetry_exporter_*_get_* "cap query" for max fields / max
event size / supported event types; those functions do not exist.
The only runtime introspection the library offers is:
doca_telemetry_exporter_check_ipc_status(source, &status)— is the IPC transportCONNECTED/FAILED/DISABLED.doca_telemetry_exporter_source_get_opaque_report_max_data_size(source, &max)— the max opaque payload size for this source.the
doca_telemetry_exporter_schema_get_*config getters — read back the buffer / file-write / IPC settings and per-type indexes (doca_telemetry_exporter_schema_get_indexes) you set through the public header.
Everything else is validated the sample-driven way: enable file
write, run, and inspect the emitted binary data files (and/or
confirm receipt at the DTS / collector). See
## Observability.
Version compatibility
For the canonical DOCA version-detection chain, the four-way match rule, NGC container semantics, and the headers-win-over-docs rule, see doca-version/SKILL.md. The body lives there; this skill does not duplicate it.
The exporter-specific overlay is:
Use
pkg-config --modversion doca-telemetry-exporteras the build-time anchor. Perdoca-version TASKS.md ## configure(doca-version/TASKS.md#configure), this MUST match the other version sources. Because there is nodoca_capsdata for this library, the four-way match'sdoca_caps --versionleg is a whole-install version check, NOT a per-artifact capability probe for the exporter.The Metrics API, OTLP-logs API, typed-
_source_report, and_schema_set_indexes/_get_indexesareDOCA_EXPERIMENTAL. They require building with-DDOCA_ALLOW_EXPERIMENTAL_API(perdoca-programming-guide/SKILL.md); they may change across releases. In DOCA 3.5, thedoca_telemetry_exporter_source_reportdata parameter became const-qualified, and thedoca_telemetry_exporter_schema_*_indexesfamily was added. Code written against earlier DOCA releases must const-qualify source report buffers and add schema index configuration via thedoca_telemetry_exporter_schema_*_indexesfamily; the new schema index functions are available only when building against DOCA 3.5 or later. See the installeddoca_telemetry_exporter.hfor the exact signatures. TheDOCA_STABLEsurface includes the schema → source core (schema_init/schema_start/source_create/source_start/source_destroy/schema_destroy), typed-schema registration (type_create/field_create/type_add_field/schema_add_type),source_opaque_report/source_flush/check_ipc_status/get_timestamp, the fullschema_set_*/schema_get_*config family, and the entire NetFlow sibling API indoca_telemetry_exporter_netflow.h. Confirm theDOCA_STABLE/DOCA_EXPERIMENTALmarker in the installed header before relying on any symbol — the shipped samples still set-DDOCA_ALLOW_EXPERIMENTAL_APIblanket-style even when only stable symbols are used.The exporter is distinct from the DOCA Telemetry Service across every release. When the user reports "the docs I'm reading talk about a telemetry SERVICE — is that this library?", the answer is no. Route to
doca-public-knowledge-map/SKILL.mdfor the service guide.doca-telemetry-exporter.pcplusdoca-common.pcmust both matchdoca_caps --versionat the version check (perdoca-version CAPABILITIES.md ## Version compatibility(doca-version/CAPABILITIES.md#version-compatibility)). A common partial-install pattern after a DOCA upgrade is thatdoca-telemetry-exporter.pclingers from the previous release whiledoca-common.pcwas refreshed; route todoca-version TASKS.md ## debug(doca-version/TASKS.md#debug) ladder step 2 before any exporter-layer diagnosis.
Error taxonomy
Only the doca_error_t codes the exporter headers actually document
appear below. There is no DOCA_ERROR_AGAIN (delivery is
buffered/flush-based, not a blocking submit) and no
DOCA_ERROR_NOT_FOUND on this API surface — do not invent them.
The cross-library taxonomy lives in
doca-programming-guide CAPABILITIES.md ## Error taxonomy (doca-programming-guide/CAPABILITIES.md#error-taxonomy);
the rows below are the exporter surface meanings.
| Error | Exporter context where it shows up | Exporter-specific cause / fix |
|---|---|---|
DOCA_ERROR_BAD_STATE | doca_telemetry_exporter_source_report / _source_opaque_report when the source was never started; _otlp_logs_* when the OTLP context does not exist (or the source is not started, or context already exists on create); NetFlow _netflow_* when NetFlow was not initialized / not started / already initialized (per doca_telemetry_exporter_netflow.h) | Lifecycle order violation. For schema/source: schema_start before source_create, source_start before any report, and create the OTLP context only AFTER source_start. For NetFlow: _netflow_init → configure → _netflow_start before _netflow_send |
DOCA_ERROR_INVALID_VALUE | NULL handle to almost any call; _schema_add_type with a duplicate type name or a field carrying an invalid DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_*; a _metrics_* call with a NULL handle, mismatched label arity, or invalid histogram ID; an _otlp_logs_* call with a NULL or mismatched-arity argument | Re-read the registered type/field definitions and the label-set arity. For events, confirm the packed struct matches the field list you registered. For metrics, note the header documents INVALID_VALUE / NO_MEMORY on _metrics_* — not BAD_STATE |
DOCA_ERROR_NO_MEMORY | _schema_init, _type_create, _field_create, _schema_add_type, _source_create, metrics/histogram allocation, NetFlow template build | Allocation failure — an env / resource problem, not an API-usage bug. Capture and route to doca-setup ## debug (doca-setup/TASKS.md#debug) |
DOCA_ERROR_INITIALIZATION | _schema_init, _schema_start | The schema could not be initialized / finalized (often a bad exporter configuration, e.g. an unwritable data root, or a telemetry-backend init failure). Re-check the enabled exporters and their paths before retrying |
DOCA_ERROR_UNKNOWN | _schema_set_indexes / _schema_get_indexes and other experimental paths where the underlying telemetry-backend operation failed for a non-specific reason | Treat as a telemetry-backend failure; capture the trace log and route to doca-debug ## debug (doca-debug/TASKS.md#debug) |
The agent's rule: identify which row above is the cause before
recommending any change; never invent an AGAIN/NOT_FOUND retry
loop. A BAD_STATE wants the lifecycle fixed; an
INVALID_VALUE wants the type/field/label definition fixed.
Observability
The exporter's observability is per-call return + IPC status + the emitted data itself + the receiver side. There is no progress-engine completion stream (this is not a Core context).
Four primary signals the agent should reach for:
Per-call return. Every
doca_telemetry_exporter_*call returns adoca_error_t; inspect it. For NetFlow, ALSO inspect therecords_sentout-parameter of_netflow_send—records_sent < countis a partial send (backpressure at the collector / transport), which the NetFlow sample treats as a failure.IPC status.
doca_telemetry_exporter_check_ipc_statusreturnsDOCA_TELEMETRY_EXPORTER_IPC_STATUS_CONNECTED/_FAILED/_DISABLED. When IPC is enabled but the DTS is not up, this is where the agent sees it — BEFORE blaming the report calls.File-write inspection (the cheapest end-to-end check). Enable
_schema_set_file_write_enabled, run, and inspect the binary data files under the data root. The shipped samples themselves rely on this as the "did it work" signal. A file with the expected schema + rows is the green signal for the publish half of the contract.Receiver-side reception (true end-to-end). For IPC → DTS, OTLP → OpenTelemetry Collector, or NetFlow → collector, the true signal is that the receiver logged / stored the events. An exporter returning success on every call while the receiver is empty is the canonical "published into a transport with no reader" failure — route via the receiver's own guide reached through
doca-public-knowledge-map/SKILL.md.
For the cross-cutting observability primitives
(DOCA_LOG_LEVEL, the doca-<lib>-trace build flavor) see
doca-debug CAPABILITIES.md ## Observability (doca-debug/CAPABILITIES.md#observability).
For the install-tree layout defer to
doca-public-knowledge-map/SKILL.md.
Safety policy
Overlay on the bundle-wide hardware-safety meta-policy. The rules below are this skill's per-artifact overlay on the cross-cutting rules in
doca-hardware-safetyCAPABILITIES.md ## Safety policy (doca-hardware-safety/CAPABILITIES.md#safety-policy). Telemetry publishing does not change hardware or fabric state (nomlxconfig, no firmware, no eswitch/representor change), so the hardware-safety triggers do not fire here. The safety surface is transport staging + destination permissions + buffer-flush semantics.
The staging + permission matrix the agent must walk for any new exporter setup:
| Prerequisite | Required state | How the agent verifies | Where to fix |
|---|---|---|---|
| File-write data root is writable | If _schema_set_file_write_enabled is on, the application user can write to the data root (default /opt/mellanox/doca/services/telemetry/data/, or the _set_buf_data_root override) | id + a write test to the data root; schema_start returns success rather than DOCA_ERROR_INITIALIZATION | Point the data root at a writable directory via _schema_set_buf_data_root; do NOT reflexively add sudo |
| Receiver up BEFORE export starts | If IPC is on, the DTS is running and its socket dir is reachable; if OTLP, the OpenTelemetry Collector is up; if NetFlow, the collector is listening | doca_telemetry_exporter_check_ipc_status returns CONNECTED (IPC); the receiver's own log/status for OTLP/NetFlow | Start the receiver first, then the app. The exporter cannot start the receiver; route to the receiver's guide via doca-public-knowledge-map/SKILL.md |
| Opaque path enabled before use | Opaque events and OTLP logs require _schema_set_opaque_events_enabled BEFORE schema_start | The first _source_opaque_report / _otlp_logs_* call does not return DOCA_ERROR_BAD_STATE for a missing context | Enable opaque events on the schema before schema_start; you cannot enable it after |
| Buffer is flushed before teardown | Buffered reports are flushed when the buffer fills or on explicit flush; on shutdown the app must flush so trailing events are not lost | The receiver / data file contains the final events, not just the pre-last-flush ones | Call _source_flush (events) / _metrics_flush (metrics) / _netflow_flush (NetFlow) before destroy, or configure a flush interval |
No sudo as a rule. The exporter runs in the application's own process as the application's user. If the first reaction to an init failure is to add
sudo, walk it back: the cause is almost always an unwritable data root or a receiver that is not up, not a missing privilege on the exporter process.Delivery never blocks the data path. Because reporting is buffered and flush-based (not a blocking submit), there is no hot-path back-pressure knob and no
DOCA_ERROR_AGAINto handle. If loss under load matters, tune buffer size (_schema_set_buf_size) and flush cadence, or widen the receiver — do NOT invent a retry loop.Validate with a file-write smoke before any bulk / IPC run. Enabling file write and inspecting the emitted data files is the cheapest way to prove the schema/type/report path is correct independent of any receiver. The loop is in
TASKS.md ## test.
Deferred topic boundaries
This skill scopes itself to the DOCA Telemetry Exporter library. Adjacent topics the agent will get asked but should route elsewhere:
The DOCA Telemetry Service (DTS, the receiver) — separate DOCA service with its own public guide. Reach via
doca-public-knowledge-map/SKILL.md. This skill is publisher-side only.Collector-side deployment — running the DOCA Telemetry Service (DTS) that collects and exports the counters lives in
doca-dts/SKILL.md.Downstream rendering / dashboards — once events reach the receiver, the downstream sinks (NetFlow / IPFIX / Prometheus / Grafana / OpenTelemetry Collector) are governed by their own ecosystems and guides.
DOCA Core context and progress-engine internals — owned by
doca-programming-guide/SKILL.md. Note the exporter is NOT a Core context; do not apply thedoca_ctxlifecycle to it.Real-time event subscription back into the app — the exporter is publish-only / one-way. The right primitive is
doca-comch/SKILL.mdfor a bi-directional message channel, not the exporter.Plain structured logging to stdout / files — use
doca_log(documented indoca-programming-guide/SKILL.md).Cross-cutting
DOCA_ERROR_*taxonomy — owned bydoca-programming-guide CAPABILITIES.md ## Error taxonomy(doca-programming-guide/CAPABILITIES.md#error-taxonomy).Cross-cutting debug ladder — owned by
doca-debug ## debug(doca-debug/TASKS.md#debug). This skill's## debugoverlays the runtime + program layers.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
The author says: Requires DOCA SDK installed at /opt/mellanox/doca on Linux (Ubuntu 22.04/24.04 or RHEL/SLES) with a BlueField DPU or ConnectX NIC attached. Reads the user's local install via `pkg-config doca-telemetry-exporter` and inspects /opt/mellanox/doca/{lib,include,samples,applications}. The validation steps require a live DOCA install.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- NVIDIA
- Publisher
- NVIDIA (Official)
- Source
- NVIDIA/skills · skills/doca-telemetry-exporter · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by NVIDIA or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download doca-telemetry-exporter.zip