I’m having trouble getting any of my API requests getting any performance data. When a request hits the server (.NET 5.0 on linux docker) the server logs the message:
warn: Sentry.ISentryClient[0]
Ignoring request with Size (null) and configuration RequestSize Always
Sentry.ISentryClient: Warning: Ignoring request with Size (null) and configuration RequestSize Always
I feel like I went through all the docs but I must be missing something. All my other reporting for errors is functioning so I know I have some of the config is correct. I did add SentryTracing the line right after routing.
Does anyone have any advice?
You have to add the middleware which sounds like you already did. That part is covered on this page: Automatic Instrumentation for ASP.NET Core | Sentry Documentation
The first note on that page also links to the general ‘adding performance’ docs which talks about ‘sample rate’. Maybe missing this?Set Up Performance for ASP.NET Core | Sentry Documentation
warn: Sentry.ISentryClient[0]
Ignoring request with Size (null) and configuration RequestSize Always
Sentry.ISentryClient: Warning: Ignoring request with Size (null) and configuration RequestSize Always
This is just that you’ve opted in to “include request body” but that request doesn’t have any. Might be a bit spammy (like logging a warn for a GET request) so we could improve if that’s the case. Also we accept PRs.
I do have the sample rate set with my DSN in my appsettings.json. Which gave me the idea to try it in the web builder options instead of the appsettings.json
That resolved issue.
Glad it’s resolved. Just to clarify, you just took the tracing sample rate from appsettings.json and added to the options object programatically and that solved it? Reading from the settings into the option is done by the framework configuration system so wondering if there’s an issue there
Yes, that’s what I did. I’ve looked at it a bunch of times, but it looks like I may have a trailing space at the end property in the appsettings.json. I didn’t see it until now trying to copy the property to this reply. I imagine that’s probably what the root of the problem is. I figured I was making a stupid mistake somewhere, I just couldn’t find it.