@Markus Schulte - Welcome to Microsoft Q&A and thanks for reaching out to us.
When you enable Application Insights for your Static Web App, it should automatically start collecting telemetry data for all types of requests, including requests for images (jpg, png), JavaScript files, and CSS files.
If you're not seeing telemetry data for these types of requests, then there might be an issue in app insights configuration.
To troubleshoot this issue, you can try the following steps:
- Check the sampling policy for your Application Insights instance to make sure that it's not filtering out telemetry data for certain types of requests.
- Check your Application Insights configuration to make sure that it's correctly configured to collect telemetry data for your Static Web App.
- If you're still not seeing telemetry data for certain types of requests, you can try adding a custom telemetry initializer to your app that sets the
ai.operation.name
property for each telemetry item based on the file extension of the request. This will allow you to filter and group telemetry data by file type in the Application Insights portal.
Hope this helps. and please feel free to reach out if you have any further questions.
Please don't forget to "Accept as Answer" and click "Yes" if the above answer is helpful, so it can be beneficial to the community.