OptionalattribHandles attribute-related errors, such as invalid attribute values or keys. Called when an attribute operation fails validation or processing.
Descriptive error message explaining what went wrong
The attribute key that caused the error
The attribute value that caused the error (may be of any type)
OptionaldebugHandles debug-level diagnostic messages. Used for detailed troubleshooting information that is typically only relevant during development or when diagnosing issues.
Debug message to be handled
OptionalerrorHandles general error conditions that may affect functionality. Used for significant errors that should be investigated but may not be fatal.
Error message to be handled
OptionalnotHandles errors related to unimplemented functionality. Called when a method or feature is not yet implemented or is intentionally disabled in the current configuration.
Message describing the unimplemented functionality
OptionalspanHandles span-related errors that occur during span operations. Called when a span operation fails or encounters an unexpected condition.
Descriptive error message explaining the span error
The name of the span that encountered the error
OptionalwarnHandles warning-level messages for non-fatal issues. Used for conditions that are unusual but don't prevent continued operation.
Warning message to be handled
Configuration interface for OpenTelemetry error handling callbacks. Provides hooks to customize how different types of errors and diagnostic messages are handled within the OpenTelemetry system.
Example
Remarks
If handlers are not provided, default behavior will be used:
attribError: Throws anOTelInvalidAttributeErrorspanError: Logs to console or calls warn handlerdebug: Logs to console.logwarn: Logs to console.warnerror: Logs to console.errornotImplemented: Logs to console.errorSince
3.4.0