OpenTelemetry SDK
    Preparing search index...

    Singleton object which represents the entry point to the OpenTelemetry internal diagnostic API

    1.0.0

    interface DiagAPI {
        createComponentLogger: (
            options: @opentelemetry/api.ComponentLoggerOptions,
        ) => @opentelemetry/api.DiagLogger;
        debug: @opentelemetry/api.DiagLogFunction;
        disable: () => void;
        error: @opentelemetry/api.DiagLogFunction;
        info: @opentelemetry/api.DiagLogFunction;
        setLogger: {
            (
                logger: @opentelemetry/api.DiagLogger,
                options?: @opentelemetry/api.DiagLoggerOptions,
            ): boolean;
            (
                logger: @opentelemetry/api.DiagLogger,
                logLevel?: @opentelemetry/api.DiagLogLevel,
            ): boolean;
        };
        verbose: @opentelemetry/api.DiagLogFunction;
        warn: @opentelemetry/api.DiagLogFunction;
    }

    Implements

    Index

    Properties

    createComponentLogger: (
        options: @opentelemetry/api.ComponentLoggerOptions,
    ) => @opentelemetry/api.DiagLogger

    Log a general debug message that can be useful for identifying a failure. Information logged at this level may include diagnostic details that would help identify a failure scenario. For example: Logging the order of execution of async operations.

    disable: () => void

    Unregister the global logger and return to Noop

    Log an error scenario that was not expected and caused the requested operation to fail.

    Log a general informational message, this should not affect functionality. This is also the default logging level so this should NOT be used for logging debugging level information.

    setLogger: {
        (
            logger: @opentelemetry/api.DiagLogger,
            options?: @opentelemetry/api.DiagLoggerOptions,
        ): boolean;
        (
            logger: @opentelemetry/api.DiagLogger,
            logLevel?: @opentelemetry/api.DiagLogLevel,
        ): boolean;
    }

    Set the global DiagLogger and DiagLogLevel. If a global diag logger is already set, this will override it.

    Type Declaration

    The DiagLogger instance to set as the default logger.

    A DiagLoggerOptions object. If not provided, default values will be set.

    true if the logger was successfully registered, else false

    Log a detailed (verbose) trace level logging that can be used to identify failures where debug level logging would be insufficient, this level of tracing can include input and output parameters and as such may include PII information passing through the API. As such it is recommended that this level of tracing should not be enabled in a production environment.

    Log a warning scenario to inform the developer of an issues that should be investigated. The requested operation may or may not have succeeded or completed.