Logic App for Budget and cost control !! It should send an alert if budget is abnormal and stop/delete resource if budget exceeds. Need a logic app f - logic

Need a logic app which does
If spending rate is abnormal it sends an alert
Spending crosses budget then stop resources
List item

Related

Measure performance of web application from mobile

Want to measure the performance of a web application for mobile devices (designed in Microsoft PowerApps) from my android and iOS devices. Basically, I am more interested towards the UI performance KPI's and response time from page to page.
Want to perform this from the devices not with simulator. Is there any open source platform which can be installed on the mobile devices to achieve this, any suggestion or any work around for this?
Couldn't find any similar post.
To measure key web vitals
There is a great library by Google to monitor web vitals. It lets you monitor in real time and you can even pipe the info to Google Analytics or your own server.
This monitors
Cumulative Layout Shift (CLS)
First Input Delay (FID)
Largest Contentful Paint (LCP)
First Contentful Paint (FCP)
Time to First Byte (TTFB)
To measure other metrics
As for other metrics they can (nearly) all be derived from window.performance.
This gives you all the information you need to calculate load times etc. (taken from this answer):
connectEnd Time when server connection is finished.
connectStart Time just before server connection begins.
domComplete Time just before document readiness completes.
domContentLoadedEventEnd Time after DOMContentLoaded event completes.
domContentLoadedEventStart Time just before DOMContentLoaded starts.
domInteractive Time just before readiness set to interactive.
domLoading Time just before readiness set to loading.
domainLookupEnd Time after domain name lookup.
domainLookupStart Time just before domain name lookup.
fetchStart Time when the resource starts being fetched.
loadEventEnd Time when the load event is complete.
loadEventStart Time just before the load event is fired.
navigationStart Time after the previous document begins unload.
redirectCount Number of redirects since the last non-redirect.
redirectEnd Time after last redirect response ends.
redirectStart Time of fetch that initiated a redirect.
requestStart Time just before a server request.
responseEnd Time after the end of a response or connection.
responseStart Time just before the start of a response.
timing Reference to a performance timing object.
navigation Reference to performance navigation object.
performance Reference to performance object for a window.
type Type of the last non-redirect navigation event.
unloadEventEnd Time after the previous document is unloaded.
unloadEventStart Time just before the unload event is fired.
The two difficult ones to calculate
The only thing you can't calculate with the above two items is Total Blocking Time (TBT) and Time To Interactive (TTI).
For that you would need to use PerformanceObserver and find all long tasks (greater than 50ms) between First Contentful Paint and Time To Interactive.
Time to Interactive is equally complicated and you would have to do some research on that (maybe start here) as it is quite hard to implement and I don't bother tracking it on live stats.
Or you could just adapt this polyfill for TTI

Square Point of Sale API - Error code "amount_too_small", but card is charged?

i'm making calls to the square pos ios web api with charges of $1.00 for system integration testing.
the calls are successful, in that they switch control to the square app, the card gets charged $1.00, transactions show up in the dashboard, i can refund them, etc. so obviously i'm sending the minimum amount suggested in the documentation to test the api (https://docs.connect.squareup.com/articles/web-api-ios) due to the lack of a point of sale api sandbox?
why does the response return a status of "error" with an error_code of "amount_too_small" when it was processed successfully?
Make sure you are using an amount of at least 100 to represent $1 (or 100 cents). You should only get this error if you try to charge an amount lower than 100.
My guess is that you are seeing transactions that you made previously, or you are getting replayed responses by reusing idempotency keys. If you are in fact getting an error in response while a transaction is being created, it seems like there is something wrong with our system. Could you record a video of what you are doing, or some detailed logs of requests & responses with headers?

GetStream update limit in free plan

Which are the limitations of free plan in getstream?
I have 8 members and 5 administrators following each others feed and I always get an email from GetStream alerting the rate limit when I make them follow.
Now I have an issue when updating activities. Perhaps I have reached my update limit, because sometimes when I try to create an activity, I get a ERROR TIMEDOUT.
We send out two rate limit messages: one for API calls, and one for feed updates. Our API call rate limit is about 2000 activities per minute, but feed updates are more like 50-100 per minute on the free plan. Setting up a follow relationship will trigger some feed updates as old activities get copied from other feeds to the new follower's feed.
When you do hit a rate limit, we don't stop your incoming traffic, but we de-prioritize slightly it so it takes a little longer to catch up. Our API v2 coming out soon will report rate limit information in API calls so you'll have more visibility into how close you are to hitting those limits before getting emails.
Regarding timeouts, which region is your app in (us-east, us-west, eu-central) and where are you located related to that area? We're going to be rolling out multi-region support later this year to minimize latencies there as well.

iBeacon: When to send beacon event to a server

Am working on iBeacon app where I monitor and range beacon however, when the app start ranging for a beacon in region I get endless list of beacon range status as long as the user in the beacon range.
My question is when to send the server the beacon proximity!
And if someone could explain the optimal way to queue and send list of beacons events to web server! it will be much appreciated.
The optimal way to send beacon proximity events to the server all depends on your business use case. Here are a few common options:
Send an event whenever a new beacon identifier is first detected, along with the proximity at that time.
Send an event periodically (say every 10 minutes) with a full list of beacons seen during that period along with their minimum/maximum proximities over that period.
Send an event whenever the proximity crosses a threshold (e.g. send an event only when a unique beacon identifier first becomes in near or immediate proximity).
Implementing the above on iOS often involves tracking the detections in a Dictionary, and then triggering the server call at the appropriate logical time from the didRangeBeacons:inRegion callback based on what has been tracked so far in this dictionary. Using logic to implement 1, 2 or 3 above will ensure that the number of server calls will be limited.

How Daily Active Devices in PubNub are counted

As a contrived example, if the twitter datastream example from:
https://www.pubnub.com/developers/realtime-data-streams/twitter-stream/
was implemented in a website.
Is each new visitor using that website counted in the daily active devices quota? PubNub's free tier gives only 100 daily active devices and the next upgrade to 1000 is $150.
Using the free tier, will I only be able to have 100 unique visits on a simple twitter stream before my quota runs out?
Or once a visitor closes the tab, I can give the next new visitor the same UUID, effectively reducing the quota to mean 100 visitors simultaneously.
Maybe since every visitor subscribes to the same channel, I can give each visitor the same UUID, making the limiting quota messages sent. What will happen if multiple user's are initialized with the same UUID?
Perhaps this isn't really a good use case for PubNub and this example should probably be implemented using a custom solution.
Does the same apply for a website implementing a TIC-TAC-TOE game, only 100 unique visitors a day? or only 50 games (100 players) simultaneously?
PubNub Daily Active Devices and Pricing
The DADs (daily active devices) are counted as each unique IP address that connects to PubNub, so yes, you would likely go over the Free tier limits very quickly, but we do have custom pricing plans for drive-by web traffic that makes it more fairly priced.
UUIDs are just that – unique ID per client (subscriber) and is used for our Presence service but also helps for identifying unique devices/users.
For details on custom pricing, you can contact PubNub Support - which you already have :)

Resources