To lower the load of the apm logging we would like to exclude our monitoring urls.
I've tried to make that happen with TransactionIgnoreUrls in de config but for some reason, I can't get it to work. According to the docs I should provide a list of string.
Below is the configuration I used (one of my attempts).
What I would like to do is exclude the ping endpoint for starters but eventually end up with all endpoints containing /status/ in the url
"ElasticApm__TransactionSampleRate": "1.0",
"ElasticApm__Enabled": "true",
"ElasticApm__Environment": "Development",
"ElasticApm__SecretToken": "some token",
"ElasticApm__ServerUrls": "serverurl",
"ElasticApm__VerifyServerCert": "FALSE",
"ElasticApm__ServiceName": "MyApi"
"ElasticApm__TransactionIgnoreUrls": [
"*pin*"
],
Startup.cs
app.UseAllElasticApm(Configuration);
The above does not filter out our endpoint (also tried with "ping", "/ping", "status", "/status" and lots of other possibilities) as it is still visible in the apm dashboard.
I'm probably doing something wrong, but I have no idea what it could be.
CodePudding user response:
- The configs should be a comma separated string. I just looked at the docs and indeed it's a bit confusing. So it must be
"UrlToIgnore1, UrlToIgnore2"(the agent will parse this internally) and not an array like["UrlToIgnore1", "UrlToIgnore2"]. So in your case it should be just"*pin*"and if you want to attach another value to ignore, just add it to the string after a comma (,). - Where do you put the configs you pasted here? This double underscore format is an environment variable which you set, right? If so, just put
"*pin*"toElasticApm__TransactionIgnoreUrls, In case you useappsettings.jsonhere is how it should look:
"ElasticApm": {
"TransactionIgnoreUrls": "*pin*"
}

