Generated banner for Doca Telemetry Exporter
Generated logo for Doca Telemetry Exporter

Doca Telemetry Exporter

NVIDIAOfficialCreated by NVIDIA

  • Skill
  • Tool integration
  • Software development
  • Apache-2.0
  • Medium risk

From the author

Use this skill when the user is doing hands-on DOCA Telemetry Exporter programming on a host where DOCA is installed — defining a doca_telemetry_exporter_schema and event types, creating sources, picking a publish surface (typed events / opaque events / the metrics counter-gauge-histogram API / OTLP logs / NetFlow), walking the schema-then-source lifecycle, or debugging DOCA_ERROR_* failures from the exporter API. Trigger even when the user does not explicitly mention "DOCA Telemetry Exporter" or "doca_telemetry_exporter_*" — typical implicit phrasings include "publishing counters from my DOCA app", "BAD_STATE when I report an event", "consumer/DTS sees nothing but my report succeeded", "how do I export NetFlow/IPFIX records", or "should I link the exporter or the telemetry service". Refuse and route elsewhere for the receiving DOCA Telemetry Service (DTS), plain stdout logging via doca_log, or real-time event subscription back into the app via doca-comch — those belong to other skills.
— the description by NVIDIA

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

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/nvidia/doca-telemetry-exporter/download
  2. Unzip 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_devinfo capability-query family (its doca_caps dump is a stub). The lifecycle is schema_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-exporter as 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_processed event record from my DOCA Flow application". Answered by the schema → source lifecycle in

    Capabilities 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 the telemetry_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_report returns BAD_STATE on the first call". Answered by the BAD_STATE row in

    Error 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_AGAIN and NO DOCA_ERROR_NOT_FOUND on 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_status steps in

    test (prove the publish half with

    file write, then confirm IPC is CONNECTED and 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 in

    Capabilities 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_schema for 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_source instances 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_devinfo cap-query family and NO doca_caps data for this library): doca_telemetry_exporter_check_ipc_status for IPC liveness, _source_get_opaque_report_max_data_size for the opaque payload bound, and the _schema_get_* config getters.

  • Debugging a DOCA_ERROR_* returned from an exporter call (BAD_STATE lifecycle-order vs. INVALID_VALUE type/label mismatch vs. NO_MEMORY vs. INITIALIZATION vs. UNKNOWN backend) and the per-call status returned to the application.

  • Choosing between Telemetry Exporter and an adjacent option (doca_log when stdout / structured-log shipping is enough; a Prometheus client library when the user needs a non-DOCA-aware sink; doca-comch/SKILL.md when 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 → _source with 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_* — NO doca_caps data, NO device cap-query), the exporter error taxonomy (mapped onto the cross-library DOCA_ERROR_* set, with the note that there is NO AGAIN and NO NOT_FOUND on 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 against doca_log and doca-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 a Deferred task verbs block 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 in doca-programming-guide/SKILL.md, layered with the exporter-specific overrides in

    modify.

  • 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, where pkg-config --modversion doca-telemetry-exporter is the source of truth.

  • A samples/, bindings/, or reference/ 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

  1. Read this skill first to confirm the user's question is in scope.

  2. 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, no NOT_FOUND), observability, the safety policy, and the path-selection rule against doca_log / comch, see the capabilities companion.

  3. 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".

  • 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 is https://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 compatibility cross-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 canonical pkg-config + meson build pattern, the universal modify-a-shipped-sample first-app workflow, the universal lifecycle, the cross-library DOCA_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-order BAD_STATE, type/label INVALID_VALUE, opaque-path-not-enabled) overlays on top of that ladder.

Files

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.

PatternWhen it applies (class shape)Where the substance lives
1. Pick exporter, not the serviceThe 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 surfaceThe 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 reportTyped 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 lifecycleschema_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 capsThis 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 errorMap 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-exporter is 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 through doca-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_report does NOT block on a full transport and does NOT return DOCA_ERROR_AGAIN — there is no such return in this API. The NetFlow _netflow_send reports how many records it actually sent via its records_sent out-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.

SideWhat it doesWhat it does NOT doWhere 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 telemetryLinked 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 sinksPublish telemetry itselfA 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 / handleWhat it representsCreated / finalized byNotes
struct doca_telemetry_exporter_schemaThe root publisher configuration: which exporters are enabled (file / IPC / opaque), buffer size, and the set of registered event typesdoca_telemetry_exporter_schema_init(name, &schema); finalized by doca_telemetry_exporter_schema_start(schema); freed by doca_telemetry_exporter_schema_destroyConfigure 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_typeThe shape (field list) of ONE structured event recorddoca_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_fieldOne field of a type: name, description, type-name, array lengthdoca_telemetry_exporter_field_create, then _field_set_name / _field_set_description / _field_set_type_name / _field_set_array_lenField 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_sourceOne 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 surfaceHow to publishPreconditionStability
Typed structured eventsdoca_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 typeA type was added via _schema_add_type before schema_start; source startedDOCA_EXPERIMENTAL
Opaque eventsdoca_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_sizedoca_telemetry_exporter_schema_set_opaque_events_enabled(schema) BEFORE schema_startDOCA_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_msSource started; metrics context created after source_startDOCA_EXPERIMENTAL
OTLP logsCreate 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_flushdoca_telemetry_exporter_schema_set_opaque_events_enabled(schema) (OTLP logs ride the opaque path); source startedDOCA_EXPERIMENTAL
NetFlow / IPFIX recordsSibling 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_destroyNetFlow 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.

DestinationHow to enableWhere it goesDefault path / knob
File writedoca_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 DTSdoca_telemetry_exporter_schema_set_ipc_enabled(schema)Streams to the DOCA Telemetry Service over a local socketSocket 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_initExposes a /metrics scrape endpointEnv-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 collectorAddress/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 transport CONNECTED / 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-exporter as the build-time anchor. Per doca-version TASKS.md ## configure (doca-version/TASKS.md#configure), this MUST match the other version sources. Because there is no doca_caps data for this library, the four-way match's doca_caps --version leg 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_indexes are DOCA_EXPERIMENTAL. They require building with -DDOCA_ALLOW_EXPERIMENTAL_API (per doca-programming-guide/SKILL.md); they may change across releases. In DOCA 3.5, the doca_telemetry_exporter_source_report data parameter became const-qualified, and the doca_telemetry_exporter_schema_*_indexes family was added. Code written against earlier DOCA releases must const-qualify source report buffers and add schema index configuration via the doca_telemetry_exporter_schema_*_indexes family; the new schema index functions are available only when building against DOCA 3.5 or later. See the installed doca_telemetry_exporter.h for the exact signatures. The DOCA_STABLE surface 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 full schema_set_* / schema_get_* config family, and the entire NetFlow sibling API in doca_telemetry_exporter_netflow.h. Confirm the DOCA_STABLE / DOCA_EXPERIMENTAL marker in the installed header before relying on any symbol — the shipped samples still set -DDOCA_ALLOW_EXPERIMENTAL_API blanket-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.md for the service guide.

  • doca-telemetry-exporter.pc plus doca-common.pc must both match doca_caps --version at the version check (per doca-version CAPABILITIES.md ## Version compatibility (doca-version/CAPABILITIES.md#version-compatibility)). A common partial-install pattern after a DOCA upgrade is that doca-telemetry-exporter.pc lingers from the previous release while doca-common.pc was refreshed; route to doca-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.

ErrorExporter context where it shows upExporter-specific cause / fix
DOCA_ERROR_BAD_STATEdoca_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_VALUENULL 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 argumentRe-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 buildAllocation 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_startThe 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 reasonTreat 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:

  1. Per-call return. Every doca_telemetry_exporter_* call returns a doca_error_t; inspect it. For NetFlow, ALSO inspect the records_sent out-parameter of _netflow_send — records_sent < count is a partial send (backpressure at the collector / transport), which the NetFlow sample treats as a failure.

  2. IPC status. doca_telemetry_exporter_check_ipc_status returns DOCA_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.

  3. 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.

  4. 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-safety CAPABILITIES.md ## Safety policy (doca-hardware-safety/CAPABILITIES.md#safety-policy). Telemetry publishing does not change hardware or fabric state (no mlxconfig, 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:

PrerequisiteRequired stateHow the agent verifiesWhere to fix
File-write data root is writableIf _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_INITIALIZATIONPoint the data root at a writable directory via _schema_set_buf_data_root; do NOT reflexively add sudo
Receiver up BEFORE export startsIf 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 listeningdoca_telemetry_exporter_check_ipc_status returns CONNECTED (IPC); the receiver's own log/status for OTLP/NetFlowStart 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 useOpaque events and OTLP logs require _schema_set_opaque_events_enabled BEFORE schema_startThe first _source_opaque_report / _otlp_logs_* call does not return DOCA_ERROR_BAD_STATE for a missing contextEnable opaque events on the schema before schema_start; you cannot enable it after
Buffer is flushed before teardownBuffered reports are flushed when the buffer fills or on explicit flush; on shutdown the app must flush so trailing events are not lostThe receiver / data file contains the final events, not just the pre-last-flush onesCall _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_AGAIN to 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 the doca_ctx lifecycle to it.

  • Real-time event subscription back into the app — the exporter is publish-only / one-way. The right primitive is doca-comch/SKILL.md for a bi-directional message channel, not the exporter.

  • Plain structured logging to stdout / files — use doca_log (documented in doca-programming-guide/SKILL.md).

  • Cross-cutting DOCA_ERROR_* taxonomy — owned by doca-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 ## debug overlays 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.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download doca-telemetry-exporter.zip