Connectum API Reference / @connectum/otel / shared / applyAttributeFilter
Function: applyAttributeFilter() ​
applyAttributeFilter(
attrs,filter?,report?):Attributes
Defined in: shared.ts:435
Applies an attribute filter to the given attributes.
An attribute is kept only if the filter approves it, so a filter that throws for an attribute drops that attribute (the failure is reported, the call is not affected).
Parameters ​
attrs ​
Record<string, string | number>
Base attributes to filter
filter? ​
Optional filter function
report? ​
HookFailureReporter = reportForDirectCaller
Reporter for a throwing filter; the interceptors pass their own, a direct caller gets one report per process
Returns ​
Attributes
Filtered attributes