Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions components-rs/agent_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ use std::ffi::CString;
fn info_to_concentrator_config(info: &AgentInfoStruct) {
apply_concentrator_config(
info.peer_tags.as_deref().unwrap_or(&[]).to_owned(),
info.span_kinds_stats_computed.as_deref().unwrap_or(&[]).to_owned(),
info.filter_tags.as_ref().and_then(|f| f.require.as_deref()).unwrap_or(&[]).to_owned(),
info.filter_tags.as_ref().and_then(|f| f.reject.as_deref()).unwrap_or(&[]).to_owned(),
info.filter_tags_regex.as_ref().and_then(|f| f.require.as_deref()).unwrap_or(&[]).to_owned(),
info.filter_tags_regex.as_ref().and_then(|f| f.reject.as_deref()).unwrap_or(&[]).to_owned(),
info.ignore_resources.as_deref().unwrap_or(&[]).to_owned(),
info.span_kinds_stats_computed
.as_deref()
.unwrap_or(&[])
.to_owned(),
info.filter_tags.require.to_owned(),
info.filter_tags.reject.to_owned(),
info.filter_tags_regex.require.to_owned(),
info.filter_tags_regex.reject.to_owned(),
info.ignore_resources.to_owned(),
info.client_drop_p0s.unwrap_or(false),
info.version.as_deref(),
);
Expand Down
15 changes: 0 additions & 15 deletions components-rs/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -785,21 +785,6 @@ typedef const char *(*ddog_RootTagLookupFn)(const void *ctx,
uintptr_t key_len,
uintptr_t *out_len);

/**
* Per-entry callback passed to `RootMetaIterFn`. Return `false` to stop iteration early.
*/
typedef bool (*ddog_MetaEntryCb)(void *iter_ctx,
const char *key,
uintptr_t key_len,
const char *val,
uintptr_t val_len);

/**
* Slow-path meta iterator. `NULL` when no regex-key filter entries are present.
* Iterates all string meta entries, calling `cb` for each; stops when `cb` returns `false`.
*/
typedef void (*ddog_RootMetaIterFn)(const void *ctx, void *iter_ctx, ddog_MetaEntryCb cb);

/**
* A 128-bit (16 byte) buffer containing the UUID.
*
Expand Down
7 changes: 2 additions & 5 deletions components-rs/datadog.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,16 +407,13 @@ bool ddog_sidecar_telemetry_are_endpoints_collected(ddog_ShmCacheMap *cache,
* no stats). Filters are evaluated against the root span — the decision applies uniformly
* to all spans of the trace.
*
* * **Common case**: `filter_tags` and literal-key `filter_tags_regex` entries — one O(1)
* * **When configured**: `filter_tags` and `filter_tags_regex` entries — one
* `lookup_fn` call per filter entry.
* * **Rare case**: `filter_tags_regex` entries with regex key patterns — `iter_fn` is invoked
* to scan all meta entries for those filters. Pass `NULL` when not needed.
* * **Fast path**: returns `true` immediately when no filters are configured.
*/
bool ddog_check_stats_trace_filter(ddog_CharSlice resource,
const void *root_span,
ddog_RootTagLookupFn lookup_fn,
ddog_RootMetaIterFn iter_fn);
ddog_RootTagLookupFn lookup_fn);

void ddog_init_span_func(void (*free_func)(ddog_OwnedZendString),
void (*addref_func)(struct _zend_string*),
Expand Down
Loading
Loading