SylviaBABY commented on a change in pull request #817:
URL: https://github.com/apache/apisix-website/pull/817#discussion_r773647315



##########
File path: website/blog/2021/12/22/google-logging.md
##########
@@ -0,0 +1,208 @@
+---
+title: Apache APISIX Integrates with Google Cloud Logging to Improve Log 
Processing
+authors:
+  - name: "Jinchao Shuai"
+    title: "Author"
+    url: "https://github.com/shuaijinchao";
+    image_url: "https://avatars.githubusercontent.com/u/8529452?v=4";
+  - name: "Yilin Zeng"
+    title: "Technical Writer"
+    url: "https://github.com/yzeng25";
+    image_url: "https://avatars.githubusercontent.com/u/36651058?v=4";
+keywords:
+- Apache APISIX
+- Google Cloud
+- Google Logging
+- APISIX
+- API Gateway
+description: This article will explain how to configure and use the Google 
Cloud Logging service in Apache APISIX.
+tags: [Technology]
+---
+
+> This article will explain how to configure and use the Google Cloud Logging 
service in Apache APISIX.
+
+<!--truncate-->
+
+![Apache APISIX-Google Cloud logging 
cover](https://static.apiseven.com/202108/1640155567091-2611f8b8-8181-42d8-8756-e892b3768a8d.png)
+
+Logging is an important infrastructure for distributed systems. It can help 
developers observe the status of service operation, improve the efficiency of 
service troubleshooting and diagnosis, and conduct multi-dimensional analysis 
to improve the overall stability and operational efficiency of the system.
+
+[Google Cloud Logging](https://cloud.google.com/logging/) is a real-time log 
management service provided by Google Cloud, offering EB-level storage, search, 
analysis, and alerting services. Google Cloud Logging's log browser allows you 
to search, sort, and analyze logs easily and efficiently, and Google Cloud 
Logging also provides saved queries and rich graphical features to make log 
screening results retrievable and more intuitive.
+
+Apache APISIX has previously supported the integration of [HTTP 
Logger](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/http-logger.md)
 , [TCP 
Logger](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/tcp-logger.md),
 [Kafka 
Logger](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/kafka-logger.md),
 [UDP 
Logger](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/udp-logger.md),
 [RocketMQ 
Logger](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/rocketmq-logger.md),
 [SkyWalking 
Logger](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/skywalking-logger.md),
 [Aliyun Cloud 
Logging(SLS)](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/sls-logger.md)
 and many other open source and cloud logging service solutions.
+
+Recently, Apache APISIX has also added support for Google Cloud Logging, 
giving users a new logging solution when using Apache APISIX as a gateway: use 
[google-cloud-logging](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/google-cloud-logging.md)
 to forward Apache APISIX request logs to the Google Cloud Logging service for 
analysis and storage.
+
+When the plugin is enabled, Apache APISIX will take the request context 
information in Log Phase and serialize it into Google Cloud Logging's 
[LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry),
 then submit the serialized log data to the batch queue, and when the batch 
queue triggers a user-set time or entry threshold, the log data will be 
forwarded to Google Cloud Logging service via Google Cloud API to the Google 
Cloud Logging service.
+
+This article will explain how to configure and use the Google Cloud Logging 
service in Apache APISIX.
+
+## Configure Google Cloud
+
+1. Open your browser and visit Google Cloud Homepage.
+2. Enter your username and password to log in to the Google Cloud console.
+3. Click the Google Cloud console left menu and select "IAM & Admin > Create a 
Project" to start creating a project.
+   ![create a 
project](https://static.apiseven.com/202108/1640137078950-3a0b472b-df9f-4f75-9c03-816138860f74.png)
+4. Enter a project name, select an organization name, and click "CREATE" to 
create the project.
+   ![create a 
project-2](https://static.apiseven.com/202108/1640137136967-effec599-2263-45e7-874d-53a547b83aae.png)
+5. When the project is created successfully, the top right corner of the 
console indicates that the creation was successful.
+   ![project 
notification](https://static.apiseven.com/202108/1640137177601-6ac703ef-99e4-4ac2-82e3-5b978348f458.png)
+6. Click in the window to select the project, or select the project operation 
path in the top navigation bar of the console home page. After selecting the 
project, you will be redirected to the console home page, where you can already 
see the data about the current project in the top navigation bar and the 
project information in the information center.
+   ![view your 
project](https://static.apiseven.com/202108/1640137215687-4a2a4789-09d3-4cc0-85fa-be67762cf9b7.png)
+7. After you finish creating the project, you need to create a service account 
for the project. Please go back to the Google Cloud console home page and click 
"IAM & Admin > Service Account" on the left menu to start creating a service 
account.
+   ![start creating a service 
account](https://static.apiseven.com/202108/1640137733012-6c9808c8-9c96-401e-a680-03a276b964c0.png)
+8. Click "CREATE SERVICE ACCOUNT" to create the service account.
+   ![create a service 
account](https://static.apiseven.com/202108/1640137784375-e47cbe0e-7735-4e7b-a881-1a9ec1c12ffc.png)
+9. Enter the service account name and ID (the ID usually follows the account 
generation), and then click "CREATE AND CONTINUE".
+    ![create a service 
account-2](https://static.apiseven.com/202108/1640137834702-76166e6f-ed98-4a85-a759-2ce78f795794.png)
+10. Click on "Role" and type "Logging Admin" in the search box to search for 
this role and select "Logging Admin" as the role.
+    ![create a service 
account-3](https://static.apiseven.com/202108/1640137883981-0f780040-8398-4d38-9600-a5e54b29b48e.png)
+11. Click "DONE" to complete the service account creation and jump to the 
service account home page. At this point you can see the account you just 
created and its details in the list.
+    ![service account 
information](https://static.apiseven.com/202108/1640137970837-ed1994be-87d0-48b8-bec5-010200fe1f1d.png)
+12. Click "Manage keys" in the last column of the service account to enter the 
secret key management interface.
+    ![enter secret key management 
interface](https://static.apiseven.com/202108/1640138660649-cd57da29-5965-4251-9deb-300de830dfd9.png)
+13. Click "ADD KEY > Create new key" to start creating a new secret key.
+    ![create a new secret 
key](https://static.apiseven.com/202108/1640138732589-1aea201b-de2d-455a-8c04-c3f5a28dfa91.png)
+14. Select the secret key type as "JSON" in the pop-up page, and then click 
"CREATE" to create a new secret key.
+    ![create a new secret 
key-2](https://static.apiseven.com/202108/1640138785425-23ee8efe-bc0d-428a-a627-2f428440da37.png)
+15. The private key information will be automatically downloaded to the system 
default Downloads directory through your browser . When you enable 
google-cloud-logging plugin, you need to use the information in this private 
key, so please save the private key file.
+    ![Download your 
key](https://static.apiseven.com/202108/1640138820163-aa459874-e78e-4156-ab74-58fc7e2ae13f.png)
+
+## Configure Apache APISIX
+
+### Enable google-cloud-logging plugin
+
+#### Option 1: Upload key file configuration
+
+1. Upload the private key file to the Apache APISIX node server.
+2. Configure the file path to the google-cloud-logging. auth_file 
configuration item, as shown below:

Review comment:
       ```suggestion
   2. Configure the file path to the `google-cloud-logging. auth_file` 
configuration item, as shown below:
   ```




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to