Code Monkey home page Code Monkey logo

Comments (4)

gardnerjr avatar gardnerjr commented on May 22, 2024

@shlomiassaf Can you give a specific example of what you need? I think i get what you mean but can you give me a concrete example?

Would you want to be able to use something like criteria parameters to be able to if/then/else and have the result be a time range? and/or a time range can be the result of a query? use some kind of language like math.js?

the odd thing here is that time ranges are sometimes arbitrary (like "last 15 minutes") that are evaluated as lazily as possible, and other times ae concrete specific start and endpoints. Because of that the oddities of doing proper math correctly with them gets real complicated real fast.

internally tracking as Product Backlog Item 12708864: Workbooks: be able to have time range parameters be "output" by criteria/query instead of manually selected

from application-insights-workbooks.

shlomiassaf avatar shlomiassaf commented on May 22, 2024

Hi @gardnerjr

Thanks for helping out!

We're using application insight to measure the performance of a distributed process.

Through correlation we can easily track the start/end period and store it via parameters and then in each query use the params to limit the time range of the queries

We still need a TimeRange parameter to limit the search for a running process of course.

It will be better if we can update the TimeRange directly and use it in all queries instead of importing the range in kusto code, for every query we have.

While it's annoying it not the problem, the problem is mainly when we want to use metrics.
Azure comes with a powerful metric system which stores metric metadata for all kinds of services.
The data is not available via queries (unless we register a diagnostic source) so we need to use metric graphs directly.
Here we face an issue, all metrics accept a TimeRange which we can't control so we end up with metrics that does not reflect the exact timerange in which the process ran.

It's a big limitation for us.

from application-insights-workbooks.

gardnerjr avatar gardnerjr commented on May 22, 2024

@shlomiassaf, Right but a specific example. how would you update the time range? shifting by a known amount and staying as a relative time? programmatically calculating start and end? you already have 2 numeric values and want to treat them as the start/end of a time range?

having a workbook of the form

1. [parameters step with a, b calculated from queries/something] ?
2. [something turns a+b into a time range parameter.  this step of the workbook would be a text step explaining what is missing] ?
3. [metrics step uses time range parameter] ?

having a concrete example to work from will guarantee that whatever solution we come up with will actually work for what you are doing instead of possibly working based on our interpretation of what we think you want.

from application-insights-workbooks.

shlomiassaf avatar shlomiassaf commented on May 22, 2024

Yep, got confused there, thanks for clarifying and for the extreme patience.

  1. Workbook has global time range picker parameter named TimeRange
  2. Somewhere in the workbook, a text parameter step named TimeRange runs a query which returns a single row
  3. The returned value from (2) should correspond with the time range object model:
requests
  | where timestamp >= {TimeRange}
  | // more business specific logic here...
  | project
     value = "> ago(4)"
  | project pack_all()

OR

requests
  | where timestamp >= {TimeRange}
  | // more business specific logic here...
  | project
     query = 'between(datetime("2021-11-30T20:55:00.000Z")..datetime("2021-12-01T20:55:00.000Z"))',
     grain = 1m
  | project pack_all()

- We can also update other values, i.e. start / end / seconds / startISO etc...
- We can also return a row, or a complete new parameter type... it's just a idea I came up with

4.  **TimeRange** is now updated, cascading updates follow

from application-insights-workbooks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.