You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2021/08/12 06:41:16 UTC

[skywalking-python] branch kezhenxu94-patch-1 created (now 5163290)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a change to branch kezhenxu94-patch-1
in repository https://gitbox.apache.org/repos/asf/skywalking-python.git.


      at 5163290  doc: update agent set up doc

This branch includes the following new commits:

     new 5163290  doc: update agent set up doc

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[skywalking-python] 01/01: doc: update agent set up doc

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch kezhenxu94-patch-1
in repository https://gitbox.apache.org/repos/asf/skywalking-python.git

commit 516329029416f4459ca0d1303eb9511298c873e4
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Thu Aug 12 14:41:10 2021 +0800

    doc: update agent set up doc
---
 README.md | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/README.md b/README.md
index 0a50452..674146e 100755
--- a/README.md
+++ b/README.md
@@ -44,6 +44,17 @@ SkyWalking Python SDK requires SkyWalking 8.0+ and Python 3.5+.
 
 > If you want to try out the latest features that are not released yet, please refer to [the guide](docs/FAQ.md#q-how-to-build-from-sources) to build from sources.
 
+By default, SkyWalking Python agent uses gRPC protocol to report data to SkyWalking backend,
+in SkyWalking backend, the port of gRPC protocol is `11800`, and the port of HTTP protocol is `12800`,
+you should configure `collector_address` (or environment variable `SW_AGENT_COLLECTOR_BACKEND_SERVICES`)
+according to the protocol you want.
+
+### Report data via gRPC protocol (Default)
+
+For example, if you want to use gRPC protocol to report data, configure `collector_address`
+(or environment variable `SW_AGENT_COLLECTOR_BACKEND_SERVICES`) to `<oap-ip-or-host>:11800`,
+such as `127.0.0.1:11800`:
+
 ```python
 from skywalking import agent, config
 
@@ -51,6 +62,36 @@ config.init(collector_address='127.0.0.1:11800', service_name='your awesome serv
 agent.start()
 ```
 
+### Report data via HTTP protocol
+
+However, if you want to use HTTP protocol to report data, configure `collector_address`
+(or environment variable `SW_AGENT_COLLECTOR_BACKEND_SERVICES`) to `<oap-ip-or-host>:12800`,
+such as `127.0.0.1:12800`:
+
+> Remember you should install `skywalking-python` with extra requires `http`, `pip install "apache-skywalking[http]`.
+
+```python
+from skywalking import agent, config
+
+config.init(collector_address='127.0.0.1:12800', service_name='your awesome service')
+agent.start()
+```
+
+### Report data via Kafka protocol
+
+Finally, if you want to use Kafka protocol to report data, configure `kafka_bootstrap_servers`
+(or environment variable `SW_KAFKA_REPORTER_BOOTSTRAP_SERVERS`) to `kafka-brokers`,
+such as `127.0.0.1:9200`:
+
+> Remember you should install `skywalking-python` with extra requires `kafka`, `pip install "apache-skywalking[kafka]`.
+
+```python
+from skywalking import agent, config
+
+config.init(kafka_bootstrap_servers='127.0.0.1:9200', service_name='your awesome service')
+agent.start()
+```
+
 Alternatively, you can also pass the configurations via environment variables (such as `SW_AGENT_NAME`, `SW_AGENT_COLLECTOR_BACKEND_SERVICES`, etc.) so that you don't need to call `config.init`.
 
 All supported environment variables can be found [here](docs/EnvVars.md)