shuaijinchao edited a comment on issue #5474:
URL: https://github.com/apache/apisix/issues/5474#issuecomment-965962436


   Name
   ---- 
   plugin name is: `google-logging`
   
   Configuration
   ----
   
   ```json
   {
       "google_auth_config": {
           "private_key": "***"
           "client_email": "***"
           "project_id": "***"
           "token_uri": "***"
       },
       "google_auth_file": "/path/to/google-service-account.json",
       "resource": {
           "type": "global"
       },
       "log_id": "cloudresourcemanager.googleapis.com%2Factivity",
       "batch_max_size": 200,
       "batch_max_size": 10,
   }
   ```
   
   - `google_auth_config`              the google service account 
config(Semi-optional, one of `google_auth_config` or `google_auth_file` must be 
configured)
   - `google_auth_config.private_key`  the private key parameters of the Google 
service account
   - `google_auth_config.client_email` the client email parameters of the 
Google service account
   - `google_auth_config.project_id`    the project id parameters of the Google 
service account
   - `google_auth_config.token_uri`    the token uri parameters of the Google 
service account
   - `google_auth_file`                path to the google service account json 
file(Semi-optional, one of `google_auth_config` or `google_auth_file` must be 
configured)
   - `resource`                        the Google monitor resource, refer to: 
https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource
   - `log_id`                          google logging id, refer to: 
https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
   - `batch_max_size`                   batch queue max number of bearer entries
   - `batch_timeout`                   batch queue timeout of bearer entries
   
   
   Details
   ----
   
   1. Obtain and assemble request information in the APISIX Log phase
   2. To interact with google logging service for the first time, you need to 
request token information. After obtaining the token, it will be cached in the 
memory of the working node.
   3. After obtaining a valid token, put the request information into the batch 
processing queue. When the batch processing queue triggers the batch_max_size 
or batch_timeout threshold, the data in the queue is synchronized to the google 
cloud logging service
   4. Before each request is sent, check whether the token is about to time 
out, and refresh the token if it will time out.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to