You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upstream added a COCOINDEX_APPLICATION_FOR_TRACKING environment variable that, when set to a non-empty value, includes an application field in every telemetry event payload. This lets applications self-identify in aggregate telemetry without changing the default behavior (field is skip_serializing_if = "Option::is_none"). The value is read once at telemetry::init() and stored on TelemetryContext.
Adaptation: Rename the env var to RECOCO_APPLICATION_FOR_TRACKING to match recoco's naming conventions instead of COCOINDEX_APPLICATION_FOR_TRACKING
API: Read once at telemetry::init(), store as Option<String> on the context struct, serialize with skip_serializing_if = "Option::is_none"
No Python code to exclude; no feature-gating required
Integration Notes
Isolated, low-risk change (~15–20 lines). Adapt by renaming the env var constant to use the RECOCO_ prefix. The upstream test send_event_includes_application_when_set can be ported directly with the renamed constant. Also add a test for the absent-by-default behavior.
Upstream Change Summary
Type: new-feature
Difficulty: Easy
Recommendation: Adapt
Upstream added a
COCOINDEX_APPLICATION_FOR_TRACKINGenvironment variable that, when set to a non-empty value, includes anapplicationfield in every telemetry event payload. This lets applications self-identify in aggregate telemetry without changing the default behavior (field isskip_serializing_if = "Option::is_none"). The value is read once attelemetry::init()and stored onTelemetryContext.Upstream References
applicationlabel via env var cocoindex-io/cocoindex#1992Relevant Upstream Files / Areas
rust/cocoindex/src/telemetry.rs— addsapplication: Option<String>toTelemetryContext, reads env var atinit(), serializes withskip_serializing_ifRecoco Considerations
crates/recoco-core/src/telemetry.rs(or equivalent telemetry module)RECOCO_APPLICATION_FOR_TRACKINGto match recoco's naming conventions instead ofCOCOINDEX_APPLICATION_FOR_TRACKINGtelemetry::init(), store asOption<String>on the context struct, serialize withskip_serializing_if = "Option::is_none"Integration Notes
Isolated, low-risk change (~15–20 lines). Adapt by renaming the env var constant to use the
RECOCO_prefix. The upstream testsend_event_includes_application_when_setcan be ported directly with the renamed constant. Also add a test for the absent-by-default behavior.