Global custom functions for queries

Occasional Visitor

I am creating multiple alerts on multiple Log Analytics workspaces. Due to similarity of data sources, I have created a couple of helper functions to make queries easier to read and maintain. As I need to use the same functions in almost every workspace, it would seem logical to create them in one place and reuse. However I cannot find a way to do it.

Global functions list seems to be pre-defined and there's no way to add custom functions to that list.

Calling function from other workspace also seems to be impossible - workspace('myworkspace').myFunction() doesn't work.

Is there a way to make this work?

0 Replies