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 { "inactive_timeout":10, "max_retry_count":0, "buffer_duration":60, "resource":{ "type":"global" }, "log_id":"syslog", "auth_config":{ "private_key":"-----BEGIN RSA PRIVATE KEY-----KEY-----END RSA PRIVATE KEY-----", "token_uri":"http://127.0.0.1:1980/google/logging/token", "scopes":[ "https://apisix.apache.org/logs:admin" ], "entries_uri":"http://127.0.0.1:1980/google/logging/entries", "project_id":"apisix" }, "retry_delay":1, "batch_max_size":1 } ``` - `auth_config` the google service account config(Semi-optional, one of `auth_config` or `auth_file` must be configured) - `auth_config.private_key` the private key parameters of the Google service account - `auth_config.project_id` the project id parameters of the Google service account - `auth_config.token_uri` the token uri parameters of the Google service account - `auth_config.scopes` the access scopes parameters of the Google service account, refer to: https://developers.google.com/identity/protocols/oauth2/scopes#logging - `auth_config.entries_uri` google logging service API - `auth_file` path to the google service account json file(Semi-optional, one of `auth_config` or `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 - `max_retry_count` max number of retries before removing from the processing pipe line - `retry_delay` number of seconds the process execution should be delayed if the execution fails - `buffer_duration` max age in seconds of the oldest entry in a batch before the batch must be processed - `inactive_timeout` max age in seconds when the buffer will be flushed if inactive - `batch_max_size` max size of each batch 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