Log Analytics - Functions upgraded

Published 04-17-2021 10:29 PM 1,482 Views
Microsoft

Intro

A function is a log query in Azure Monitor that can be used in other log queries as though it's a command. Functions allow developers to provide solutions to different customers and for you to reuse query logic in your own environment. 
We have upgraded the functions experience in Log Analytics, providing new UI and capabilities to allow you to do more with functions.

 

Log Analytics supports the following types of functions:

  • Solution function: Pre-built functions included with Azure Monitor. These are available in all Log Analytics workspaces and can't be modified.
  • Workspace functions: Functions installed in a particular Log Analytics workspace and can be modified and controlled by the user

 

The new Functions experience

 

Discover functions in the sidebar

Functions are now a part of Log Analytics sidebar. As any other Log Analytics sidebar, functions are searchable, filterable and you can group the functions tree according to the function's metadata:

Functions sidebar with group by.png

You may also set your own favorite functions per workspace for quicker access.

Functions have a popover with additional data, including parameters defined for the function:

Workspace function with popup.png

 

Use functions in your queries with intellisense

Functions are integrated with Log Analytics intellisense. Intellisense supports auto complete for functions and will also assist with the defined parameters per function:

Intellisense integration.png

 

Workspace functions

Workspace functions were upgraded and they now support parameters and default parameter values.

You can create and save your own workspace functions per Log Analytics workspace.
Compose your query with parameters and use the "save" ->"Save as function" to define your own workspace functions in LA.

Save function screen with details.pngNote: you must have sufficient workspace permissions to save a function.

 

Edit and mange your functions

Once a function is saved, you can still edit and mange it. Load the function's code to an empty Log Analytics tab to change the function's code or it's metadata.

 

Summary

Functions are a great way to do more with Log Analytics.
Use our solution functions or define your own functions to re-use logic and queries and shorten your way to insight.

Read our in depth functions documentation to learn more about functions in Log Analytics.

 

Feedback

We appreciate your feedback! comment on this blog post and let us know what you think of the this feature.

You may also use our in app feedback feature to provide us with additional feedbacks:

Log Analytics feedback.png

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2260434%22%20slang%3D%22en-US%22%3ELog%20Analytics%20-%20Functions%20upgraded%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2260434%22%20slang%3D%22en-US%22%3E%3CH2%20id%3D%22toc-hId--494788485%22%20id%3D%22toc-hId--494788485%22%3EIntro%3C%2FH2%3E%0A%3CP%3E%3CSPAN%3EA%20function%20is%20a%20log%20query%20in%20Azure%20Monitor%20that%20can%20be%20used%20in%20other%20log%20queries%20as%20though%20it's%20a%20command.%20Functions%20allow%20developers%20to%20provide%20solutions%20to%20different%20customers%20and%20for%20you%20to%20reuse%20query%20logic%20in%20your%20own%20environment.%26nbsp%3B%3CBR%20%2F%3EWe%20have%20upgraded%20the%20functions%20experience%26nbsp%3Bin%20Log%20Analytics%2C%20providing%20new%20UI%20and%20capabilities%26nbsp%3Bto%20allow%20you%20to%20do%20more%20with%20functions.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ELog%20Analytics%20supports%20the%20following%20types%20of%20functions%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3ESolution%20function%3A%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EPre-built%20functions%20included%20with%20Azure%20Monitor.%20These%20are%20available%20in%20all%20Log%20Analytics%20workspaces%20and%20can't%20be%20modified.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EWorkspace%20functions%3A%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EFunctions%20installed%20in%20a%20particular%20Log%20Analytics%20workspace%20and%20can%20be%20modified%20and%20controlled%20by%20the%20user%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1992724348%22%20id%3D%22toc-hId-1992724348%22%3EThe%20new%20Functions%20experience%3C%2FH2%3E%0A%3CH3%20id%3D%22toc-hId--1611681474%22%20id%3D%22toc-hId--1611681474%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-875831359%22%20id%3D%22toc-hId-875831359%22%3EDiscover%20functions%20in%20the%20sidebar%3C%2FH3%3E%0A%3CP%3EFunctions%20are%20now%20a%20part%20of%20Log%20Analytics%20sidebar.%20As%20any%20other%20Log%20Analytics%20sidebar%2C%20functions%20are%20searchable%2C%20filterable%20and%20you%20can%20group%20the%20functions%20tree%20according%20to%20the%20function's%20metadata%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Functions%20sidebar%20with%20group%20by.png%22%20style%3D%22width%3A%20298px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F270940iAD4BEB7E14E48A69%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Functions%20sidebar%20with%20group%20by.png%22%20alt%3D%22Functions%20sidebar%20with%20group%20by.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EYou%20may%20also%20set%20your%20own%20favorite%20functions%20per%20workspace%20for%20quicker%20access.%3C%2FP%3E%0A%3CP%3EFunctions%20have%20a%20popover%20with%20additional%20data%2C%20including%20parameters%20defined%20for%20the%20function%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22Workspace%20function%20with%20popup.png%22%20style%3D%22width%3A%20792px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F270941iDEE51BAE3181DEA7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Workspace%20function%20with%20popup.png%22%20alt%3D%22Workspace%20function%20with%20popup.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--931623104%22%20id%3D%22toc-hId--931623104%22%3EUse%20functions%20in%20your%20queries%20with%20intellisense%3C%2FH3%3E%0A%3CP%3EFunctions%20are%20integrated%20with%20Log%20Analytics%20intellisense.%20Intellisense%20supports%20auto%20complete%20for%20functions%20and%20will%20also%20assist%20with%20the%20defined%20parameters%20per%20function%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22Intellisense%20integration.png%22%20style%3D%22width%3A%20546px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F270942i24B401214EE8385F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Intellisense%20integration.png%22%20alt%3D%22Intellisense%20integration.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--942126208%22%20id%3D%22toc-hId--942126208%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId-1545386625%22%20id%3D%22toc-hId-1545386625%22%3EWorkspace%20functions%3C%2FH2%3E%0A%3CP%3EWorkspace%20functions%20were%20upgraded%20and%20they%20now%20support%20parameters%20and%20default%20parameter%20values.%3C%2FP%3E%0A%3CP%3EYou%20can%20create%20and%20save%20your%20own%20workspace%20functions%20per%20Log%20Analytics%20workspace.%3CBR%20%2F%3ECompose%20your%20query%20with%20parameters%20and%20use%20the%20%22save%22%20-%26gt%3B%22Save%20as%20function%22%20to%20define%20your%20own%20workspace%20functions%20in%20LA.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22Save%20function%20screen%20with%20details.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F270944i01AD6105ECA56505%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Save%20function%20screen%20with%20details.png%22%20alt%3D%22Save%20function%20screen%20with%20details.png%22%20%2F%3E%3C%2FSPAN%3E%3CSTRONG%20style%3D%22font-family%3A%20inherit%3B%22%3ENote%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%3A%20you%20must%20have%20sufficient%20workspace%20permissions%20to%20save%20a%20function.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--2059019197%22%20id%3D%22toc-hId--2059019197%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-428493636%22%20id%3D%22toc-hId-428493636%22%3EEdit%20and%20mange%20your%20functions%3C%2FH3%3E%0A%3CP%3EOnce%20a%20function%20is%20saved%2C%20you%20can%20still%20edit%20and%20mange%20it.%20Load%20the%20function's%20code%20to%20an%20empty%20Log%20Analytics%20tab%20to%20change%20the%20function's%20code%20or%20it's%20metadata.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-417990532%22%20id%3D%22toc-hId-417990532%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId-284305808%22%20id%3D%22toc-hId-284305808%22%3ESummary%3C%2FH2%3E%0A%3CP%3EFunctions%20are%20a%20great%20way%20to%20do%20more%20with%20Log%20Analytics.%3CBR%20%2F%3EUse%20our%20solution%20functions%20or%20define%20your%20own%20functions%20to%20re-use%20logic%20and%20queries%20and%20shorten%20your%20way%20to%20insight.%3C%2FP%3E%0A%3CP%3ERead%20our%20in%20depth%20%3CA%20title%3D%22functions%20documentation%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Flogs%2Ffunctions%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Efunctions%20documentation%3C%2FA%3E%20to%20learn%20more%20about%20functions%20in%20Log%20Analytics.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1523148655%22%20id%3D%22toc-hId--1523148655%22%3EFeedback%3C%2FH2%3E%0A%3CP%3EWe%20appreciate%20your%20feedback!%20comment%20on%20this%20blog%20post%20and%20let%20us%20know%20what%20you%20think%20of%20the%20this%20feature.%3C%2FP%3E%0A%3CP%3EYou%20may%20also%20use%20our%20in%20app%20feedback%20feature%20to%20provide%20us%20with%20additional%20feedbacks%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22Log%20Analytics%20feedback.png%22%20style%3D%22width%3A%2095px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F270939iD4D598BC85738BDB%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Log%20Analytics%20feedback.png%22%20alt%3D%22Log%20Analytics%20feedback.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2260434%22%20slang%3D%22en-US%22%3E%3CP%3ELog%20Analytics%20upgraded%20functions.%3C%2FP%3E%0A%3CP%3ELog%20Analytics%20functions%20now%20have%20a%20brand%20new%20experience%2C%20allowing%20for%20easier%2C%20more%20intuitive%20discovery%20and%20use%20of%20Functions.%3C%2FP%3E%0A%3CP%3EWorkspace%20functions%20now%20support%20parameters%2C%20allowing%20the%20creation%20of%20parameterized%20functions%20by%20any%20user%20who%20has%20sufficient%20permissions.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22Functions%20sidebar%20and%20popup.png%22%20style%3D%22width%3A%20833px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F270938iB660CD9C1C344D28%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Functions%20sidebar%20and%20popup.png%22%20alt%3D%22Functions%20sidebar%20and%20popup.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2260434%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EUpdates%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Apr 21 2021 07:25 AM
Updated by: