-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using Rand() in DCR #221
Comments
I believe this is a bug on the LogAnalytics team.
…On Fri, 10 Nov 2023 at 11:07, Johannes Wikman ***@***.***> wrote:
I'm trying to create a Data Collection Rule with the samples from
samples/AppInsights/KQL/Queries/DataCollectionRules/FilterOnEvents.kql
<https://github.com/microsoft/BCTech/blob/742a877bf30340aadcdf50915badd462dcaf5ee2/samples/AppInsights/KQL/Queries/DataCollectionRules/FilterOnEvents.kql#L33>
When using this sample:
source
| where (
Properties.eventId == "RT0008" // incoming web service calls
and
rand(1) < 0.1 // adjust as needed
) or
Properties.eventId <> "RT0008"
I get this error when hitting the Run button:
Error occurred while compiling query in query: SemanticError:0x00000009 at 5:4 : Runtime scalar function provider not found for function: rand
If the issue persists, please open a support ticket. Request id: 12570843-1101-4eb1-aea3-4435ec21589d
Before opening a support ticket for this, has anyone actually been able to
use this sample?
Does it still work if you try it out today?
We are flooded with RT0004 events, and I wanted to use this approach of
sampling for that particular event. Right now, I'm forced to filter out all
RT0004 events until this has been resolved.
—
Reply to this email directly, view it on GitHub
<#221> or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXE6S7SKJRSLQS3XLYXZ6TYDX4FBBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJLJONZXKZNENZQW2ZNLORUHEZLBMRPXI6LQMWBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTLDTOVRGUZLDORPXI6LQMWSUS43TOVS2M5DPOBUWG44SQKSHI6LQMWVHEZLQN5ZWS5DPOJ42K5TBNR2WLKJRGU3TMOBZGMZTHAVEOR4XAZNFNFZXG5LFUV3GC3DVMWVDCOJYG4ZTCNJXGY3KO5DSNFTWOZLSUZRXEZLBORSQ>
.
You are receiving this email because you are subscribed to this thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
--
---------------------------------------------------
Kennie Nybo Pontoppidan
Email: ***@***.***
Twitter: @KennieNP
www and cv: http://pontop.dk
---------------------------------------------------
|
Ok, thanks for input. I've created a support ticket for LogAnalytics. (req no. 2311100050001695, if anyone needs that) |
Hi @KennieNP, I just received an answer from MS support regarding using
Did you successfully use the above sample in a DCR at some point in time? |
Thanks, Johannes.
Well, too bad that did not work. Sampling on the ingestion endpoint seemed
like a good idea.
…On Wed, 15 Nov 2023 at 17:15, Johannes Wikman ***@***.***> wrote:
Hi @KennieNP <https://github.com/KennieNP>,
I just received an answer from MS support regarding using rand in DCR,
where they say that the rand function is not supported for DCR:
I wanted to provide you with an update on this case, after checking
internally on your query that, the 'rand' scalar function is not on the
list of supported functions:
Since the transformation is applied to each record individually, it can't
use any KQL operators that act on multiple records. Only operators that
take a single row as input and return no more than one row are supported.
For example, summarize
<https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/summarizeoperator>
isn't supported since it summarizes multiple records. See Supported KQL
features
<https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/data-collection-transformations-structure#supported-kql-features>
for a complete list of supported features.
I kindly request you to refer the documentation guide for reference, which
explains an overview of the KQL limitations:
https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/data-collection-transformations-structure#kql-limitations
Did you successfully use the above sample in a DCR at some point in time?
—
Reply to this email directly, view it on GitHub
<#221 (comment)>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXE6S5HEWMULYCKD45Q7YLYETTAPBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLLDTOVRGUZLDORPXI6LQMWWES43TOVSUG33NNVSW45FGORXXA2LDOOJIFJDUPFYGLKTSMVYG643JORXXE6NFOZQWY5LFVEYTKNZWHA4TGMZTQKSHI6LQMWSWS43TOVS2K5TBNR2WLKRRHE4DOMZRGU3TMNVHORZGSZ3HMVZKMY3SMVQXIZI>
.
You are receiving this email because you were mentioned.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
--
---------------------------------------------------
Kennie Nybo Pontoppidan
Email: ***@***.***
Twitter: @KennieNP
www and cv: http://pontop.dk
---------------------------------------------------
|
Got the final word from the support request, they checked with the Product Manager and got back that "Rand function is not supported with the DCR" Any other clues on how to do sampling on selected EventIds? As is now, we need to skip some EventIds completely (RT0004 represented 50% of all our telemetry, and simply cost too much compared to what it gives) |
Maybe use a custom endpoint to do the filtering on RT0004?
…On Wed, 22 Nov 2023 at 17:52, Johannes Wikman ***@***.***> wrote:
Got the final word from the support request, they checked with the Product
Manager and got back that "*Rand function is not supported with the DCR*"
Any other clues on how to do sampling on selected EventIds?
As is now, we need to skip some EventIds completely (RT0004 represented
50% of all our telemetry, and simply cost too much compared to what it
gives)
—
Reply to this email directly, view it on GitHub
<#221 (comment)>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXE6SYZLKPUBXCHIAUVXQDYFYUWDBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLLDTOVRGUZLDORPXI6LQMWWES43TOVSUG33NNVSW45FGORXXA2LDOOJIFJDUPFYGLKTSMVYG643JORXXE6NFOZQWY5LFVEYTKNZWHA4TGMZTQKSHI6LQMWSWS43TOVS2K5TBNR2WLKRRHE4DOMZRGU3TMNVHORZGSZ3HMVZKMY3SMVQXIZI>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
--
---------------------------------------------------
Kennie Nybo Pontoppidan
Email: ***@***.***
Twitter: @KennieNP
www and cv: http://pontop.dk
---------------------------------------------------
|
I just created a suggestion in the Azure Monitor Community forum, please upvote if you think it makes sense! (and spread the word to others to upvote as well 😉) I cannot understand the arguments, that I got from the support case, on why rand() is not supported:
Wouldn't that end up with double ingestion costs for the events that we forward? First for the Azure Function (all data) and then for the rest when received at Log Analytics? |
I am facing the same issue. Upvoted it. Meanwhile used this trick for my DCR sampling and it worked well. (May be too late for you, but would be helpful for someone) |
Thanks @vpshibin, that was a very creative workaround. Thanks for sharing! 👍 |
This is what we use today as AppTraces transformation:
This cut our costs to 1/5 of earlier. We identified above events by first running this query to get the events that produces the most data (= highest cost):
We looked through top 30 of those events, kept all events for events that we felt crucial for troubleshooting (performance related, mainly, but also some other). This was accomplished by using the fraction of the second of the timestamp, as suggested by @vpshibin. |
I'm trying to create a Data Collection Rule with the samples from samples/AppInsights/KQL/Queries/DataCollectionRules/FilterOnEvents.kql
When using this sample:
I get this error when hitting the Run button:
Before opening a support ticket for this, has anyone actually been able to use this sample?
Does it still work if you try it out today?
We are flooded with RT0004 events, and I wanted to use this approach of sampling for that particular event. Right now, I'm forced to filter out all RT0004 events until this has been resolved.
The text was updated successfully, but these errors were encountered: