%3CLINGO-SUB%20id%3D%22lingo-sub-1641259%22%20slang%3D%22en-US%22%3ELog%20Analytics%20-%20Time%20picker%20enhancements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1641259%22%20slang%3D%22en-US%22%3E%3CP%3ELog%20Analytics%20time%20picker%20is%20an%20easy%20way%20to%20scope%20and%20control%20the%20query's%20time%20scope%20-%20directly%20from%20the%20UI%20without%20composing%20or%20altering%20your%20query%20code.%3C%2FP%3E%0A%3CP%3ETime%20picker%20is%20also%20a%20great%20way%20to%20narrow%20down%20queries%20and%20zoom%20into%20the%20specific%20time%20where%20issues%20occurred.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20Log%20Analytics%20team%20has%20improved%20the%20way%20our%20time%20picker%20works.%3CBR%20%2F%3EWe%20are%20happy%20to%20announce%20that%20that%20time%20picker%20now%20supports%20changing%20the%20query's%20time%20span%20-%20even%20if%20a%20time%20scope%20has%20been%20specified%20in%20the%20query!%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHow%20it%20works%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EIf%20your%20query%20doesn't%20contain%20a%20time%20scope%20-%20simply%20use%20the%20time%20picker%20to%20define%20the%20scope%20of%20time%20for%20your%20query.%3CBR%20%2F%3ENote%20that%20the%20default%20is%2024%20hours.%3C%2FP%3E%0A%3CP%3EIf%20your%20query%20specifies%20time%20-%20you%20can%20use%20the%20time%20picker%20to%20further%20narrow%20down%20the%20time%20scope%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Time%20picker%20%20full%20GIF.gif%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F216881i2223EC054F16A6D4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Time%20picker%20%20full%20GIF.gif%22%20alt%3D%22Time%20picker%20full%20GIF.gif%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CU%3ENote%3A%3C%2FU%3E%20time%20scope%20will%20work%20in%20tandem%20with%20the%20time%20defined%20in%20the%20query.%20For%20example%2C%20If%20you%20defined%20a%20time%20span%20of%2024%20hours%20in%20your%20query%20and%20then%20used%20the%20time%20picker%20to%20define%20a%202%20hour%20time%20span%20-%20your%20query%20result%20will%20show%20results%20from%20the%20last%202%20hours.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20always%20go%20back%20to%20the%20time%20set%20in%20query%20by%20selecting%20this%20option%20from%20the%20time%20picker%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Time%20picker%20open.png%22%20style%3D%22width%3A%20326px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F216882iA051E5D4A12AA71C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Time%20picker%20open.png%22%20alt%3D%22Time%20picker%20open.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EAdvanced%20options%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ELog%20Analytics%20allows%20the%20selection%20of%20a%20specific%20time%20span%2C%20using%20the%20time%20picker.%3C%2FP%3E%0A%3CP%3EYou%20can%20click%20the%20'custom'%20option%20in%20the%20time%20picker%20and%20specify%20your%20desired%20time%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Time%20picker%20advanced.png%22%20style%3D%22width%3A%20830px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F216883i1351A20EDB3CF1F0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Time%20picker%20advanced.png%22%20alt%3D%22Time%20picker%20advanced.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20functionality%20makes%20specifying%20exact%20periods%20of%20time%20a%20breeze.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ESummary%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ETime%20picker%20is%20a%20great%20and%20easy%20way%20to%20specify%20time%20ranges%20for%20queries%20in%20Log%20Analytics.%3C%2FP%3E%0A%3CP%3EUsing%20the%20time%20picker%20saves%20a%20lot%20of%20time%20when%20composing%20queries%20and%20the%20fact%20that%20the%20time%20is%20a%20dynamic%20part%20of%20the%20UI%20makes%20time%20based%20exploration%20a%20breeze.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EFeedback%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ELet%20us%20know%20what%20you%20think!%20please%20share%20your%20thoughts%20and%20comments%20about%20this%20enhancement%20in%20the%20comments%20section%20of%20this%20blog!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1641259%22%20slang%3D%22en-US%22%3E%3CP%3ELog%20Analytics%20UI%20time%20picker%20now%20allows%20users%20to%20change%20time%20scope%20even%20if%20time%20scope%20is%20defined%20in%20the%20query.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1641259%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EUpdates%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2138774%22%20slang%3D%22en-US%22%3ERe%3A%20Log%20Analytics%20-%20Time%20picker%20enhancements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2138774%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20new%20approach%20is%20troublesome%20when%20using%20functions%20in%20saved%20searches.%20When%20invoking%20a%20function%20from%20a%20query%2C%20time%20picker%20sets%20by%20default%20%22Set%20in%20query%22%20while%20there%20is%20no%20query-set%20time%20range%20in%20a%20parent%20query%20rather%20than%20within%20a%20function.%20It's%20confusing%20because%20I%20obviously%20cannot%20see%20what%20time%20range%20is%20set%20in%20external%20function%20so%20I%20have%20no%20idea%20what%20time%20range%20will%20be%20applied%20to%20my%20query.%20Moreover%2C%20when%20such%20query%20is%20run%20(with%20timepicker%20set%20to%20default%20value%20of%20%22Set%20in%20query%22)%2C%20only%20function%20is%20time-range%20limited%20(according%20to%20its%20definition)%20while%20the%20parent%20query%20which%20is%20calling%20the%20function%20seems%20not%20to%20be%20time-range%20limited%2C%20which%20technically%20means%20it%20searches%20the%20whole%20history.%20This%20makes%20the%20query%20run%20very%20slow%2C%20unnecessarily.%20It%20forces%20the%20user%20to%20be%20vigilant%20and%20intentionally%20set%20the%20time%20range%20with%20the%20timepicker%20or%20set%20it%20up%20in%20a%20query.%20Moreover%2C%20when%20the%20timerange%20is%20intentionally%20selected%20to%20avoid%20the%20aforementioned%20behavior%20and%20query%20is%20edited%20later%20on%2C%20it%20resets%20the%20timepicker%20to%20%22Set%20in%20query%22.%3C%2FP%3E%3CP%3EA%20desired%20behavior%20should%20be%20that%20when%20a%20function%20is%20used%2C%20the%20%3CU%3Edefault%3C%2FU%3E%20timerange%20of%2024h%20should%20still%20apply%20to%20parent%20query%20when%20no%20time%20range%20is%20selected%20with%20a%20timepicker%20or%20no%20time%20range%20is%20set%20within%20a%20query%3B%20I%20would%20also%20expect%20the%20function%20to%20rely%20on%20its%20internal%20time%20range%20when%20it's%20executed%20regardless%20of%20what%20timepicker%20in%20parent%20query%20says.%20Also%2C%20when%20a%20timepicker%20is%20used%20to%20set%20the%20time%20range%2C%20it%20must%20retain%20its%20setting%20even%20after%20editing%20the%20query.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

Log Analytics time picker is an easy way to scope and control the query's time scope - directly from the UI without composing or altering your query code.

Time picker is also a great way to narrow down queries and zoom into the specific time where issues occurred.

 

The Log Analytics team has improved the way our time picker works.
We are happy to announce that that time picker now supports changing the query's time span - even if a time scope has been specified in the query!

How it works:

If your query doesn't contain a time scope - simply use the time picker to define the scope of time for your query.
Note that the default is 24 hours.

If your query specifies time - you can use the time picker to further narrow down the time scope:

Time picker  full GIF.gif

 

Note: time scope will work in tandem with the time defined in the query. For example, If you defined a time span of 24 hours in your query and then used the time picker to define a 2 hour time span - your query result will show results from the last 2 hours.

 

You can always go back to the time set in query by selecting this option from the time picker:

Time picker open.png

Advanced options:

Log Analytics allows the selection of a specific time span, using the time picker.

You can click the 'custom' option in the time picker and specify your desired time:

Time picker advanced.png

 

This functionality makes specifying exact periods of time a breeze.

Summary:

Time picker is a great and easy way to specify time ranges for queries in Log Analytics.

Using the time picker saves a lot of time when composing queries and the fact that the time is a dynamic part of the UI makes time based exploration a breeze.

Feedback:

Let us know what you think! please share your thoughts and comments about this enhancement in the comments section of this blog!

4 Comments
Frequent Visitor

The new approach is troublesome when using functions in saved searches. When invoking a function from a query, time picker sets by default "Set in query" while there is no query-set time range in a parent query rather than within a function. It's confusing because I obviously cannot see what time range is set in external function so I have no idea what time range will be applied to my query. Moreover, when such query is run (with timepicker set to default value of "Set in query"), only function is time-range limited (according to its definition) while the parent query which is calling the function seems not to be time-range limited, which technically means it searches the whole history. This makes the query run very slow, unnecessarily. It forces the user to be vigilant and intentionally set the time range with the timepicker or set it up in a query. Moreover, when the timerange is intentionally selected to avoid the aforementioned behavior and query is edited later on, it resets the timepicker to "Set in query".

A desired behavior should be that when a function is used, the default timerange of 24h should still apply to parent query when no time range is selected with a timepicker or no time range is set within a query; I would also expect the function to rely on its internal time range when it's executed regardless of what timepicker in parent query says. Also, when a timepicker is used to set the time range, it must retain its setting even after editing the query.

Microsoft

Hi @KrzysztofRadomski  and thank you for your feedback.
In Log Analytics, the entire query (including functions used within) is effected by the time picker.
The functions used within a query don't run in a different 'container' or scope - but run with the same context.

This means that time filter in the function will have an effect on the time scope of the entire screen.

 

We appreciate you reporting the issue with the identification of the time scope and we are working to improve this.

Thanks you!

Frequent Visitor

Hi @RoyGal ,

 

Thank you for your reply. But it doesn't explain why the timepicker resets to "Set in query" timerange when external function is in use. It doesn't make sense and, if I'm not vigilant to always remember to set the timepicker to some arbitrary time span, the whole history will be searched as if there was no timerange at all. It did not work like this before last changes and it was better, as the timepicker setting were set to 24h by default and retained between edits.

 

I found just another curiosity after last timepicker-related changes. Let's assume following query:

Heartbeat
| summarize MinTime=min(TimeGenerated), MaxTime=max(TimeGenerated), TimeDifference=(max(TimeGenerated)-min(TimeGenerated))  by Computer

Looks good. But when you type it in, see what timepicker says:

KrzysztofRadomski_0-1613638685336.png

Where, for Odin's sake, does the editor see the query-set timerange? It's beyond me. When run, whole history is searched, returning the earliest heartbeat available.

 

Regards,

 

Krzysztof Radomski

Microsoft

@KrzysztofRadomski As mentioned before, thank you for reporting these bugs.
we are working on improving these annoyances.