Does GCP alerting have a time window option? - google-cloud-platform

I've got alerts for various things scheduled on my GCP services, however, I want to exclude time windows.
Is there actually a way to do so?
I've looked under both the metrics section, and under the trigger section, and have been unable to find anything. I haven't been able to find anything in the documentation either, but that could just be me not looking in the right locations.
Thank you!

tan,
The alignment period is a look-back interval from a particular point in time; the aligner is the function that combines the points into the look-back interval into an aligned value. Here is the Google documentation for alignment duration.

Related

Scheduling an amendable event via EventBridge for an exact timestamp in the future

I'm looking to implement a "black-out" feature where for a period of time a given feature is not accessible. After a period of time (i.e. 48 hours) the feature should be automatically reenabled.
I want to use AWS EventBridge as it plays nicely with the other architecture setup in place.
I'm looking into ways of creating a scheduled event for a given timestamp in the future, however can't find a feasible way of accomplishing this. One proposed solution was to create a separate rule for every such event that would point to a precise timestamp. This however will not work due to the hard limit of 300 rules within a single EventBridge which is not sufficiently scalable.
Another issue is that the duration needs to be amendable: a supposed 48hour timeframe may be shortened or extended.
What are the possible workarounds to achieve this functionality?

GCP Functions Node.js Huge Latency

We are running simple GCP Functions (pure, no Firebase, or any other layer added) that just handle HTTP requests using Node.js engine (previously version 8, now 10) and return some "simple JSON response". What we see is that sometimes (but not rarely) there is a huge latency when the request is "accepted by GCP" and before it gets to our function code. If I say huge I'm not speaking ms but units of seconds! And it is not a cold start (we have separate log messages on the global scope so we know when cold start occurs). Functions have currently 256 or 512 mb and run in close region.
We log at the very first line of the GCP function, for example:
or
Does anyone also experience that? And is that normal that sometimes this delay may take up to 5s (or rarely even more)?
By the way, sometimes the same thing happens on the output side as well. So if unlucky, it may take up to 10s. Thanks in advance for any reply, no matter if you have or have not similar experience.
All such problems I have seen have been related with cold start or it was not possible to prove that they are not related with code start.
This question could be even to broad to stackoverflow. We do not have any chance to reproduce it without example at least functions and number of the executions, however I will try to answer.
It seems that latency analyzes are done mainly on logs. I think you should try to use "Trace" functionality that is available in GCP (direct link and documentation). This should give you data to be able to track the issue.
Example i have used it on helloworld cloud function and was curl'ing it from bush script. It seems that over few hundreds of invocations there was one execution with latency 10 times greater than usually.
I hope it will help somehow :)!

Autocomplete Per-Character Usage

I had a few questions related to the changes to the Google Maps/Routes/Places that happened a couple weeks ago
My app calls places.PlacesService.GetAutocompletePredictions and, at the moment, in the Google Cloud Platform, I can see my "request" usage. However the billing switched to "per-character" and I could not find my usage by that metric. Any idea how to view it?
Is there a way to see my usage for the past few months?
How does this "per-character" thing work? Is it the number of characters of the prediction that I pick or the number of characters predicted at the end of my pre-filled phrase? Google doesn't seem to want to make their pricing particularly clear

Log-based user defined metrics seem to change one another in Stackdriver

I have a number of user-defined metrics in Google Stackdriver. Then I edit one of them using "Edit metric", edit the filter, and click Save.
When I look at a different user-defined metric via "Edit metric", my previous change seems to show up here too. Wtf?!?
Does anyone else have this problem? Am I doing something obviously wrong?
It's us, not you—this is a known issue with that piece of UI at the moment. We're working on getting it fixed and it should be addressed soon. Direct API access is unaffected and is a workaround for the immediate future.
By the way, if you use the feedback widget in the speech balloon in the top toolbar when you see issues like this, it captures a detailed report including things like browser version/platform/etc. that can help us track issues down. We don't need it in this case (this one is well in hand), but that may be a good course of action for the future.
Thanks for trying out Stackdriver, and for your patience with beta issues. =)

Scraping the data from Google Maps

The problem is to collect the map coordinates of some given locations and display on the site that i'm creating.I have heard that it is called Scraping.Can anyone tell me how to do this?
Google has really tight controls on what they let you get to -- there's an API, but there are limits on the order of 1,000 queries/day, depending on what information you need exactly. If you try to get around their API, they have incredibly clever algorithms that shut you out immediately -- attempting to scrape Google search results, I found that after a few minutes, they were able to immediately block me as soon as I hopped on new Tor endpoints.
The people at Google are extremely good software developers, and if they don't want you to have some info, you can't get it.