PageSpeed Insights with Service Worker - pagespeed-insights

Our CMS is using an image service CDN that requires a few parameters added to the URL of an image to serve optimized formats(webp, avif...) when supported.
The parameters cannot be added directly on the CMS, so we are using a service worker to add them when we detect a supported image format.
The problem is that PageSpeed Insight test keeps saying that the images are not "next-gen" format and the URL is missing the parameters.
Is there any way to force the test to reload with the service worker installed? Is google using service workers in general to calculate performance stats?
Thanks!

Related

How to drop front door health probes from application insights

We are using azure app service codeless implementation of application insights: https://learn.microsoft.com/en-us/azure/azure-monitor/app/azure-web-apps?tabs=net#enable-agent-based-monitoring
We are also using front door, therefore all the health prob HEAD requests are ending up in application insights creating a lot of noise and extra cost.
I understand if you are using the application insights SDK and have an applicationinsights.config file you can filter these requests out.
But is there a way of doing this using the agent based monitoring, the doc hints that applicationinsights.config settings can be set as application settings in the app service, but does anyone have an example of how to do filtering this way?
Currently, Telemetry processors (preview) feature for filtering out unwanted telemetry data is available only for codeless application monitoring for Java apps via the standalone Java 3.x agent (examples here).
For other environments/languages and advanced configurations, manual instrumentation with the SDK might still be the way to go. Although it would require some management effort, this approach is much more customizable and would give you greater control over the telemetry you want to ingest.
Regardless of the approach, to reduce the volume of telemetry without affecting your statistics, you can try configuring Sampling, either via Application settings or the SDK.
From a Front Door configuration perspective, you could increase the Interval between health checks to reduce the frequency of requests. Or, if you have a single backend in your backend pool, you can choose to disable the health probes. Even if you have multiple backends in the backend pool but only one of them is in enabled state, you can disable health probes. This should help in reducing the load on your application backend, and also the telemetry traffic.

Monitor when Azure Web App is unloaded?

What would be the best way to monitor when our Azure web app is being unloaded when no requests have been made to the web app for a certain amount of time?
Enabling Logstream for the web server doesn't seem to reveal anything of use..
Any hints much appreciated!
You can use Azure Application Insights to create a web test that will alert you when the site is not available anymore. It will ping your site from the data centers you select and perform some action you select (mail, webhook, etc).
However, if you want your web app to stay online, you could upgrade its plan to be at least basic, and under settings enable always on.
In addition to the kim’s response:
If you are running your web app in the Standard pricing tier, Web Apps lets you monitor two endpoints from three geographic locations.
Endpoint monitoring configures web tests from geo-distributed locations that test response time and uptime of web URLs. The test performs an HTTP GET operation on the web URL to determine the response time and uptime from each location. Each configured location runs a test every five minutes.
Uptime is monitored using HTTP response codes, and response time is measured in milliseconds. A monitoring test fails if the HTTP response code is greater than or equal to 400 or if the response takes more than 30 seconds. An endpoint is considered available if its monitoring tests succeed from all the specified locations.
Web Apps also provides you with the ability to troubleshoot issues related to your web app by looking at HTTP logs, event logs, process dumps, and more. You can access all this information using our Support portal at http://.scm.azurewebsites.net/Support
The Azure App Service support portal provides you with three separate tabs to support the three steps of a common troubleshooting scenario:
-Observe current behavior
-Analyze by collecting diagnostics information and running the built-in analyzers
-Mitigate
If the issue is happening right now, click Analyze > Diagnostics > Diagnose Now to create a diagnostic session for you, which collects HTTP logs, event viewer logs, memory dumps, PHP error logs, and PHP process report.
Once the data is collected, the support portal runs an analysis on the data and provides you with an HTML report.
In case you want to download the data, by default, it would be stored in the D:\home\data\DaaS folder.
Hope this helps.

Azure Batch - Create Nodes from VM Image

I have some Selenium test code that I need to run in parallel. In order for Selenium to run effectively, certain configurations have to be done on the machine (I.E. zone settings, Chrome and Firefox installs, etc.) and these settings are hard (if not impossible) to apply via an automated approach. I've manually created a VM, done all the setup and created an image following the directions in Microsoft's documentation.
Now I need to setup my code so that I can specify a VM image to use when creating the nodes. I've searched as much as I can and not found any documentation that explains how I can go about doing this. The example in the DotNetTutorial sample doesn't seem to have any way to specify an image.
There is a feedback item here on this same topic and shows the request as started on Jun 1st 2015. I'm hoping this means that it's done now and that it just hasn't been documented well.
Q: How I can specify a custom VM image as the source for my Azure Batch nodes?
https://github.com/Azure/azure-sdk-for-net/blob/AutoRest/src/Batch/Client/changelog.md
• Added support for deploying nodes using custom VHDs, via the OSDisk property of VirtualMachineConfiguration. Note that the Batch account being used must have been created with PoolAllocationMode = UserSubscription to allow this.
Updated Answer on 2017-12-05:
Custom images are now supported through normal Batch accounts (i.e., Batch service pool allocation mode accounts). You will need to specify a valid ARM Image Id and use Azure Active Directory authentication to create custom images (shared key auth does not support custom images).
Updated Answer on 2017-03-17:
Custom images are now supported through "User Subscription" Batch accounts. You can create these types of accounts in Azure Portal or through the newest management SDKs for supported languages.
Previous Answer:
Currently, custom VM images are not supported. As you noted, this is a feature that is being worked on. In addition to uservoice, you can periodically check for product updates at this site.

azure mobile service - Hosting Images

I've been using the Azure Mobile Service for the last 4 months and I'm very happy with the results.I can create and maintain a backend service with no issues.
The only thing I did not find how to implement is Image Manipulation and Hosting.
My iOS app needs to upload files to the server and the server will resize/crop the images to generate some thumbnails.
Right now Im hosting the images in Amazon s3 and the resizing is done in the client. The problem with is that I need to upload 2 images instead of just one.
What are the options to solve my situation using only the Azure Mobile Services?
For storing images, you could possibly use Azure Blob Storage instead of Amazon S3. One benefit you would get out of it is lower latency between your mobile service and storage.
Coming to your 2nd question, you would need some kind of server side processing to work with the images once they're received at the mobile service end. I've not worked extensively with node.js, but a quick search led me to this thread on SO: Which library should I use for server-side image manipulation on Node.JS?. You could possibly use one of the libraries mentioned there to process the image in mobile service itself and then push both images into storage.

Azure Reporting - Report Viewer running in multiple instances does not show all images

I am using a asp.net webrole project with a report viewer in Azure Reporting.
At the beginning I faced some problems with 'ASP.NET session has expired' which I solved setting AsyncRendering to false and setting
sessionState timeout ="120" mode="InProc" cookieless="true" in web.config.
However when I deploy the project runnign in a single instance everything is working fine.
But when I deploy the project in mulitiple (two) instances some images (graphs, gauges etc.) are not loaded. However if i right click on the missing image I am able to load the image via context menu.
Any ideas ? seems to be some timimg problem for me.
This is because you are using InProc session state. You can't control the load balancer, so it's possible that you're loading the page from one instance, but the images from an other instance. This means that your session will be different on both instances.
When working with more than one instance you shouldn't store your session InProc, but choose a distirbuted storage (like table storage, SQL Azure or AppFabric Cache). This will allow all of your instances to use the same session data.
Example: Session State Provider for Windows Azure Caching

Resources