Expand description
Per-endpoint product-analytics emission helper.
Mirrors the send_telemetry("… API Endpoint Invoked", user.id, {…})
calls in the Python FastAPI routers
(cognee/api/v1/*/routers/get_*_router.py). Each /api/v1/* handler
calls emit near its top so the wire payload matches Python.
The whole surface is gated by the telemetry cargo feature: with it
off (e.g. a --no-default-features build), emit compiles to a
noop and cognee-telemetry is not even a dependency. Callers pass a
fully-built serde_json::Value::Object of additional_properties
and never need a #[cfg(...)] of their own.
cognee_version is intentionally omitted from the per-endpoint
properties: the base send_telemetry payload already carries it at
properties.cognee_version, so the on-the-wire field is present
exactly once and matches Python (which spreads it into
additional_properties).
Functions§
- emit
- Emit a
"… API Endpoint Invoked"analytics event foruser_idwith the givenadditional_propertiesobject.