Google Analytics makes available in json format a database of all metrics and dimensions: Google Analytics Metrics and Dimensions Metadata
Does Facebook make available such feature for Insight Metrics?
Related
We have an ASGI api (FastAPI), in this API we have a metrics Prometheus endpoint. How to export these metrics to Google Cloud Monitoring using OpenTelemetry. Not using a sidecar.
If you want to export your Open Telemetry metrics to Cloud Monitoring, Prometheus is useless, you can use directly Open Telemetry - CLoud Monitoring integration.
In python, you have an Open Telemetry exporter that allow you to do that. No side car.
Then, if you need to query your metrics with PromQL, you can use Managed Services for Prometheus that offer a compliant PromQL endpoint and based on Monarch (Google internal logging system)
OpenTelemetry doesn't really have a way to scrape a Prometheus endpoint that I'm aware of. I would recommend simply using the Prometheus/Cloud Monitoring integration if that's at all an option. Otherwise, you can instrument your application to write to Cloud Monitoring using OpenTelemetry.
I have been exploring to transfer the JsonPayload message field from Logs viewer service (which are syslogs of a service) of GCP to a slack network, but owing to this I am not able to find any predefined services (like alerting policies to transfer Payload) available on Stackdriver. I have been able to create a counter or distribution user-metrics for logs but this will only provide me with some int64 value instead of a string value or the actual message body. Is there a way in GCP to actually send a payload of logs over slack or any email?
We had a similar issue where we wanted to be able to send certain events to slack and for fatal issues trigger an issue with our ops team via VictorOps.
Couldn't find anything out there to fit our needs so we just created our own slack / VictorOps Cloudfunction.
https://github.com/patiently/gcloud-slack-logger
In GCP, you can export logs to Pub/Sub, Cloud Storage, or BigQuery. There is no other way within GCP to export logs at the moment.
As of 2022, I found this can be done as follows:
In GCP Logs viewer (not legacy version) choose the create alert button.. One of the options here is a GCP notification channel, which supports slack. Some points here:
The slack channel can't be private as far as I can tell
Slack channel must be in your correct slack space. If your org has multiple slack spaces, make sure GCP is trying to connect to correct one.
Put in the log query criteria you want. THen go into Monitoring and you will see this in Alerting dropdown.
I have access to my client's Amazon Publisher Services account. Now my client wants a tool that can fetch revenue reports from APS and store it into the database. But the problem is that I couldn't find any official doc regarding APS reporting API.
I have already tried https://ams.amazon.com/webpublisher/uam/docs/s3-reports.html but there are no request parameters it's just like an essay.
I turn out that google play store stores statistics related data in google cloud. It creates the required buckets and updates the file daily as it is required.
I am trying to download those file in google app script and update the Google sheet with data.
From google documentation, there are 2 ways to do so.
With Oauth
API KEY.
So far I was able to download file with Oauth but with API KEY I am getting the error
There is a per-IP or per-Referer restriction configured on your API
key and the request does not match these restrictions. Please use the
Google Developers Console to update your API key configuration if
request from this IP or referer should be allowed.
I have created the API KEy with no restrictions. Also enabled the Cloud Storage JSON api and Cloud storage API.
I did the same in the following way:
Get Oauth token:
public string GetOAuthToken()
{
return googleCredential.UnderlyingCredential.GetAccessTokenForRequestAsync("https://accounts.google.com/o/oauth2/v2/auth", CancellationToken.None).Result;
}
I am able to make a request.
Reference:
How to download files in Google Cloud Storage using rest api
https://stackoverflow.com/a/53955058/4345389
Thanks
I want to create a web page regrouping billing information from Google Cloud Platform and Amazon Web Services.
I'm looking how to retrieve billing data from GCP.
Does it exist an API to request these data ?
I have tested CloudBilling API but it seems that it just gives information about billing account and not detail on usage & cost.