messageFilter

A filter for messages to be sent to the tracing message processors.

This function is called for each trace event before it's sent to the message processors. If the function returns true, the event is processed; if it returns false, the event is ignored.

By default, all messages are processed (the filter returns true for all messages).

Example:

// Only trace LLM-related events
messageFilter = { message ->
message is LLMCallStartEvent ||
message is LLMCallEndEvent ||
message is LLMCallWithToolsStartEvent ||
message is LLMCallWithToolsEndEvent
}