title: Log Analytics KQL with Time Range does not work from App Insights using "workspace"
body: <p>I have a <code>Log Analytics</code> <code>KQL</code> as below for <code>Custom Table</code> with <code>Time Range</code>; it works fine in <code>Log Analytics</code>.</p>
  <p>You can notice the <strong>Time range = Set in query</strong> automatically.</p>
  <p><a href="https://i.stack.imgur.com/BIhdm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BIhdm.png" alt="Log Analytics KQL" /></a></p>
  <hr />
  <p>But when I run the same <code>KQL</code> from <code>App Insights</code> using <code>workspace</code>, it doesn't take <code>TimeGenerated</code> into to account and fetches data for <strong>Time range</strong> set in <code>App Insights</code> and returns wrong resultset!</p>
  <p>You can notice the <strong>Time range = Last 30 minutes</strong> in-spite I have given <code>TimeGenerated &gt; ago(365d)</code>!</p>
  <p><a href="https://i.stack.imgur.com/NcADK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NcADK.png" alt="App Insights" /></a></p>
  <blockquote>
  <p>I have noticed same issue with <code>App Insights</code> KQL running in <code>Log Analytics</code> using <code>app()</code> function!</p>
  </blockquote>
  <p>Not sure what is wrong or is it a restriction?</p>