dd-trace
    Preparing search index...

    Interface mongodb_core

    This plugin automatically instruments the mongodb-core module.

    interface mongodb_core {
        enabled?: boolean;
        heartbeatEnabled?: boolean;
        measured?: boolean | { [key: string]: boolean };
        obfuscateQuery?: "none" | "types" | "redact";
        queryInResourceName?: boolean;
        service?: any;
    }
    Index

    Properties

    enabled?: boolean

    Whether to enable the plugin.

    true
    
    heartbeatEnabled?: boolean

    Whether to enable mongo heartbeats spans.

    true
    
    measured?: boolean | { [key: string]: boolean }

    Whether to measure the span. Can also be set to a key-value pair with span names as keys and booleans as values for more granular control.

    obfuscateQuery?: "none" | "types" | "redact"

    How to mask primitive query values in the mongodb.query tag and the resource name (when queryInResourceName is also enabled). Keys, operator names, and array / pipeline shape are preserved so the masked query is still a usable query signature.

    • 'types': replace each primitive leaf with its typeof name ('string', 'number', 'boolean', 'bigint', 'object', 'null'). Keeps the same redaction guarantee as 'redact' but preserves the value types so the rendered query can still be used to design indexes.
    • 'redact': replace each primitive leaf with '?'. Strictest masking.
    • 'none': do not mask. Values land verbatim on the span.
    'none'
    
    queryInResourceName?: boolean

    Whether to include the query contents in the resource name.

    service?: any

    The service name to be used for this plugin.