Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Translation API Request - Detailed info

Hi all

¿Can we get the detailed information in monitoring, about all API requests? for instance users id which has make the request, volume (in MB) of the requests, grouped by user id. ¿Is it possible to get for Translation API?

Thanks in advance for your guidance

Solved Solved
0 2 725
1 ACCEPTED SOLUTION

The first thing I would suggest we look at is the audit logging from the Cloud Translation service that is documented here:

https://cloud.google.com/translate/docs/audit-logging

When Google cloud API services (such as translation) are executed, they can generate audit logs.  Some are enabled by default but others have to be explicitly turned on.  I would say that you are likely going to want to look at the "Data Access audit logs" which are off by default.  I'd suggest switching those on and running some of your tests and examine the resulting audit records found in Cloud Logging.  Let's see if those contain the records/data you are looking for.  Realize that switching on extra auditing records results in more consumption of Cloud Logging so make sure that you monitor your costs if you exceed the free allocation of Cloud Logging records.

View solution in original post

2 REPLIES 2

The first thing I would suggest we look at is the audit logging from the Cloud Translation service that is documented here:

https://cloud.google.com/translate/docs/audit-logging

When Google cloud API services (such as translation) are executed, they can generate audit logs.  Some are enabled by default but others have to be explicitly turned on.  I would say that you are likely going to want to look at the "Data Access audit logs" which are off by default.  I'd suggest switching those on and running some of your tests and examine the resulting audit records found in Cloud Logging.  Let's see if those contain the records/data you are looking for.  Realize that switching on extra auditing records results in more consumption of Cloud Logging so make sure that you monitor your costs if you exceed the free allocation of Cloud Logging records.

Hi Kolban,

I hope you can help me, since your latest post is related to somewhat I am looking for.

I am seeking

I have been using translation API for. long time now.  I would like to know if it is possible to access logs and be able to generate report based on API keys that are being used by the end users. 

I have been using  translator API  and have over 100 API keys (credentials) and each key is assigned to a specific language . I would like to be able to generate a report and find out the  amount of resources (char costs)  being used on each key,  to have a better handle on my  expanses.

Currently I can see snapshots by using the Api explorer but I need to get a report that shows the amount of resources that each key has been using, preferably with an option to analyze  and query historical use.

Can you help me ?  Cheers