You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2023/01/30 07:05:36 UTC

[skywalking-python] branch master updated: Remove configuration debts before we release 1.0.0 (#273)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2efddcf  Remove configuration debts before we release 1.0.0 (#273)
2efddcf is described below

commit 2efddcf3fbbfbc1cbc7936c73cf1872ee33f133a
Author: Superskyyy <Su...@outlook.com>
AuthorDate: Mon Jan 30 02:05:29 2023 -0500

    Remove configuration debts before we release 1.0.0 (#273)
---
 .github/PULL_REQUEST_TEMPLATE                      |   1 +
 CHANGELOG.md                                       |  18 +-
 Makefile                                           |   1 +
 README.md                                          |  14 +-
 docs/README.md                                     |  14 +-
 docs/en/contribution/How-to-develop-plugin.md      |   2 +-
 docs/en/setup/CLI.md                               |   4 +-
 docs/en/setup/Configuration.md                     |  95 ++++++++
 docs/en/setup/Container.md                         |   2 +-
 docs/en/setup/EnvVars.md                           |  61 -----
 docs/en/setup/Installation.md                      |  12 +-
 docs/en/setup/Intrusive.md                         |  12 +-
 docs/en/setup/Plugins.md                           |   2 +-
 docs/en/setup/advanced/LogReporter.md              |   2 +-
 docs/en/setup/faq/How-to-disable-plugin.md         |   2 +-
 docs/menu.yml                                      |   4 +-
 skywalking/agent/__init__.py                       |  10 +-
 skywalking/agent/protocol/grpc.py                  |   8 +-
 skywalking/agent/protocol/http.py                  |   4 +-
 skywalking/agent/protocol/kafka.py                 |   6 +-
 skywalking/bootstrap/loader/sitecustomize.py       |   2 +-
 skywalking/client/grpc.py                          |   4 +-
 skywalking/client/http.py                          |   4 +-
 skywalking/client/kafka.py                         |   6 +-
 skywalking/config.py                               | 262 +++++++++++++++------
 skywalking/profile/profile_context.py              |   4 +-
 tests/e2e/base/docker-compose.base.yml             |   8 +-
 tests/e2e/case/grpc/docker-compose.yml             |   4 +-
 tests/e2e/case/http/docker-compose.yml             |   4 +-
 tests/e2e/case/kafka/docker-compose.yml            |   8 +-
 .../e2e/case/profiling/greenlet/docker-compose.yml |   4 +-
 .../case/profiling/threading/docker-compose.yml    |   4 +-
 .../data/sw_elasticsearch/docker-compose.yml       |   4 +-
 tests/plugin/data/sw_happybase/docker-compose.yml  |   4 +-
 tests/plugin/data/sw_kafka/docker-compose.yml      |   4 +-
 .../plugin/data/sw_mysqlclient/docker-compose.yml  |   6 +-
 tests/plugin/data/sw_psycopg/docker-compose.yml    |   6 +-
 tests/plugin/data/sw_psycopg2/docker-compose.yml   |   6 +-
 tests/plugin/data/sw_pymongo/docker-compose.yml    |   6 +-
 tests/plugin/data/sw_pymysql/docker-compose.yml    |   6 +-
 tests/plugin/data/sw_rabbitmq/docker-compose.yml   |   4 +-
 tests/plugin/data/sw_redis/docker-compose.yml      |   4 +-
 tests/plugin/docker-compose.base.yml               |   5 +-
 tests/plugin/http/sw_aiohttp/docker-compose.yml    |   4 +-
 tests/plugin/http/sw_http/docker-compose.yml       |   4 +-
 tests/plugin/http/sw_http_wsgi/docker-compose.yml  |   4 +-
 tests/plugin/http/sw_requests/docker-compose.yml   |   4 +-
 tests/plugin/http/sw_urllib3/docker-compose.yml    |   4 +-
 tests/plugin/http/sw_websockets/docker-compose.yml |   6 +-
 tests/plugin/web/sw_bottle/docker-compose.yml      |   6 +-
 tests/plugin/web/sw_django/docker-compose.yml      |   6 +-
 tests/plugin/web/sw_falcon/docker-compose.yml      |   4 +-
 tests/plugin/web/sw_fastapi/docker-compose.yml     |   6 +-
 tests/plugin/web/sw_flask/docker-compose.yml       |   6 +-
 tests/plugin/web/sw_pyramid/docker-compose.yml     |   4 +-
 tests/plugin/web/sw_sanic/docker-compose.yml       |   6 +-
 tests/plugin/web/sw_tornado/docker-compose.yml     |   4 +-
 tools/config_doc_gen.py                            | 134 +++++++++++
 tools/plugin_doc_gen.py                            |   2 +-
 59 files changed, 571 insertions(+), 276 deletions(-)

diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE
index 50301d4..2bbf484 100644
--- a/.github/PULL_REQUEST_TEMPLATE
+++ b/.github/PULL_REQUEST_TEMPLATE
@@ -27,6 +27,7 @@
 - [ ] Update the documentation to include this new feature.
 - [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
 - [ ] If it's UI related, attach the screenshots below.
+- [ ] I have rebuilt the `Configuration.md` documentation by running `make doc-gen`
      ==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👆 ==== -->
 
 <!-- ==== 📱 Remove this line WHEN AND ONLY WHEN you're adding or modifying a plugin instrumentation, follow the checklist 👇 ====
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c4e5fdd..00d55d4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,11 +1,19 @@
 ## Change Logs
 
 ### 1.0.0
+
+- **Important Note and Breaking Changes:**
+  - Python 3.6 is no longer supported and may not function properly.
+  - A number of configuration options (mostly environment variables) are renamed to follow the convention of
+  'SW_AGENT' prefixes, please check with the latest official documentation before upgrading. (#273)
+  
+  https://skywalking.apache.org/docs/skywalking-python/v1.0.0/en/setup/configuration/
+  - All agent core capabilities are now covered by test cases and enabled by default (Trace, Log, PVM runtime metrics, Profiler)
+
+
 - Feature:
-  - Drop support for Python 3.6
-  - Add support for Python 3.11 (Pending)
-  - Add MeterReportService (gRPC, Kafka reporter) (default:disabled) (#231, #236, #241, #243)
-  - Add reporter for PVM runtime metrics (default:disabled) (#238, #247)
+  - Add MeterReportService (gRPC, Kafka reporter) (default:enabled) (#231, #236, #241, #243)
+  - Add reporter for PVM runtime metrics (default:enabled) (#238, #247)
   - Add Greenlet profiler (#246)
   - Add test and support for Python Slim base images (#249)
   - Add support for the tags of Virtual Cache for Redis (#263)
@@ -29,6 +37,7 @@
   - Enforce tag class type conversion (#262)
   - Fix sw_logging (log reporter) potentially throw exception leading to traceback confusion (#267)
   - Avoid reporting meaningless tracecontext with logs when there's no active span, UI will now show empty traceID (#272)
+  - Fix exception handler in profile_context (#273)
   
 - Docs:
   - New documentation on how to test locally (#222)
@@ -36,6 +45,7 @@
   - New documentation on the newly added greenlet profiler and the original threading profiler (#250)
   - Overhaul documentation on development setup and testing (#249)
   - Add tables to state currently supported features of Python agent. (#271)
+  - New configuration documentation generator (#273) 
 
 - Others:
   - Pin CI SkyWalking License Eye (#221)
diff --git a/Makefile b/Makefile
index 0a3ca2e..1b78512 100644
--- a/Makefile
+++ b/Makefile
@@ -78,6 +78,7 @@ fix:
 .PHONY: doc-gen
 doc-gen: gen
 	poetry run python3 tools/plugin_doc_gen.py
+	poetry run python3 tools/config_doc_gen.py
 
 .PHONY: check-doc-gen
 check-doc-gen: doc-gen
diff --git a/README.md b/README.md
index bb79658..2df7758 100755
--- a/README.md
+++ b/README.md
@@ -21,13 +21,13 @@
 
 ## Capabilities
 
-| Reporter  | Supported?       | Details                                                    | 
-|:----------|:-----------------|:-----------------------------------------------------------|
-| Trace     | ✅ (default: ON)  | Automatic instrumentation + Manual SDK                     |            
-| Log       | ✅ (default: OFF) | Direct reporter only. (Tracing context in log planned)     |
-| Meter     | ✅ (default: ON)  | Meter API + Automatic PVM metrics                          |
-| Event     | ❌ (Planned)      | Report lifecycle events of your awesome Python application |
-| Profiling | ✅ (default: ON)  | Threading and Greenlet Profiler                            |
+| Reporter  | Supported?      | Details                                                    | 
+|:----------|:----------------|:-----------------------------------------------------------|
+| Trace     | ✅ (default: ON) | Automatic instrumentation + Manual SDK                     |            
+| Log       | ✅ (default: ON) | Direct reporter only. (Tracing context in log planned)     |
+| Meter     | ✅ (default: ON) | Meter API + Automatic PVM metrics                          |
+| Event     | ❌ (Planned)     | Report lifecycle events of your awesome Python application |
+| Profiling | ✅ (default: ON) | Threading and Greenlet Profiler                            |
 
 ## Installation Requirements
 
diff --git a/docs/README.md b/docs/README.md
index d43f8ef..b28327f 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -17,13 +17,13 @@ This documentation covers a number of ways to set up the Python agent for variou
 
 The following table demonstrates the currently supported telemetry collection capabilities in SkyWalking Python agent:
 
-| Reporter  | Supported?       | Details                                                    | 
-|:----------|:-----------------|:-----------------------------------------------------------|
-| Trace     | ✅ (default: ON)  | Automatic instrumentation + Manual SDK                     |            
-| Log       | ✅ (default: OFF) | Direct reporter only. (Tracing context in log planned)     |
-| Meter     | ✅ (default: ON)  | Meter API + Automatic PVM metrics                          |
-| Event     | ❌ (Planned)      | Report lifecycle events of your awesome Python application |
-| Profiling | ✅ (default: ON)  | Threading and Greenlet Profiler                            |
+| Reporter  | Supported?      | Details                                                    | 
+|:----------|:----------------|:-----------------------------------------------------------|
+| Trace     | ✅ (default: ON) | Automatic instrumentation + Manual SDK                     |            
+| Log       | ✅ (default: ON) | Direct reporter only. (Tracing context in log planned)     |
+| Meter     | ✅ (default: ON) | Meter API + Automatic PVM metrics                          |
+| Event     | ❌ (Planned)     | Report lifecycle events of your awesome Python application |
+| Profiling | ✅ (default: ON) | Threading and Greenlet Profiler                            |
 
 
 ## Live Demo
diff --git a/docs/en/contribution/How-to-develop-plugin.md b/docs/en/contribution/How-to-develop-plugin.md
index 7cf161f..4d78720 100644
--- a/docs/en/contribution/How-to-develop-plugin.md
+++ b/docs/en/contribution/How-to-develop-plugin.md
@@ -20,7 +20,7 @@ You can always take [the existing plugins](../setup/Plugins.md) as examples, whi
    ```
 4. Every plugin requires a corresponding test under `tests/plugin` before it can be merged, refer to the [Plugin Test Guide](How-to-test-plugin.md) when writing a plugin test.
 5. Update the [Supported Plugin List](../setup/Plugins.md).
-6. Add the environment variables to [Environment Variable list](../setup/EnvVars.md) if any.
+6. Add the environment variables to [Environment Variable list](../setup/Configuration.md) if any.
 
 ## Steps after coding
 
diff --git a/docs/en/setup/CLI.md b/docs/en/setup/CLI.md
index 87a9521..9aa712d 100644
--- a/docs/en/setup/CLI.md
+++ b/docs/en/setup/CLI.md
@@ -50,7 +50,7 @@ Sometimes you don't actually need the agent to monitor anything in a child proce
 
 If you do not need the agent to get loaded for application child processes, you can turn off the behavior by setting an environment variable.
 
-`SW_PYTHON_BOOTSTRAP_PROPAGATE` to `False`
+`SW_AGENT_SW_PYTHON_BOOTSTRAP_PROPAGATE` to `False`
 
 Note the auto bootstrap depends on the environment inherited by child processes, 
 thus prepending a new sitecustomize path to or removing the loader path from the `PYTHONPATH` could prevent the agent from loading in a child process. 
@@ -62,7 +62,7 @@ You would normally want to provide additional configurations other than the defa
 #### Through environment variables
 
 The currently supported method is to provide the environment variables listed 
-and explained in the [Environment Variables List](EnvVars.md).
+and explained in the [Environment Variables List](Configuration.md).
 
 #### Through a sw-config.yaml
 
diff --git a/docs/en/setup/Configuration.md b/docs/en/setup/Configuration.md
new file mode 100644
index 0000000..3792c5d
--- /dev/null
+++ b/docs/en/setup/Configuration.md
@@ -0,0 +1,95 @@
+# Supported Agent Configuration Options
+
+Below is the full list of supported configurations you can set to
+customize the agent behavior, please take some time to read the descriptions for what they can achieve.
+
+> Usage: (Pass in intrusive setup)
+```
+from skywalking import config, agent
+config.init(YourConfiguration=YourValue))
+agent.start()
+```
+> Usage: (Pass by environment variables)
+```
+export SW_AGENT_YourConfiguration=YourValue
+```
+
+###  Agent Core Configuration Options
+| Configuration | Environment Variable | Type | Default Value | Description |
+| :------------ | :------------ | :------------ | :------------ | :------------ |
+| collector_address | SW_AGENT_COLLECTOR_ADDRESS | <class 'str'> | oap_host:oap_port | The backend OAP server address, 11800 is default OAP gRPC port, 12800 is HTTP, Kafka ignores this option and uses kafka_bootstrap_servers option. **This option should be changed accordingly with selected protocol** |
+| protocol | SW_AGENT_PROTOCOL | <class 'str'> | grpc | The protocol to communicate with the backend OAP, `http`, `grpc` or `kafka`, **we highly suggest using `grpc` in production as it's well optimized than `http`**. The `kafka` protocol provides an alternative way to submit data to the backend. |
+| service_name | SW_AGENT_SERVICE_NAME | <class 'str'> | Python Service Name | The name of your awesome Python service |
+| service_instance | SW_AGENT_SERVICE_INSTANCE | <class 'str'> | str(uuid.uuid1()).replace('-', '') | The name of this particular awesome Python service instance |
+| namespace | SW_AGENT_NAMESPACE | <class 'str'> |  | The agent namespace of the Python service (available as tag) |
+| kafka_bootstrap_servers | SW_AGENT_KAFKA_BOOTSTRAP_SERVERS | <class 'str'> | localhost:9092 | A list of host/port pairs to use for establishing the initial connection to your Kafka cluster. It is in the form of host1:port1,host2:port2,... (used for Kafka reporter protocol) |
+| kafka_topic_management | SW_AGENT_KAFKA_TOPIC_MANAGEMENT | <class 'str'> | skywalking-managements | Specifying Kafka topic name for service instance reporting and registering, this should be in sync with OAP |
+| kafka_topic_segment | SW_AGENT_KAFKA_TOPIC_SEGMENT | <class 'str'> | skywalking-segments | Specifying Kafka topic name for Tracing data, this should be in sync with OAP |
+| kafka_topic_log | SW_AGENT_KAFKA_TOPIC_LOG | <class 'str'> | skywalking-logs | Specifying Kafka topic name for Log data, this should be in sync with OAP |
+| kafka_topic_meter | SW_AGENT_KAFKA_TOPIC_METER | <class 'str'> | skywalking-meters | Specifying Kafka topic name for Meter data, this should be in sync with OAP |
+| kafka_reporter_custom_configurations | SW_AGENT_KAFKA_REPORTER_CUSTOM_CONFIGURATIONS | <class 'str'> |  | The configs to init KafkaProducer, supports the basic arguments (whose type is either `str`, `bool`, or `int`) listed [here](https://kafka-python.readthedocs.io/en/master/apidoc/KafkaProducer.html#kafka.KafkaProducer) This config only works from env variables, each one should be passed in `SW_AGENT_KAFKA_REPORTER_CONFIG_<KEY_NAME>` |
+| force_tls | SW_AGENT_FORCE_TLS | <class 'bool'> | False | Use TLS for communication with SkyWalking OAP (no cert required) |
+| authentication | SW_AGENT_AUTHENTICATION | <class 'str'> |  | The authentication token to verify that the agent is trusted by the backend OAP, as for how to configure the backend, refer to [the yaml](https://github.com/apache/skywalking/blob/4f0f39ffccdc9b41049903cc540b8904f7c9728e/oap-server/server-bootstrap/src/main/resources/application.yml#L155-L158). |
+| logging_level | SW_AGENT_LOGGING_LEVEL | <class 'str'> | INFO | The level of agent self-logs, could be one of `CRITICAL`, `FATAL`, `ERROR`, `WARN`(`WARNING`), `INFO`, `DEBUG`. Please turn on debug if an issue is encountered to find out what's going on |
+###  Agent Core Danger Zone
+| Configuration | Environment Variable | Type | Default Value | Description |
+| :------------ | :------------ | :------------ | :------------ | :------------ |
+| heartbeat_period | SW_AGENT_HEARTBEAT_PERIOD | <class 'int'> | 30 | The agent will exchange heartbeat message with SkyWalking OAP backend every `period` seconds |
+| service_instance_property_report_factor | SW_AGENT_SERVICE_INSTANCE_PROPERTY_REPORT_FACTOR | <class 'int'> | 10 | The agent will report service instance properties every `factor * heartbeat period` seconds default: 10*30 = 300 seconds (TODO) |
+| experimental_fork_support | SW_AGENT_EXPERIMENTAL_FORK_SUPPORT | <class 'bool'> | False | The agent will try to restart itself in any os.fork()-ed child process. Important note: it's not suitable for large numbered, short-lived processes such as multiprocessing.Pool, as each one will introduce overhead and create numerous instances in SkyWalking dashboard in format of `service_instance-child-<pid>` (TODO) |
+| queue_timeout | SW_AGENT_QUEUE_TIMEOUT | <class 'int'> | 1 | DANGEROUS - This option controls the interval of each bulk report from telemetry data queues Do not modify unless you have evaluated its impact given your service load. |
+###  SW_PYTHON Auto Instrumentation CLI
+| Configuration | Environment Variable | Type | Default Value | Description |
+| :------------ | :------------ | :------------ | :------------ | :------------ |
+| sw_python_bootstrap_propagate | SW_AGENT_SW_PYTHON_BOOTSTRAP_PROPAGATE | <class 'bool'> | False | Special: can only be passed via environment. This config controls the child process agent bootstrap behavior in `sw-python` CLI, if set to `False`, a valid child process will not boot up a SkyWalking Agent. Please refer to the [CLI Guide](CLI.md) for details. |
+###  Trace Reporter Configurations
+| Configuration | Environment Variable | Type | Default Value | Description |
+| :------------ | :------------ | :------------ | :------------ | :------------ |
+| trace_reporter_max_buffer_size | SW_AGENT_TRACE_REPORTER_MAX_BUFFER_SIZE | <class 'int'> | 10000 | The maximum queue backlog size for sending the segment data to backend, segments beyond this are silently dropped |
+| trace_ignore_path | SW_AGENT_TRACE_IGNORE_PATH | <class 'str'> |  | You can setup multiple URL path patterns, The endpoints match these patterns wouldn't be traced. the current matching rules follow Ant Path match style , like /path/*, /path/**, /path/?. |
+| ignore_suffix | SW_AGENT_IGNORE_SUFFIX | <class 'str'> | .jpg,.jpeg,.js,.css,.png,.bmp,.gif,.ico,.mp3,.mp4,.html,.svg  | If the operation name of the first span is included in this set, this segment should be ignored. |
+| correlation_element_max_number | SW_AGENT_CORRELATION_ELEMENT_MAX_NUMBER | <class 'int'> | 3 | Max element count of the correlation context. |
+| correlation_value_max_length | SW_AGENT_CORRELATION_VALUE_MAX_LENGTH | <class 'int'> | 128 | Max value length of correlation context element. |
+###  Profiling Configurations
+| Configuration | Environment Variable | Type | Default Value | Description |
+| :------------ | :------------ | :------------ | :------------ | :------------ |
+| profiler_active | SW_AGENT_PROFILER_ACTIVE | <class 'bool'> | True | If `True`, Python agent will enable profiler when user create a new profiling task. |
+| get_profile_task_interval | SW_AGENT_GET_PROFILE_TASK_INTERVAL | <class 'int'> | 20 | The number of seconds between two profile task query. |
+| profile_max_parallel | SW_AGENT_PROFILE_MAX_PARALLEL | <class 'int'> | 5 | The number of parallel monitor segment count. |
+| profile_duration | SW_AGENT_PROFILE_DURATION | <class 'int'> | 10 | The maximum monitor segment time(minutes), if current segment monitor time out of limit, then stop it. |
+| profile_dump_max_stack_depth | SW_AGENT_PROFILE_DUMP_MAX_STACK_DEPTH | <class 'int'> | 500 | The number of max dump thread stack depth |
+| profile_snapshot_transport_buffer_size | SW_AGENT_PROFILE_SNAPSHOT_TRANSPORT_BUFFER_SIZE | <class 'int'> | 50 | The number of snapshot transport to backend buffer size |
+###  Log Reporter Configurations
+| Configuration | Environment Variable | Type | Default Value | Description |
+| :------------ | :------------ | :------------ | :------------ | :------------ |
+| log_reporter_active | SW_AGENT_LOG_REPORTER_ACTIVE | <class 'bool'> | True | If `True`, Python agent will report collected logs to the OAP or Satellite. Otherwise, it disables the feature. |
+| log_reporter_safe_mode | SW_AGENT_LOG_REPORTER_SAFE_MODE | <class 'bool'> | False | If `True`, Python agent will filter out HTTP basic auth information from log records. By default, it disables the feature due to potential performance impact brought by regular expression |
+| log_reporter_max_buffer_size | SW_AGENT_LOG_REPORTER_MAX_BUFFER_SIZE | <class 'int'> | 10000 | The maximum queue backlog size for sending log data to backend, logs beyond this are silently dropped. |
+| log_reporter_level | SW_AGENT_LOG_REPORTER_LEVEL | <class 'str'> | WARNING | This config specifies the logger levels of concern, any logs with a level below the config will be ignored. |
+| log_reporter_ignore_filter | SW_AGENT_LOG_REPORTER_IGNORE_FILTER | <class 'bool'> | False | This config customizes whether to ignore the application-defined logger filters, if `True`, all logs are reported disregarding any filter rules. |
+| log_reporter_formatted | SW_AGENT_LOG_REPORTER_FORMATTED | <class 'bool'> | True | If `True`, the log reporter will transmit the logs as formatted. Otherwise, puts logRecord.msg and logRecord.args into message content and tags(`argument.n`), respectively. Along with an `exception` tag if an exception was raised. |
+| log_reporter_layout | SW_AGENT_LOG_REPORTER_LAYOUT | <class 'str'> | %(asctime)s [%(threadName)s] %(levelname)s %(name)s - %(message)s | The log reporter formats the logRecord message based on the layout given. |
+| cause_exception_depth | SW_AGENT_CAUSE_EXCEPTION_DEPTH | <class 'int'> | 10 | This configuration is shared by log reporter and tracer. This config limits agent to report up to `limit` stacktrace, please refer to [Python traceback]( https://docs.python.org/3/library/traceback.html#traceback.print_tb) for more explanations. |
+###  Meter Reporter Configurations
+| Configuration | Environment Variable | Type | Default Value | Description |
+| :------------ | :------------ | :------------ | :------------ | :------------ |
+| meter_reporter_active | SW_AGENT_METER_REPORTER_ACTIVE | <class 'bool'> | True | If `True`, Python agent will report collected meters to the OAP or Satellite. Otherwise, it disables the feature. |
+| meter_reporter_max_buffer_size | SW_AGENT_METER_REPORTER_MAX_BUFFER_SIZE | <class 'int'> | 10000 | The maximum queue backlog size for sending meter data to backend, meters beyond this are silently dropped. |
+| meter_reporter_period | SW_AGENT_METER_REPORTER_PERIOD | <class 'int'> | 20 | The interval in seconds between each meter data report |
+| pvm_meter_reporter_active | SW_AGENT_PVM_METER_REPORTER_ACTIVE | <class 'bool'> | True | If `True`, Python agent will report collected Python Virtual Machine (PVM) meters to the OAP or Satellite. Otherwise, it disables the feature. |
+###  Plugin Related configurations
+| Configuration | Environment Variable | Type | Default Value | Description |
+| :------------ | :------------ | :------------ | :------------ | :------------ |
+| disable_plugins | SW_AGENT_DISABLE_PLUGINS | <class 'list'> | [''] | The name patterns in comma-separated pattern, plugins whose name matches one of the pattern won't be installed |
+| http_params_length_threshold | SW_AGENT_HTTP_PARAMS_LENGTH_THRESHOLD | <class 'int'> | 1024 | When `COLLECT_HTTP_PARAMS` is enabled, how many characters to keep and send to the OAP backend, use negative values to keep and send the complete parameters, NB. this config item is added for the sake of performance. |
+| http_ignore_method | SW_AGENT_HTTP_IGNORE_METHOD | <class 'str'> |  | Comma-delimited list of http methods to ignore (GET, POST, HEAD, OPTIONS, etc...) |
+| sql_parameters_length | SW_AGENT_SQL_PARAMETERS_LENGTH | <class 'int'> | 0 | The maximum length of the collected parameter, parameters longer than the specified length will be truncated, length 0 turns off parameter tracing |
+| pymongo_trace_parameters | SW_AGENT_PYMONGO_TRACE_PARAMETERS | <class 'bool'> | False | Indicates whether to collect the filters of pymongo |
+| pymongo_parameters_max_length | SW_AGENT_PYMONGO_PARAMETERS_MAX_LENGTH | <class 'int'> | 512 | The maximum length of the collected filters, filters longer than the specified length will be truncated |
+| elasticsearch_trace_dsl | SW_AGENT_ELASTICSEARCH_TRACE_DSL | <class 'bool'> | False | If true, trace all the DSL(Domain Specific Language) in ElasticSearch access, default is false |
+| flask_collect_http_params | SW_AGENT_FLASK_COLLECT_HTTP_PARAMS | <class 'bool'> | False | This config item controls that whether the Flask plugin should collect the parameters of the request. |
+| sanic_collect_http_params | SW_AGENT_SANIC_COLLECT_HTTP_PARAMS | <class 'bool'> | False | This config item controls that whether the Sanic plugin should collect the parameters of the request. |
+| django_collect_http_params | SW_AGENT_DJANGO_COLLECT_HTTP_PARAMS | <class 'bool'> | False | This config item controls that whether the Django plugin should collect the parameters of the request. |
+| fastapi_collect_http_params | SW_AGENT_FASTAPI_COLLECT_HTTP_PARAMS | <class 'bool'> | False | This config item controls that whether the FastAPI plugin should collect the parameters of the request. |
+| bottle_collect_http_params | SW_AGENT_BOTTLE_COLLECT_HTTP_PARAMS | <class 'bool'> | False | This config item controls that whether the Bottle plugin should collect the parameters of the request. |
+| celery_parameters_length | SW_AGENT_CELERY_PARAMETERS_LENGTH | <class 'int'> | 512 | The maximum length of `celery` functions parameters, longer than this will be truncated, 0 turns off |
diff --git a/docs/en/setup/Container.md b/docs/en/setup/Container.md
index 0533f0c..474c2da 100644
--- a/docs/en/setup/Container.md
+++ b/docs/en/setup/Container.md
@@ -28,7 +28,7 @@ You could start your Python application with `CMD`. For example - `CMD ['gunicor
 You don't need to care about enabling the SkyWalking Python agent manually, 
 it should be adopted and bootstrapped automatically through the `sw-python` CLI.
 
-[Environment variables](EnvVars.md) can be provided to customize the agent behavior.
+[Environment variables](Configuration.md) can be provided to customize the agent behavior.
 
 ### Build an image from the dockerfile 
 
diff --git a/docs/en/setup/EnvVars.md b/docs/en/setup/EnvVars.md
deleted file mode 100644
index 9351646..0000000
--- a/docs/en/setup/EnvVars.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# Supported Environment Variables
-
-Below is the full list of supported environment variables you can set to
-customize the agent behavior, please read the descriptions for what they can achieve.
-
-| Core Level Environment Variables                  | Description                                                                                                                                                                                                                                                                                             | Default                                                             |
-|:--------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------|
-| `SW_AGENT_NAME`                                   | The name of the Python service                                                                                                                                                                                                                                                                          | `Python Service Name`                                               |
-| `SW_AGENT_INSTANCE`                               | The name of the Python service instance                                                                                                                                                                                                                                                                 | Randomly generated                                                  |
-| `SW_AGENT_NAMESPACE`                              | The agent namespace of the Python service                                                                                                                                                                                                                                                               | unset                                                               |
-| `SW_AGENT_COLLECTOR_BACKEND_SERVICES`             | The backend OAP server address                                                                                                                                                                                                                                                                          | `127.0.0.1:11800`                                                   |
-| `SW_KAFKA_REPORTER_BOOTSTRAP_SERVERS`             | A list of host/port pairs to use for establishing the initial connection to the Kafka cluster. It is in the form host1:port1,host2:port2,...                                                                                                                                                            | `localhost:9092`                                                    |
-| `SW_KAFKA_REPORTER_TOPIC_MANAGEMENT`              | Specifying Kafka topic name for service instance reporting and registering.                                                                                                                                                                                                                             | `skywalking-managements`                                            |
-| `SW_KAFKA_REPORTER_TOPIC_SEGMENT`                 | Specifying Kafka topic name for Tracing data.                                                                                                                                                                                                                                                           | `skywalking-segments`                                               |
-| `SW_KAFKA_REPORTER_TOPIC_LOG`                     | Specifying Kafka topic name for Log data.                                                                                                                                                                                                                                                               | `skywalking-logs`                                                   |
-| `SW_KAFKA_REPORTER_TOPIC_METER`                   | Specifying Kafka topic name for Meter data.                                                                                                                                                                                                                                                             | `skywalking-meters`                                                 |
-| `SW_AGENT_FORCE_TLS`                              | Use TLS for communication with server (no cert required)                                                                                                                                                                                                                                                | `False`                                                             |
-| `SW_AGENT_PROTOCOL`                               | The protocol to communicate with the backend OAP, `http`, `grpc` or `kafka`, **we highly suggest using `grpc` in production as it's well optimized than `http`**. The `kafka` protocol provides an alternative way to submit data to the backend.                                                       | `grpc`                                                              |
-| `SW_AGENT_AUTHENTICATION`                         | The authentication token to verify that the agent is trusted by the backend OAP, as for how to configure the backend, refer to [the yaml](https://github.com/apache/skywalking/blob/4f0f39ffccdc9b41049903cc540b8904f7c9728e/oap-server/server-bootstrap/src/main/resources/application.yml#L155-L158). | unset                                                               |
-| `SW_AGENT_LOGGING_LEVEL`                          | The logging level, could be one of `CRITICAL`, `FATAL`, `ERROR`, `WARN`(`WARNING`), `INFO`, `DEBUG`                                                                                                                                                                                                     | `INFO`                                                              |
-| `SW_AGENT_DISABLE_PLUGINS`                        | The name patterns in CSV pattern, plugins whose name matches one of the pattern won't be installed                                                                                                                                                                                                      | `''`                                                                |
-| `SW_AGENT_MAX_BUFFER_SIZE`                        | The maximum queue backlog size for sending the segment data to backend, segments beyond this are silently dropped                                                                                                                                                                                       | `'10000'`                                                           |
-| `SW_TRACE_IGNORE_PATH`                            | You can setup multiple URL path patterns, The endpoints match these patterns wouldn't be traced. the current matching rules follow Ant Path match style , like /path/*, /path/**, /path/?.                                                                                                              | `''`                                                                |
-| `SW_IGNORE_SUFFIX`                                | If the operation name of the first span is included in this set, this segment should be ignored.                                                                                                                                                                                                        | `.jpg,.jpeg,.js,.css,.png,.bmp,.gif,.ico,.mp3,.mp4,.html,.svg`      |
-| `SW_CORRELATION_ELEMENT_MAX_NUMBER`               | Max element count of the correlation context.                                                                                                                                                                                                                                                           | `3`                                                                 |
-| `SW_CORRELATION_VALUE_MAX_LENGTH`                 | Max value length of correlation context element.                                                                                                                                                                                                                                                        | `128`                                                               |
-| `SW_PYTHON_BOOTSTRAP_PROPAGATE`                   | Special: can only be passed via environment. This config controls the child process agent bootstrap behavior in `sw-python` CLI, if set to `False`, a valid child process will not boot up a SkyWalking Agent. Please refer to the [CLI Guide](CLI.md) for details.                                     | unset                                                               |
-| `SW_AGENT_PROFILE_ACTIVE`                         | If `True`, Python agent will enable profile when user create a new profile task. Otherwise disable profile.                                                                                                                                                                                             | `True`                                                              |
-| `SW_PROFILE_TASK_QUERY_INTERVAL`                  | The number of seconds between two profile task query.                                                                                                                                                                                                                                                   | `20`                                                                |
-| `SW_AGENT_PROFILE_MAX_PARALLEL`                   | The number of parallel monitor segment count.                                                                                                                                                                                                                                                           | `5`                                                                 |
-| `SW_AGENT_PROFILE_DURATION`                       | The maximum monitor segment time(minutes), if current segment monitor time out of limit, then stop it.                                                                                                                                                                                                  | `10`                                                                |
-| `SW_AGENT_PROFILE_DUMP_MAX_STACK_DEPTH`           | The number of max dump thread stack depth                                                                                                                                                                                                                                                               | `500`                                                               |
-| `SW_AGENT_PROFILE_SNAPSHOT_TRANSPORT_BUFFER_SIZE` | The number of snapshot transport to backend buffer size                                                                                                                                                                                                                                                 | `50`                                                                |
-| `SW_AGENT_LOG_REPORTER_ACTIVE`                    | If `True`, Python agent will report collected logs to the OAP or Satellite. Otherwise, it disables the feature.                                                                                                                                                                                         | `True`                                                              |
-| `SW_AGENT_LOG_REPORTER_SAFE_MODE`                 | If `True`, Python agent will filter out HTTP basic auth information from log records. Otherwise, it disables the feature due to potential performance impact brought by regular expression                                                                                                              | `False`                                                             |
-| `SW_AGENT_LOG_REPORTER_BUFFER_SIZE`               | The maximum queue backlog size for sending log data to backend, logs beyond this are silently dropped.                                                                                                                                                                                                  | `10000`                                                             |
-| `SW_AGENT_LOG_REPORTER_LEVEL`                     | This config specifies the logger levels of concern, any logs with a level below the config will be ignored.                                                                                                                                                                                             | `WARNING`                                                           |
-| `SW_AGENT_LOG_REPORTER_IGNORE_FILTER`             | This config customizes whether to ignore the application-defined logger filters, if `True`, all logs are reported disregarding any filter rules.                                                                                                                                                        | `False`                                                             |
-| `SW_AGENT_LOG_REPORTER_FORMATTED`                 | If `True`, the log reporter will transmit the logs as formatted. Otherwise, puts logRecord.msg and logRecord.args into message content and tags(`argument.n`), respectively. Along with an `exception` tag if an exception was raised.                                                                  | `True`                                                              |
-| `SW_AGENT_LOG_REPORTER_LAYOUT`                    | The log reporter formats the logRecord message based on the layout given.                                                                                                                                                                                                                               | `%(asctime)s [%(threadName)s] %(levelname)s %(name)s - %(message)s` |
-| `SW_AGENT_CAUSE_EXCEPTION_DEPTH`                  | This config limits agent to report up to `limit` stacktrace, please refer to [Python traceback](https://docs.python.org/3/library/traceback.html#traceback.print_tb) for more explanations.                                                                                                             | `10`                                                                | 
-| `SW_AGENT_METER_REPORTER_ACTIVE`                  | If `True`, Python agent will report collected meters to the OAP or Satellite. Otherwise, it disables the feature.                                                                                                                                                                                       | `True`                                                              | 
-| `SW_AGENT_METER_REPORTER_BUFFER_SIZE`             | The maximum queue backlog size for sending meter data to backend, meters beyond this are silently dropped.                                                                                                                                                                                              | `10000`                                                             | 
-| `SW_AGENT_METER_REPORTER_PEROID`                  | The interval in seconds between each meter data report                                                                                                                                                                                                                                                  | `20`                                                                | 
-| `SW_AGENT_PVM_METER_REPORTER_ACTIVE`              | If `True`, Python agent will report collected Python Virtual Machine (PVM) meters to the OAP or Satellite. Otherwise, it disables the feature.                                                                                                                                                          | `True`                                                              | 
-
-| Plugin Level Environment Variables | Description                                                                                                                                                                                                              | Default |
-|:-----------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------|
-| `SW_SQL_PARAMETERS_LENGTH`         | The maximum length of the collected parameter, parameters longer than the specified length will be truncated, length 0 turns off parameter tracing                                                                       | `0`     |
-| `SW_PYMONGO_TRACE_PARAMETERS`      | Indicates whether to collect the filters of pymongo                                                                                                                                                                      | `False` |
-| `SW_PYMONGO_PARAMETERS_MAX_LENGTH` | The maximum length of the collected filters, filters longer than the specified length will be truncated                                                                                                                  | `512`   |
-| `SW_ELASTICSEARCH_TRACE_DSL`       | If true, trace all the DSL(Domain Specific Language) in ElasticSearch access, default is false                                                                                                                           | `false` |
-| `SW_HTTP_PARAMS_LENGTH_THRESHOLD`  | When `COLLECT_HTTP_PARAMS` is enabled, how many characters to keep and send to the OAP backend, use negative values to keep and send the complete parameters, NB. this config item is added for the sake of performance. | `1024`  |
-| `SW_HTTP_IGNORE_METHOD`            | Comma-delimited list of http methods to ignore (GET, POST, HEAD, OPTIONS, etc...)                                                                                                                                        | ``      |
-| `SW_FLASK_COLLECT_HTTP_PARAMS`     | This config item controls that whether the Flask plugin should collect the parameters of the request.                                                                                                                    | `false` |
-| `SW_SANIC_COLLECT_HTTP_PARAMS`     | This config item controls that whether the Sanic plugin should collect the parameters of the request.                                                                                                                    | `false` |
-| `SW_DJANGO_COLLECT_HTTP_PARAMS`    | This config item controls that whether the Django plugin should collect the parameters of the request.                                                                                                                   | `false` |
-| `SW_FASTAPI_COLLECT_HTTP_PARAMS`   | This config item controls that whether the FastAPI plugin should collect the parameters of the request.                                                                                                                  | `false` |
-| `SW_BOTTLE_COLLECT_HTTP_PARAMS`    | This config item controls that whether the Bottle plugin should collect the parameters of the request.                                                                                                                   | `false` |
-| `SW_CELERY_PARAMETERS_LENGTH`      | The maximum length of `celery` functions parameters, longer than this will be truncated, 0 turns off                                                                                                                     | `512`   |
-
diff --git a/docs/en/setup/Installation.md b/docs/en/setup/Installation.md
index 4b912f9..0ef9ee1 100644
--- a/docs/en/setup/Installation.md
+++ b/docs/en/setup/Installation.md
@@ -2,10 +2,13 @@
 
 **SkyWalking Python agent requires SkyWalking 8.0+ and Python 3.7+**
 
-You can install the SkyWalking Python agent via various ways.
+You can install the SkyWalking Python agent via various ways described next.
 
-> If you want to try out the latest features that are not released yet, please refer to
-> this [guide](faq/How-to-build-from-sources.md) to build from sources.
+> **Already installed? Check out easy ways to start the agent in your application**
+
+> [Non-intrusive](CLI.md) | [Intrusive <minimal>](Intrusive.md) | [Containerization](Container.md) 
+
+> **All available configurations are listed [here](Configuration.md)**
 
 ## Important Note on Different Reporter Protocols
 
@@ -23,6 +26,9 @@ Please refer to the table below before deciding which report protocol suits best
 
 ### From PyPI
 
+> If you want to try out the latest features that are not released yet, please refer to
+> this [guide](faq/How-to-build-from-sources.md) to build from sources.
+
 The Python agent module is published to [PyPI](https://pypi.org/project/apache-skywalking/), 
 from where you can use `pip` to install:
 
diff --git a/docs/en/setup/Intrusive.md b/docs/en/setup/Intrusive.md
index 40c5aff..89d4f47 100644
--- a/docs/en/setup/Intrusive.md
+++ b/docs/en/setup/Intrusive.md
@@ -7,14 +7,14 @@ which is by importing SkyWalking into your project and starting the agent.
 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 could configure `collector_address` (or environment variable `SW_AGENT_COLLECTOR_BACKEND_SERVICES`)
+You could configure `collector_address` (or environment variable `SW_AGENT_COLLECTOR_ADDRESS`)
 and set `protocol` (or environment variable `SW_AGENT_PROTOCOL` to one of
 `gprc`, `http` or `kafka` according to the protocol you would like to use.
 
 ### 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`,
+(or environment variable `SW_AGENT_COLLECTOR_ADDRESS`) to `<oap-ip-or-host>:11800`,
 such as `127.0.0.1:11800`:
 
 ```python
@@ -28,7 +28,7 @@ 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`,
+(or environment variable `SW_AGENT_COLLECTOR_ADDRESS`) to `<oap-ip-or-host>:12800`,
 such as `127.0.0.1:12800`, further set `protocol` (or environment variable `SW_AGENT_PROTOCOL` to `http`):
 
 > Remember you should install `skywalking-python` with extra requires `http`, `pip install "apache-skywalking[http]`.
@@ -44,7 +44,7 @@ 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`,
+(or environment variable `SW_AGENT_KAFKA_BOOTSTRAP_SERVERS`) to `kafka-brokers`,
 such as `127.0.0.1:9200`, further set `protocol` (or environment variable `SW_AGENT_PROTOCOL` to `kafka`):
 
 > Remember you should install `skywalking-python` with extra requires `kafka`, `pip install "apache-skywalking[kafka]"`.
@@ -57,6 +57,6 @@ config.init(kafka_bootstrap_servers='127.0.0.1:9200', service_name='your awesome
 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`.
+Alternatively, you can also pass the configurations via environment variables (such as `SW_AGENT_SERVICE_NAME`, `SW_AGENT_COLLECTOR_ADDRESS`, etc.) so that you don't need to call `config.init`.
 
-All supported environment variables can be found in the [Environment Variables List](EnvVars.md).
+All supported environment variables can be found in the [Environment Variables List](Configuration.md).
diff --git a/docs/en/setup/Plugins.md b/docs/en/setup/Plugins.md
index ea18bde..5740829 100644
--- a/docs/en/setup/Plugins.md
+++ b/docs/en/setup/Plugins.md
@@ -11,7 +11,7 @@ an incompatible version with Python in the original library
 or a limitation of SkyWalking auto-instrumentation (welcome to contribute!)
 
 ### Plugin Support Table
-Library | Python Version - Lib Version | Plugin Name
+| Library | Python Version - Lib Version | Plugin Name |
 | :--- | :--- | :--- |
 | [aiohttp](https://docs.aiohttp.org) | Python >=3.7 - ['3.7.*'];  | `sw_aiohttp` |
 | [aioredis](https://aioredis.readthedocs.io/) | Python >=3.7 - ['2.0.*'];  | `sw_aioredis` |
diff --git a/docs/en/setup/advanced/LogReporter.md b/docs/en/setup/advanced/LogReporter.md
index 639e9b5..1603f08 100644
--- a/docs/en/setup/advanced/LogReporter.md
+++ b/docs/en/setup/advanced/LogReporter.md
@@ -26,7 +26,7 @@ on the OAP side, and make sure Python agent config `kafka_bootstrap_servers` poi
 `log_reporter_max_buffer_size` - The maximum queue backlog size for sending log data to backend, logs beyond this are silently dropped.
 
 Alternatively, you can pass configurations through environment variables. 
-Please refer to the [Environment Variables List](../EnvVars.md) for the list of environment variables associated with the log reporter.
+Please refer to the [Environment Variables List](../Configuration.md) for the list of environment variables associated with the log reporter.
 
 ## Specify a logging level
 Only the logs with a level equal to or higher than the specified will be collected and reported. 
diff --git a/docs/en/setup/faq/How-to-disable-plugin.md b/docs/en/setup/faq/How-to-disable-plugin.md
index 8bea472..757e899 100644
--- a/docs/en/setup/faq/How-to-disable-plugin.md
+++ b/docs/en/setup/faq/How-to-disable-plugin.md
@@ -10,4 +10,4 @@ config.disable_plugins = ['sw_http_server', 'sw_urllib_request']  # can be also
 ```
 
 You can also disable the plugins via environment variables `SW_AGENT_DISABLE_PLUGINS`, 
-please check the [Environment Variables List](../EnvVars.md) for an explanation.
+please check the [Environment Variables List](../Configuration.md) for an explanation.
diff --git a/docs/menu.yml b/docs/menu.yml
index b313b1e..1017bd1 100644
--- a/docs/menu.yml
+++ b/docs/menu.yml
@@ -28,8 +28,8 @@ catalog:
         path: "/en/setup/Intrusive"
       - name: "Containerized Setup"
         path: "/en/setup/Container"
-      - name: "Environment Variables"
-        path: "/en/setup/EnvVars"
+      - name: "Configuration Vocabulary"
+        path: "/en/setup/Configuration"
       - name: "Advanced Features"
         catalog:
           - name: "Log Reporter"
diff --git a/skywalking/agent/__init__.py b/skywalking/agent/__init__.py
index dcda04b..a8fb212 100644
--- a/skywalking/agent/__init__.py
+++ b/skywalking/agent/__init__.py
@@ -61,7 +61,7 @@ def __report():
 
     while not __finished.is_set():
         try:
-            __protocol.report(__queue)  # is blocking actually, blocks for max config.QUEUE_TIMEOUT seconds
+            __protocol.report(__queue)  # is blocking actually, blocks for max config.queue_timeout seconds
             wait = base
         except Exception as exc:
             logger.error(str(exc))
@@ -117,7 +117,7 @@ def __report_meter():
 
     while not __finished.is_set():
         try:
-            __protocol.report_meter(__meter_queue)  # is blocking actually, blocks for max config.QUEUE_TIMEOUT seconds
+            __protocol.report_meter(__meter_queue)  # is blocking actually, blocks for max config.queue_timeout seconds
             wait = base
         except Exception as exc:
             logger.error(str(exc))
@@ -135,7 +135,7 @@ def __init_threading():
     global __heartbeat_thread, __report_thread, __log_report_thread, __query_profile_thread, \
         __command_dispatch_thread, __send_profile_thread, __queue, __log_queue, __snapshot_queue, __meter_queue, __finished
 
-    __queue = Queue(maxsize=config.max_buffer_size)
+    __queue = Queue(maxsize=config.trace_reporter_max_buffer_size)
     __finished = Event()
     __heartbeat_thread = Thread(name='HeartbeatThread', target=__heartbeat, daemon=True)
     __report_thread = Thread(name='ReportThread', target=__report, daemon=True)
@@ -167,7 +167,7 @@ def __init_threading():
         __log_report_thread = Thread(name='LogReportThread', target=__report_log, daemon=True)
         __log_report_thread.start()
 
-    if config.profile_active:
+    if config.profiler_active:
         __snapshot_queue = Queue(maxsize=config.profile_snapshot_transport_buffer_size)
 
         __query_profile_thread = Thread(name='QueryProfileCommandThread', target=__query_profile_command, daemon=True)
@@ -205,7 +205,7 @@ def __fini():
         __protocol.report_log(__log_queue, False)
         __log_queue.join()
 
-    if config.profile_active:
+    if config.profiler_active:
         __protocol.send_snapshot(__snapshot_queue, False)
         __snapshot_queue.join()
 
diff --git a/skywalking/agent/protocol/grpc.py b/skywalking/agent/protocol/grpc.py
index 2e6b2b8..9055b1e 100644
--- a/skywalking/agent/protocol/grpc.py
+++ b/skywalking/agent/protocol/grpc.py
@@ -98,7 +98,7 @@ class GrpcProtocol(Protocol):
 
             while True:
                 try:
-                    timeout = config.QUEUE_TIMEOUT  # type: int
+                    timeout = config.queue_timeout  # type: int
                     if not start:  # make sure first time through queue is always checked
                         start = time()
                     else:
@@ -167,7 +167,7 @@ class GrpcProtocol(Protocol):
 
             while True:
                 try:
-                    timeout = config.QUEUE_TIMEOUT  # type: int
+                    timeout = config.queue_timeout  # type: int
                     if not start:  # make sure first time through queue is always checked
                         start = time()
                     else:
@@ -199,7 +199,7 @@ class GrpcProtocol(Protocol):
 
             while True:
                 try:
-                    timeout = config.QUEUE_TIMEOUT  # type: int
+                    timeout = config.queue_timeout  # type: int
                     if not start:  # make sure first time through queue is always checked
                         start = time()
                     else:
@@ -231,7 +231,7 @@ class GrpcProtocol(Protocol):
 
             while True:
                 try:
-                    timeout = config.QUEUE_TIMEOUT  # type: int
+                    timeout = config.queue_timeout  # type: int
                     if not start:  # make sure first time through queue is always checked
                         start = time()
                     else:
diff --git a/skywalking/agent/protocol/http.py b/skywalking/agent/protocol/http.py
index 7b4235b..0272fba 100644
--- a/skywalking/agent/protocol/http.py
+++ b/skywalking/agent/protocol/http.py
@@ -51,7 +51,7 @@ class HttpProtocol(Protocol):
 
             while True:
                 try:
-                    timeout = config.QUEUE_TIMEOUT  # type: int
+                    timeout = config.queue_timeout  # type: int
                     if not start:  # make sure first time through queue is always checked
                         start = time()
                     else:
@@ -82,7 +82,7 @@ class HttpProtocol(Protocol):
 
             while True:
                 try:
-                    timeout = config.QUEUE_TIMEOUT  # type: int
+                    timeout = config.queue_timeout  # type: int
                     if not start:  # make sure first time through queue is always checked
                         start = time()
                     else:
diff --git a/skywalking/agent/protocol/kafka.py b/skywalking/agent/protocol/kafka.py
index 417aad4..da9ec87 100644
--- a/skywalking/agent/protocol/kafka.py
+++ b/skywalking/agent/protocol/kafka.py
@@ -53,7 +53,7 @@ class KafkaProtocol(Protocol):
 
             while True:
                 try:
-                    timeout = config.QUEUE_TIMEOUT  # type: int
+                    timeout = config.queue_timeout  # type: int
                     if not start:  # make sure first time through queue is always checked
                         start = time()
                     else:
@@ -117,7 +117,7 @@ class KafkaProtocol(Protocol):
 
             while True:
                 try:
-                    timeout = config.QUEUE_TIMEOUT  # type: int
+                    timeout = config.queue_timeout  # type: int
                     if not start:  # make sure first time through queue is always checked
                         start = time()
                     else:
@@ -144,7 +144,7 @@ class KafkaProtocol(Protocol):
 
             while True:
                 try:
-                    timeout = config.QUEUE_TIMEOUT  # type: int
+                    timeout = config.queue_timeout  # type: int
                     if not start:  # make sure first time through queue is always checked
                         start = time()
                     else:
diff --git a/skywalking/bootstrap/loader/sitecustomize.py b/skywalking/bootstrap/loader/sitecustomize.py
index 86b938e..46f0772 100644
--- a/skywalking/bootstrap/loader/sitecustomize.py
+++ b/skywalking/bootstrap/loader/sitecustomize.py
@@ -87,7 +87,7 @@ finally:  # surprise the import error by adding loaded back
 # This behavior can be turned off using a user provided env below
 # os.environ['SW_PYTHON_BOOTSTRAP_PROPAGATE']
 
-if os.environ.get('SW_PYTHON_BOOTSTRAP_PROPAGATE') == 'False':
+if os.environ.get('SW_AGENT_SW_PYTHON_BOOTSTRAP_PROPAGATE') == 'False':
     if os.environ.get('PYTHONPATH'):
         partitioned = os.environ['PYTHONPATH'].split(os.path.pathsep)
         loader_path = os.path.dirname(__file__)
diff --git a/skywalking/client/grpc.py b/skywalking/client/grpc.py
index e6e39b6..a62cb8a 100644
--- a/skywalking/client/grpc.py
+++ b/skywalking/client/grpc.py
@@ -45,8 +45,8 @@ class GrpcServiceManagementClient(ServiceManagementClient):
             KeyStringValuePair(key='language', value='python'),
             KeyStringValuePair(key='Process No.', value=str(os.getpid())),
         ]
-        if config.agent_namespace:
-            properties.append(KeyStringValuePair(key='namespace', value=config.agent_namespace))
+        if config.namespace:
+            properties.append(KeyStringValuePair(key='namespace', value=config.namespace))
         self.service_stub.reportInstanceProperties(InstanceProperties(
             service=config.service_name,
             serviceInstance=config.service_instance,
diff --git a/skywalking/client/http.py b/skywalking/client/http.py
index 21afab2..cc7506a 100644
--- a/skywalking/client/http.py
+++ b/skywalking/client/http.py
@@ -41,8 +41,8 @@ class HttpServiceManagementClient(ServiceManagementClient):
             {'key': 'language', 'value': 'python'},
             {'key': 'Process No.', 'value': str(os.getpid())},
         ]
-        if config.agent_namespace:
-            properties.append({'key': 'namespace', 'value': config.agent_namespace})
+        if config.namespace:
+            properties.append({'key': 'namespace', 'value': config.namespace})
         res = self.session.post(self.url_instance_props, json={
             'service': config.service_name,
             'serviceInstance': config.service_instance,
diff --git a/skywalking/client/kafka.py b/skywalking/client/kafka.py
index 51be7df..ab24eb9 100644
--- a/skywalking/client/kafka.py
+++ b/skywalking/client/kafka.py
@@ -33,7 +33,7 @@ kafka_configs = {}
 def __init_kafka_configs():
     kafka_configs['bootstrap_servers'] = config.kafka_bootstrap_servers.split(',')
     # process all kafka configs in env
-    kafka_keys = [key for key in os.environ.keys() if key.startswith('SW_KAFKA_REPORTER_CONFIG_')]
+    kafka_keys = [key for key in os.environ.keys() if key.startswith('SW_AGENT_KAFKA_REPORTER_CONFIG_')]
     for kafka_key in kafka_keys:
         key = kafka_key[25:]
         val = os.environ.get(kafka_key)
@@ -71,8 +71,8 @@ class KafkaServiceManagementClient(ServiceManagementClient):
             KeyStringValuePair(key='language', value='python'),
             KeyStringValuePair(key='Process No.', value=str(os.getpid())),
         ]
-        if config.agent_namespace:
-            properties.append(KeyStringValuePair(key='namespace', value=config.agent_namespace))
+        if config.namespace:
+            properties.append(KeyStringValuePair(key='namespace', value=config.namespace))
         instance = InstanceProperties(
             service=config.service_name,
             serviceInstance=config.service_instance,
diff --git a/skywalking/config.py b/skywalking/config.py
index d7e8b9c..94960cb 100644
--- a/skywalking/config.py
+++ b/skywalking/config.py
@@ -14,96 +14,206 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+"""
+This module holds all the configuration options for the agent. The options are loaded from both environment variables and
+through code level, default values are provided for each option.
+
+The environment variables must be named as `SW_AGENT_<option_variable>`.
+
+Contributors attention: When adding an new configuration option, please precede each option with a comment like this:
+# This option does bla bla
+# could be multiple lines
+actual_option: str = os.getenv('SW_AGENT_ACTUAL_OPTION') or 'default_value'
+
+The comments along with each option will be used to generate the documentation for the agent, you don't need to modify
+any documentation to reflect changes here, just make sure to run `make doc-gen` to generate the documentation.
+"""
+
 import os
 import re
 import uuid
 
 from typing import List, Pattern
 
-QUEUE_TIMEOUT: int = 1
-
 RE_IGNORE_PATH: Pattern = re.compile('^$')
 RE_HTTP_IGNORE_METHOD: Pattern = RE_IGNORE_PATH
 
 options = None  # here to include 'options' in globals
-options = globals().copy()  # THIS MUST PRECEDE DIRECTLY BEFORE LIST OF CONFIG OPTIONS!
-
-# Core level configurations
-service_name: str = os.getenv('SW_AGENT_NAME') or 'Python Service Name'
-service_instance: str = os.getenv('SW_AGENT_INSTANCE') or str(uuid.uuid1()).replace('-', '')
-agent_namespace: str = os.getenv('SW_AGENT_NAMESPACE')
-collector_address: str = os.getenv('SW_AGENT_COLLECTOR_BACKEND_SERVICES') or '127.0.0.1:11800'
-kafka_bootstrap_servers: str = os.getenv('SW_KAFKA_REPORTER_BOOTSTRAP_SERVERS') or 'localhost:9092'
-kafka_topic_management: str = os.getenv('SW_KAFKA_REPORTER_TOPIC_MANAGEMENT') or 'skywalking-managements'
-kafka_topic_segment: str = os.getenv('SW_KAFKA_REPORTER_TOPIC_SEGMENT') or 'skywalking-segments'
-kafka_topic_log: str = os.getenv('SW_KAFKA_REPORTER_TOPIC_LOG') or 'skywalking-logs'
-kafka_topic_meter: str = os.getenv('SW_KAFKA_REPORTER_TOPIC_METER') or 'skywalking-meters'
+options = globals().copy()
+# THIS MUST PRECEDE DIRECTLY BEFORE LIST OF CONFIG OPTIONS!
+
+# BEGIN: Agent Core Configuration Options
+# The backend OAP server address, 11800 is default OAP gRPC port, 12800 is HTTP, Kafka ignores this option
+# and uses kafka_bootstrap_servers option. **This option should be changed accordingly with selected protocol**
+collector_address: str = os.getenv('SW_AGENT_COLLECTOR_ADDRESS', 'oap_host:oap_port')
+# The protocol to communicate with the backend OAP, `http`, `grpc` or `kafka`, **we highly suggest using `grpc` in
+# production as it's well optimized than `http`**. The `kafka` protocol provides an alternative way to submit data to
+# the backend.
+protocol: str = os.getenv('SW_AGENT_PROTOCOL', 'grpc').lower()
+# The name of your awesome Python service
+service_name: str = os.getenv('SW_AGENT_SERVICE_NAME', 'Python Service Name')
+# The name of this particular awesome Python service instance
+service_instance: str = os.getenv('SW_AGENT_SERVICE_INSTANCE', str(uuid.uuid1()).replace('-', ''))
+# The agent namespace of the Python service (available as tag)
+namespace: str = os.getenv('SW_AGENT_NAMESPACE', '')
+# A list of host/port pairs to use for establishing the initial connection to your Kafka cluster.
+# It is in the form of host1:port1,host2:port2,... (used for Kafka reporter protocol)
+kafka_bootstrap_servers: str = os.getenv('SW_AGENT_KAFKA_BOOTSTRAP_SERVERS', 'localhost:9092')
+# Specifying Kafka topic name for service instance reporting and registering, this should be in sync with OAP
+kafka_topic_management: str = os.getenv('SW_AGENT_KAFKA_TOPIC_MANAGEMENT', 'skywalking-managements')
+# Specifying Kafka topic name for Tracing data, this should be in sync with OAP
+kafka_topic_segment: str = os.getenv('SW_AGENT_KAFKA_TOPIC_SEGMENT', 'skywalking-segments')
+# Specifying Kafka topic name for Log data, this should be in sync with OAP
+kafka_topic_log: str = os.getenv('SW_AGENT_KAFKA_TOPIC_LOG', 'skywalking-logs')
+# Specifying Kafka topic name for Meter data, this should be in sync with OAP
+kafka_topic_meter: str = os.getenv('SW_AGENT_KAFKA_TOPIC_METER', 'skywalking-meters')
+# The configs to init KafkaProducer, supports the basic arguments (whose type is either `str`, `bool`, or `int`) listed
+# [here](https://kafka-python.readthedocs.io/en/master/apidoc/KafkaProducer.html#kafka.KafkaProducer)
+# This config only works from env variables, each one should be passed in `SW_AGENT_KAFKA_REPORTER_CONFIG_<KEY_NAME>`
+kafka_reporter_custom_configurations: str = os.getenv('SW_AGENT_KAFKA_REPORTER_CUSTOM_CONFIGURATIONS', '')
+# Use TLS for communication with SkyWalking OAP (no cert required)
 force_tls: bool = os.getenv('SW_AGENT_FORCE_TLS', '').lower() == 'true'
-protocol: str = (os.getenv('SW_AGENT_PROTOCOL') or 'grpc').lower()
-authentication: str = os.getenv('SW_AGENT_AUTHENTICATION')
-logging_level: str = os.getenv('SW_AGENT_LOGGING_LEVEL') or 'INFO'
-disable_plugins: List[str] = (os.getenv('SW_AGENT_DISABLE_PLUGINS') or '').split(',')
-max_buffer_size: int = int(os.getenv('SW_AGENT_MAX_BUFFER_SIZE', '10000'))
-trace_ignore_path: str = os.getenv('SW_TRACE_IGNORE_PATH') or ''
-ignore_suffix: str = os.getenv('SW_IGNORE_SUFFIX') or '.jpg,.jpeg,.js,.css,.png,.bmp,.gif,.ico,.mp3,' \
-                                                      '.mp4,.html,.svg '
-correlation_element_max_number: int = int(os.getenv('SW_CORRELATION_ELEMENT_MAX_NUMBER') or '3')
-correlation_value_max_length: int = int(os.getenv('SW_CORRELATION_VALUE_MAX_LENGTH') or '128')
-
-# sw-python CLI
-# SW_PYTHON_BOOTSTRAP_PROPAGATE only available when passed as env var
-
-# profiling configurations
-profile_active: bool = os.getenv('SW_AGENT_PROFILE_ACTIVE') != 'False'
-get_profile_task_interval: int = int(os.getenv('SW_PROFILE_TASK_QUERY_INTERVAL') or '20')
-profile_max_parallel: int = int(os.getenv('SW_AGENT_PROFILE_MAX_PARALLEL') or '5')
-profile_duration: int = int(os.getenv('SW_AGENT_PROFILE_DURATION') or '10')
-profile_dump_max_stack_depth: int = int(os.getenv('SW_AGENT_PROFILE_DUMP_MAX_STACK_DEPTH') or '500')
-profile_snapshot_transport_buffer_size: int = int(os.getenv('SW_AGENT_PROFILE_SNAPSHOT_TRANSPORT_BUFFER_SIZE') or '50')
-
-# log reporter configurations
-log_reporter_active: bool = os.getenv('SW_AGENT_LOG_REPORTER_ACTIVE') != 'False'
-log_reporter_safe_mode: bool = os.getenv('SW_AGENT_LOG_REPORTER_SAFE_MODE') == 'True'
-log_reporter_max_buffer_size: int = int(os.getenv('SW_AGENT_LOG_REPORTER_BUFFER_SIZE') or '10000')
-log_reporter_level: str = os.getenv('SW_AGENT_LOG_REPORTER_LEVEL') or 'WARNING'
-log_reporter_ignore_filter: bool = os.getenv('SW_AGENT_LOG_REPORTER_IGNORE_FILTER') == 'True'
-log_reporter_formatted: bool = os.getenv('SW_AGENT_LOG_REPORTER_FORMATTED') != 'False'
-log_reporter_layout: str = os.getenv('SW_AGENT_LOG_REPORTER_LAYOUT') or \
-                           '%(asctime)s [%(threadName)s] %(levelname)s %(name)s - %(message)s'
-# This configuration is shared by log reporter and tracer
-cause_exception_depth: int = int(os.getenv('SW_AGENT_CAUSE_EXCEPTION_DEPTH') or '10')
-
-# meter reporter configurations
-meter_reporter_active: bool = os.getenv('SW_AGENT_METER_REPORTER_ACTIVE') != 'False'
-meter_reporter_max_buffer_size: int = int(os.getenv('SW_AGENT_METER_REPORTER_BUFFER_SIZE') or '10000')
-meter_reporter_period: int = int(os.getenv('SW_AGENT_METER_REPORTER_PERIOD') or '20')
-pvm_meter_reporter_active: bool = os.getenv('SW_AGENT_PVM_METER_REPORTER_ACTIVE') != 'False'
-
-
-# Plugin configurations
-sql_parameters_length: int = int(os.getenv('SW_SQL_PARAMETERS_LENGTH') or '0')
-pymongo_trace_parameters: bool = os.getenv('SW_PYMONGO_TRACE_PARAMETERS') == 'True'
-pymongo_parameters_max_length: int = int(os.getenv('SW_PYMONGO_PARAMETERS_MAX_LENGTH') or '512')
-elasticsearch_trace_dsl: bool = os.getenv('SW_ELASTICSEARCH_TRACE_DSL') == 'True'
-http_params_length_threshold: int = int(os.getenv('SW_HTTP_PARAMS_LENGTH_THRESHOLD') or '1024')
-http_ignore_method: str = os.getenv('SW_HTTP_IGNORE_METHOD', '').upper()
-flask_collect_http_params: bool = os.getenv('SW_FLASK_COLLECT_HTTP_PARAMS') == 'True'
-sanic_collect_http_params: bool = os.getenv('SW_SANIC_COLLECT_HTTP_PARAMS') == 'True'
-django_collect_http_params: bool = os.getenv('SW_DJANGO_COLLECT_HTTP_PARAMS') == 'True'
-fastapi_collect_http_params: bool = os.getenv('SW_FASTAPI_COLLECT_HTTP_PARAMS') == 'True'
-bottle_collect_http_params: bool = os.getenv('SW_BOTTLE_COLLECT_HTTP_PARAMS') == 'True'
-celery_parameters_length: int = int(os.getenv('SW_CELERY_PARAMETERS_LENGTH') or '512')
-
-
-options = {key for key in globals() if key not in options}  # THIS MUST FOLLOW DIRECTLY AFTER LIST OF CONFIG OPTIONS!
-
-
-def init(**kwargs):
+# The authentication token to verify that the agent is trusted by the backend OAP, as for how to configure the
+# backend, refer to [the yaml](https://github.com/apache/skywalking/blob/4f0f39ffccdc9b41049903cc540b8904f7c9728e/
+# oap-server/server-bootstrap/src/main/resources/application.yml#L155-L158).
+authentication: str = os.getenv('SW_AGENT_AUTHENTICATION', '')
+# The level of agent self-logs, could be one of `CRITICAL`, `FATAL`, `ERROR`, `WARN`(`WARNING`), `INFO`, `DEBUG`.
+# Please turn on debug if an issue is encountered to find out what's going on
+logging_level: str = os.getenv('SW_AGENT_LOGGING_LEVEL', 'INFO')
+
+# BEGIN: Agent Core Danger Zone
+# The agent will exchange heartbeat message with SkyWalking OAP backend every `period` seconds
+heartbeat_period: int = int(os.getenv('SW_AGENT_HEARTBEAT_PERIOD', '30'))
+# The agent will report service instance properties every
+# `factor * heartbeat period` seconds default: 10*30 = 300 seconds (TODO)
+service_instance_property_report_factor = int(os.getenv('SW_AGENT_SERVICE_INSTANCE_PROPERTY_REPORT_FACTOR', '10'))
+# The agent will try to restart itself in any os.fork()-ed child process. Important note: it's not suitable for
+# large numbered, short-lived processes such as multiprocessing.Pool, as each one will introduce overhead and create
+# numerous instances in SkyWalking dashboard in format of `service_instance-child-<pid>` (TODO)
+experimental_fork_support: bool = os.getenv('SW_AGENT_EXPERIMENTAL_FORK_SUPPORT', '').lower() == 'true'
+# DANGEROUS - This option controls the interval of each bulk report from telemetry data queues
+# Do not modify unless you have evaluated its impact given your service load.
+queue_timeout: int = int(os.getenv('SW_AGENT_QUEUE_TIMEOUT', '1'))
+
+# BEGIN: SW_PYTHON Auto Instrumentation CLI
+# Special: can only be passed via environment. This config controls the child process agent bootstrap behavior in
+# `sw-python` CLI, if set to `False`, a valid child process will not boot up a SkyWalking Agent. Please refer to the
+# [CLI Guide](CLI.md) for details.
+sw_python_bootstrap_propagate = os.getenv('SW_AGENT_SW_PYTHON_BOOTSTRAP_PROPAGATE', '').lower() == 'true'
+
+# BEGIN: Trace Reporter Configurations
+# The maximum queue backlog size for sending the segment data to backend, segments beyond this are silently dropped
+trace_reporter_max_buffer_size: int = int(os.getenv('SW_AGENT_TRACE_REPORTER_MAX_BUFFER_SIZE', '10000'))
+# You can setup multiple URL path patterns, The endpoints match these patterns wouldn't be traced. the current
+# matching rules follow Ant Path match style , like /path/*, /path/**, /path/?.
+trace_ignore_path: str = os.getenv('SW_AGENT_TRACE_IGNORE_PATH', '')
+# If the operation name of the first span is included in this set, this segment should be ignored.
+ignore_suffix: str = os.getenv('SW_AGENT_IGNORE_SUFFIX', '.jpg,.jpeg,.js,.css,.png,.bmp,.gif,.ico,.mp3,'
+                                                         '.mp4,.html,.svg ')
+# Max element count of the correlation context.
+correlation_element_max_number: int = int(os.getenv('SW_AGENT_CORRELATION_ELEMENT_MAX_NUMBER', '3'))
+# Max value length of correlation context element.
+correlation_value_max_length: int = int(os.getenv('SW_AGENT_CORRELATION_VALUE_MAX_LENGTH', '128'))
+
+# BEGIN: Profiling Configurations
+# If `True`, Python agent will enable profiler when user create a new profiling task.
+profiler_active: bool = os.getenv('SW_AGENT_PROFILER_ACTIVE', '').lower() != 'false'
+# The number of seconds between two profile task query.
+get_profile_task_interval: int = int(os.getenv('SW_AGENT_GET_PROFILE_TASK_INTERVAL', '20'))
+# The number of parallel monitor segment count.
+profile_max_parallel: int = int(os.getenv('SW_AGENT_PROFILE_MAX_PARALLEL', '5'))
+# The maximum monitor segment time(minutes), if current segment monitor time out of limit, then stop it.
+profile_duration: int = int(os.getenv('SW_AGENT_PROFILE_DURATION', '10'))
+# The number of max dump thread stack depth
+profile_dump_max_stack_depth: int = int(os.getenv('SW_AGENT_PROFILE_DUMP_MAX_STACK_DEPTH', '500'))
+# The number of snapshot transport to backend buffer size
+profile_snapshot_transport_buffer_size: int = int(os.getenv('SW_AGENT_PROFILE_SNAPSHOT_TRANSPORT_BUFFER_SIZE', '50'))
+
+# BEGIN: Log Reporter Configurations
+# If `True`, Python agent will report collected logs to the OAP or Satellite. Otherwise, it disables the feature.
+log_reporter_active: bool = os.getenv('SW_AGENT_LOG_REPORTER_ACTIVE', '').lower() != 'false'
+# If `True`, Python agent will filter out HTTP basic auth information from log records. By default, it disables the
+# feature due to potential performance impact brought by regular expression
+log_reporter_safe_mode: bool = os.getenv('SW_AGENT_LOG_REPORTER_SAFE_MODE', '').lower() == 'true'
+# The maximum queue backlog size for sending log data to backend, logs beyond this are silently dropped.
+log_reporter_max_buffer_size: int = int(os.getenv('SW_AGENT_LOG_REPORTER_MAX_BUFFER_SIZE', '10000'))
+# This config specifies the logger levels of concern, any logs with a level below the config will be ignored.
+log_reporter_level: str = os.getenv('SW_AGENT_LOG_REPORTER_LEVEL', 'WARNING')
+# This config customizes whether to ignore the application-defined logger filters, if `True`, all logs are reported
+# disregarding any filter rules.
+log_reporter_ignore_filter: bool = os.getenv('SW_AGENT_LOG_REPORTER_IGNORE_FILTER', '').lower() == 'true'
+# If `True`, the log reporter will transmit the logs as formatted. Otherwise, puts logRecord.msg and logRecord.args
+# into message content and tags(`argument.n`), respectively. Along with an `exception` tag if an exception was raised.
+log_reporter_formatted: bool = os.getenv('SW_AGENT_LOG_REPORTER_FORMATTED', '').lower() != 'false'
+# The log reporter formats the logRecord message based on the layout given.
+log_reporter_layout: str = os.getenv('SW_AGENT_LOG_REPORTER_LAYOUT',
+                                     '%(asctime)s [%(threadName)s] %(levelname)s %(name)s - %(message)s')
+# This configuration is shared by log reporter and tracer.
+# This config limits agent to report up to `limit` stacktrace, please refer to [Python traceback](
+# https://docs.python.org/3/library/traceback.html#traceback.print_tb) for more explanations.
+cause_exception_depth: int = int(os.getenv('SW_AGENT_CAUSE_EXCEPTION_DEPTH', '10'))
+
+# BEGIN: Meter Reporter Configurations
+# If `True`, Python agent will report collected meters to the OAP or Satellite. Otherwise, it disables the feature.
+meter_reporter_active: bool = os.getenv('SW_AGENT_METER_REPORTER_ACTIVE', '').lower() != 'false'
+# The maximum queue backlog size for sending meter data to backend, meters beyond this are silently dropped.
+meter_reporter_max_buffer_size: int = int(os.getenv('SW_AGENT_METER_REPORTER_MAX_BUFFER_SIZE', '10000'))
+# The interval in seconds between each meter data report
+meter_reporter_period: int = int(os.getenv('SW_AGENT_METER_REPORTER_PERIOD', '20'))
+# If `True`, Python agent will report collected Python Virtual Machine (PVM) meters to the OAP or Satellite.
+# Otherwise, it disables the feature.
+pvm_meter_reporter_active: bool = os.getenv('SW_AGENT_PVM_METER_REPORTER_ACTIVE', '').lower() != 'false'
+
+# BEGIN: Plugin Related configurations
+# The name patterns in comma-separated pattern, plugins whose name matches one of the pattern won't be installed
+disable_plugins: List[str] = os.getenv('SW_AGENT_DISABLE_PLUGINS', '').split(',')
+# When `COLLECT_HTTP_PARAMS` is enabled, how many characters to keep and send to the OAP backend, use negative
+# values to keep and send the complete parameters, NB. this config item is added for the sake of performance.
+http_params_length_threshold: int = int(os.getenv('SW_AGENT_HTTP_PARAMS_LENGTH_THRESHOLD', '1024'))
+# Comma-delimited list of http methods to ignore (GET, POST, HEAD, OPTIONS, etc...)
+http_ignore_method: str = os.getenv('SW_AGENT_HTTP_IGNORE_METHOD', '').upper()
+# The maximum length of the collected parameter, parameters longer than the specified length will be truncated,
+# length 0 turns off parameter tracing
+sql_parameters_length: int = int(os.getenv('SW_AGENT_SQL_PARAMETERS_LENGTH', '0'))
+# Indicates whether to collect the filters of pymongo
+pymongo_trace_parameters: bool = os.getenv('SW_AGENT_PYMONGO_TRACE_PARAMETERS', '').lower() == 'true'
+# The maximum length of the collected filters, filters longer than the specified length will be truncated
+pymongo_parameters_max_length: int = int(os.getenv('SW_AGENT_PYMONGO_PARAMETERS_MAX_LENGTH', '512'))
+# If true, trace all the DSL(Domain Specific Language) in ElasticSearch access, default is false
+elasticsearch_trace_dsl: bool = os.getenv('SW_AGENT_ELASTICSEARCH_TRACE_DSL', '').lower() == 'true'
+# This config item controls that whether the Flask plugin should collect the parameters of the request.
+flask_collect_http_params: bool = os.getenv('SW_AGENT_FLASK_COLLECT_HTTP_PARAMS', '').lower() == 'true'
+# This config item controls that whether the Sanic plugin should collect the parameters of the request.
+sanic_collect_http_params: bool = os.getenv('SW_AGENT_SANIC_COLLECT_HTTP_PARAMS', '').lower() == 'true'
+# This config item controls that whether the Django plugin should collect the parameters of the request.
+django_collect_http_params: bool = os.getenv('SW_AGENT_DJANGO_COLLECT_HTTP_PARAMS', '').lower() == 'true'
+# This config item controls that whether the FastAPI plugin should collect the parameters of the request.
+fastapi_collect_http_params: bool = os.getenv('SW_AGENT_FASTAPI_COLLECT_HTTP_PARAMS', '').lower() == 'true'
+# This config item controls that whether the Bottle plugin should collect the parameters of the request.
+bottle_collect_http_params: bool = os.getenv('SW_AGENT_BOTTLE_COLLECT_HTTP_PARAMS', '').lower() == 'true'
+# The maximum length of `celery` functions parameters, longer than this will be truncated, 0 turns off
+celery_parameters_length: int = int(os.getenv('SW_AGENT_CELERY_PARAMETERS_LENGTH', '512'))
+
+# THIS MUST FOLLOW DIRECTLY AFTER LIST OF CONFIG OPTIONS!
+options = [key for key in globals() if key not in options]  # THIS MUST FOLLOW DIRECTLY AFTER LIST OF CONFIG OPTIONS!
+
+options_with_default_value_and_type = {key: (globals()[key], type(globals()[key])) for key in options}
+
+
+def init(**kwargs) -> None:
+    """
+    Used to initialize the configuration of the SkyWalking Python Agent.
+    Refer to the official online documentation
+    https://skywalking.apache.org/docs/skywalking-python/next/en/setup/configurations/
+    for more information on the configuration options.
+
+    Args:
+        **kwargs: Any of the configuration options listed
+    """
     glob = globals()
-
     for key, val in kwargs.items():
         if key not in options:
-            raise KeyError(f'invalid config option {key}')
+            raise KeyError(f'Invalid configuration option {key}')
 
         glob[key] = val
 
diff --git a/skywalking/profile/profile_context.py b/skywalking/profile/profile_context.py
index 183a302..29ae461 100644
--- a/skywalking/profile/profile_context.py
+++ b/skywalking/profile/profile_context.py
@@ -353,9 +353,9 @@ class GreenletProfiler:
             self._old_trace = curr.settrace(callback)
 
         except Exception as e:
-            logger.error('profiling task fail. task_id:[%s] error:[%s]', self._profiling_context.task.task_id, e)
+            logger.error('profiling task fail. task_id:[%s] error:[%s]', self._profile_context.task.task_id, e)
             # todo test this can current stop profile task or not
-            self.profiling_context.stop_current_profile_task(
+            self._task_execution_service.stop_current_profile_task(
                 self._task_execution_context
             )
 
diff --git a/tests/e2e/base/docker-compose.base.yml b/tests/e2e/base/docker-compose.base.yml
index 4c2186c..234c8e0 100644
--- a/tests/e2e/base/docker-compose.base.yml
+++ b/tests/e2e/base/docker-compose.base.yml
@@ -40,8 +40,8 @@ services:
     networks:
       - e2e
     environment:
-      SW_AGENT_NAME: e2e-service-provider
-      SW_AGENT_INSTANCE: provider1
+      SW_AGENT_SERVICE_NAME: e2e-service-provider
+      SW_AGENT_SERVICE_INSTANCE: provider1
       SW_AGENT_LOGGING_LEVEL: DEBUG
       SW_AGENT_LOG_REPORTER_ACTIVE: "True"
       SW_AGENT_LOG_REPORTER_LEVEL: WARNING
@@ -63,8 +63,8 @@ services:
     networks:
       - e2e
     environment:
-      SW_AGENT_NAME: e2e-service-consumer
-      SW_AGENT_INSTANCE: consumer1
+      SW_AGENT_SERVICE_NAME: e2e-service-consumer
+      SW_AGENT_SERVICE_INSTANCE: consumer1
       SW_AGENT_LOGGING_LEVEL: DEBUG
     healthcheck:
       test: [ "CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090" ]
diff --git a/tests/e2e/case/grpc/docker-compose.yml b/tests/e2e/case/grpc/docker-compose.yml
index 5a124d3..d27d4f3 100644
--- a/tests/e2e/case/grpc/docker-compose.yml
+++ b/tests/e2e/case/grpc/docker-compose.yml
@@ -31,7 +31,7 @@ services:
     ports:
       - "9090"
     environment:
-      SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
+      SW_AGENT_COLLECTOR_ADDRESS: oap:11800
     depends_on:
       oap:
         condition: service_healthy
@@ -41,7 +41,7 @@ services:
       file: ../../base/docker-compose.base.yml
       service: consumer
     environment:
-      SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
+      SW_AGENT_COLLECTOR_ADDRESS: oap:11800
     ports:
       - "9090"
     depends_on:
diff --git a/tests/e2e/case/http/docker-compose.yml b/tests/e2e/case/http/docker-compose.yml
index 41d93c8..7163fd3 100644
--- a/tests/e2e/case/http/docker-compose.yml
+++ b/tests/e2e/case/http/docker-compose.yml
@@ -32,7 +32,7 @@ services:
     ports:
       - "9090"
     environment: # HTTP endpoint
-      SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:12800
+      SW_AGENT_COLLECTOR_ADDRESS: oap:12800
       SW_AGENT_PROTOCOL: http
     depends_on:
       oap:
@@ -43,7 +43,7 @@ services:
       file: ../../base/docker-compose.base.yml
       service: consumer
     environment:
-      SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:12800
+      SW_AGENT_COLLECTOR_ADDRESS: oap:12800
       SW_AGENT_PROTOCOL: http
     ports:
       - "9090"
diff --git a/tests/e2e/case/kafka/docker-compose.yml b/tests/e2e/case/kafka/docker-compose.yml
index 4109262..ca16506 100644
--- a/tests/e2e/case/kafka/docker-compose.yml
+++ b/tests/e2e/case/kafka/docker-compose.yml
@@ -96,9 +96,9 @@ services:
     ports:
       - "9090"
     environment:
-      SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
+      SW_AGENT_COLLECTOR_ADDRESS: oap:11800
       SW_AGENT_PROTOCOL: kafka
-      SW_KAFKA_REPORTER_BOOTSTRAP_SERVERS: broker-a:9092,broker-b:9092
+      SW_AGENT_KAFKA_BOOTSTRAP_SERVERS: broker-a:9092,broker-b:9092
 
     depends_on:
       oap:
@@ -109,9 +109,9 @@ services:
       file: ../../base/docker-compose.base.yml
       service: consumer
     environment:
-      SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
+      SW_AGENT_COLLECTOR_ADDRESS: oap:11800
       SW_AGENT_PROTOCOL: kafka
-      SW_KAFKA_REPORTER_BOOTSTRAP_SERVERS: broker-a:9092,broker-b:9092
+      SW_AGENT_KAFKA_BOOTSTRAP_SERVERS: broker-a:9092,broker-b:9092
     ports:
       - "9090"
     depends_on:
diff --git a/tests/e2e/case/profiling/greenlet/docker-compose.yml b/tests/e2e/case/profiling/greenlet/docker-compose.yml
index 68bc3e6..f95a41d 100644
--- a/tests/e2e/case/profiling/greenlet/docker-compose.yml
+++ b/tests/e2e/case/profiling/greenlet/docker-compose.yml
@@ -37,7 +37,7 @@ services:
       - ../provider/entrypoint.py:/services/entrypoint.py
       - ./start_gevent.sh:/services/start_gevent.sh
     environment:
-      SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
+      SW_AGENT_COLLECTOR_ADDRESS: oap:11800
     depends_on:
       oap:
         condition: service_healthy
@@ -49,7 +49,7 @@ services:
       file: ../../../base/docker-compose.base.yml
       service: consumer
     environment:
-      SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
+      SW_AGENT_COLLECTOR_ADDRESS: oap:11800
     ports:
       - "9090"
     depends_on:
diff --git a/tests/e2e/case/profiling/threading/docker-compose.yml b/tests/e2e/case/profiling/threading/docker-compose.yml
index b24176a..2149b13 100644
--- a/tests/e2e/case/profiling/threading/docker-compose.yml
+++ b/tests/e2e/case/profiling/threading/docker-compose.yml
@@ -36,7 +36,7 @@ services:
     volumes:
       - ../provider/provider.py:/services/provider.py
     environment:
-      SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
+      SW_AGENT_COLLECTOR_ADDRESS: oap:11800
     depends_on:
       oap:
         condition: service_healthy
@@ -46,7 +46,7 @@ services:
       file: ../../../base/docker-compose.base.yml
       service: consumer
     environment:
-      SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
+      SW_AGENT_COLLECTOR_ADDRESS: oap:11800
     ports:
       - "9090"
     depends_on:
diff --git a/tests/plugin/data/sw_elasticsearch/docker-compose.yml b/tests/plugin/data/sw_elasticsearch/docker-compose.yml
index feb4807..4de169c 100644
--- a/tests/plugin/data/sw_elasticsearch/docker-compose.yml
+++ b/tests/plugin/data/sw_elasticsearch/docker-compose.yml
@@ -57,8 +57,8 @@ services:
       elasticsearch:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      SW_ELASTICSEARCH_TRACE_DSL: 'True'
+      SW_AGENT_ELASTICSEARCH_TRACE_DSL: 'True'
 networks:
   beyond:
diff --git a/tests/plugin/data/sw_happybase/docker-compose.yml b/tests/plugin/data/sw_happybase/docker-compose.yml
index ee683df..01c7f08 100644
--- a/tests/plugin/data/sw_happybase/docker-compose.yml
+++ b/tests/plugin/data/sw_happybase/docker-compose.yml
@@ -51,8 +51,8 @@ services:
       hbase:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      SW_ELASTICSEARCH_TRACE_DSL: 'True'
+      SW_AGENT_ELASTICSEARCH_TRACE_DSL: 'True'
 networks:
   beyond:
diff --git a/tests/plugin/data/sw_kafka/docker-compose.yml b/tests/plugin/data/sw_kafka/docker-compose.yml
index 618aeb5..d8bf993 100644
--- a/tests/plugin/data/sw_kafka/docker-compose.yml
+++ b/tests/plugin/data/sw_kafka/docker-compose.yml
@@ -79,7 +79,7 @@ services:
       consumer:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: producer
+      SW_AGENT_SERVICE_NAME: producer
       SW_AGENT_LOGGING_LEVEL: INFO
 
   consumer:
@@ -102,7 +102,7 @@ services:
       kafka-server:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: INFO
 
 networks:
diff --git a/tests/plugin/data/sw_mysqlclient/docker-compose.yml b/tests/plugin/data/sw_mysqlclient/docker-compose.yml
index 9f37163..a4b6908 100644
--- a/tests/plugin/data/sw_mysqlclient/docker-compose.yml
+++ b/tests/plugin/data/sw_mysqlclient/docker-compose.yml
@@ -61,9 +61,9 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      SW_SQL_PARAMETERS_LENGTH: 512
+      SW_AGENT_SQL_PARAMETERS_LENGTH: 512
 
   consumer:
     extends:
@@ -80,7 +80,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tests/plugin/data/sw_psycopg/docker-compose.yml b/tests/plugin/data/sw_psycopg/docker-compose.yml
index bc88f5e..3494cf5 100644
--- a/tests/plugin/data/sw_psycopg/docker-compose.yml
+++ b/tests/plugin/data/sw_psycopg/docker-compose.yml
@@ -61,9 +61,9 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      SW_SQL_PARAMETERS_LENGTH: 512
+      SW_AGENT_SQL_PARAMETERS_LENGTH: 512
 
   consumer:
     extends:
@@ -80,7 +80,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tests/plugin/data/sw_psycopg2/docker-compose.yml b/tests/plugin/data/sw_psycopg2/docker-compose.yml
index a564216..d7000e2 100644
--- a/tests/plugin/data/sw_psycopg2/docker-compose.yml
+++ b/tests/plugin/data/sw_psycopg2/docker-compose.yml
@@ -60,9 +60,9 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      SW_SQL_PARAMETERS_LENGTH: 512
+      SW_AGENT_SQL_PARAMETERS_LENGTH: 512
 
   consumer:
     extends:
@@ -79,7 +79,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tests/plugin/data/sw_pymongo/docker-compose.yml b/tests/plugin/data/sw_pymongo/docker-compose.yml
index 588db5b..e829c0a 100644
--- a/tests/plugin/data/sw_pymongo/docker-compose.yml
+++ b/tests/plugin/data/sw_pymongo/docker-compose.yml
@@ -56,9 +56,9 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      SW_PYMONGO_TRACE_PARAMETERS: 'True'
+      SW_AGENT_PYMONGO_TRACE_PARAMETERS: 'True'
 
   consumer:
     extends:
@@ -75,7 +75,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tests/plugin/data/sw_pymysql/docker-compose.yml b/tests/plugin/data/sw_pymysql/docker-compose.yml
index 311ec43..d6f98f2 100644
--- a/tests/plugin/data/sw_pymysql/docker-compose.yml
+++ b/tests/plugin/data/sw_pymysql/docker-compose.yml
@@ -60,9 +60,9 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      SW_SQL_PARAMETERS_LENGTH: 512
+      SW_AGENT_SQL_PARAMETERS_LENGTH: 512
 
   consumer:
     extends:
@@ -79,7 +79,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tests/plugin/data/sw_rabbitmq/docker-compose.yml b/tests/plugin/data/sw_rabbitmq/docker-compose.yml
index 66d49dd..a8453b8 100644
--- a/tests/plugin/data/sw_rabbitmq/docker-compose.yml
+++ b/tests/plugin/data/sw_rabbitmq/docker-compose.yml
@@ -63,7 +63,7 @@ services:
       consumer:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: producer
+      SW_AGENT_SERVICE_NAME: producer
       SW_AGENT_LOGGING_LEVEL: INFO
 
   consumer:
@@ -86,7 +86,7 @@ services:
       rabbitmq-server:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: INFO
 
 networks:
diff --git a/tests/plugin/data/sw_redis/docker-compose.yml b/tests/plugin/data/sw_redis/docker-compose.yml
index 468cf64..4b2aabb 100644
--- a/tests/plugin/data/sw_redis/docker-compose.yml
+++ b/tests/plugin/data/sw_redis/docker-compose.yml
@@ -54,7 +54,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -72,7 +72,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tests/plugin/docker-compose.base.yml b/tests/plugin/docker-compose.base.yml
index 3f04210..faf67ee 100644
--- a/tests/plugin/docker-compose.base.yml
+++ b/tests/plugin/docker-compose.base.yml
@@ -35,10 +35,9 @@ services:
   agent:
     image: apache/skywalking-python-agent:latest-plugin
     environment:
-      SW_AGENT_COLLECTOR_BACKEND_SERVICES: collector:19876
+      SW_AGENT_COLLECTOR_ADDRESS: collector:19876
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      # Agent test tool does not support profiling, TODO: address in e2e ref: #155
-      SW_AGENT_PROFILE_ACTIVE: 'False'
+      SW_AGENT_PROFILER_ACTIVE: 'False'
     networks:
       - beyond
     command: ['python3', '/entrypoint.py']
diff --git a/tests/plugin/http/sw_aiohttp/docker-compose.yml b/tests/plugin/http/sw_aiohttp/docker-compose.yml
index ad9f832..bd9617c 100644
--- a/tests/plugin/http/sw_aiohttp/docker-compose.yml
+++ b/tests/plugin/http/sw_aiohttp/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -59,7 +59,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tests/plugin/http/sw_http/docker-compose.yml b/tests/plugin/http/sw_http/docker-compose.yml
index f5c5fb3..e4fc0b3 100644
--- a/tests/plugin/http/sw_http/docker-compose.yml
+++ b/tests/plugin/http/sw_http/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -59,7 +59,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tests/plugin/http/sw_http_wsgi/docker-compose.yml b/tests/plugin/http/sw_http_wsgi/docker-compose.yml
index 99f1950..2250952 100644
--- a/tests/plugin/http/sw_http_wsgi/docker-compose.yml
+++ b/tests/plugin/http/sw_http_wsgi/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -59,7 +59,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tests/plugin/http/sw_requests/docker-compose.yml b/tests/plugin/http/sw_requests/docker-compose.yml
index 0b66033..06eda43 100644
--- a/tests/plugin/http/sw_requests/docker-compose.yml
+++ b/tests/plugin/http/sw_requests/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -59,7 +59,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tests/plugin/http/sw_urllib3/docker-compose.yml b/tests/plugin/http/sw_urllib3/docker-compose.yml
index e3dac0a..c13fe0a 100644
--- a/tests/plugin/http/sw_urllib3/docker-compose.yml
+++ b/tests/plugin/http/sw_urllib3/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -59,7 +59,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tests/plugin/http/sw_websockets/docker-compose.yml b/tests/plugin/http/sw_websockets/docker-compose.yml
index 7289292..be4e9d6 100644
--- a/tests/plugin/http/sw_websockets/docker-compose.yml
+++ b/tests/plugin/http/sw_websockets/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -59,9 +59,9 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      SW_FASTAPI_COLLECT_HTTP_PARAMS: 'True'
+      SW_AGENT_FASTAPI_COLLECT_HTTP_PARAMS: 'True'
 
 networks:
   beyond:
diff --git a/tests/plugin/web/sw_bottle/docker-compose.yml b/tests/plugin/web/sw_bottle/docker-compose.yml
index c8e0979..54d6297 100644
--- a/tests/plugin/web/sw_bottle/docker-compose.yml
+++ b/tests/plugin/web/sw_bottle/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -59,9 +59,9 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      SW_BOTTLE_COLLECT_HTTP_PARAMS: 'True'
+      SW_AGENT_BOTTLE_COLLECT_HTTP_PARAMS: 'True'
 
 networks:
   beyond:
diff --git a/tests/plugin/web/sw_django/docker-compose.yml b/tests/plugin/web/sw_django/docker-compose.yml
index 242d234..40b2c9a 100644
--- a/tests/plugin/web/sw_django/docker-compose.yml
+++ b/tests/plugin/web/sw_django/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -59,9 +59,9 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      SW_DJANGO_COLLECT_HTTP_PARAMS: 'True'
+      SW_AGENT_DJANGO_COLLECT_HTTP_PARAMS: 'True'
 
 networks:
   beyond:
diff --git a/tests/plugin/web/sw_falcon/docker-compose.yml b/tests/plugin/web/sw_falcon/docker-compose.yml
index 6cdba02..5602ab2 100644
--- a/tests/plugin/web/sw_falcon/docker-compose.yml
+++ b/tests/plugin/web/sw_falcon/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -59,7 +59,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tests/plugin/web/sw_fastapi/docker-compose.yml b/tests/plugin/web/sw_fastapi/docker-compose.yml
index d772499..94c9fef 100644
--- a/tests/plugin/web/sw_fastapi/docker-compose.yml
+++ b/tests/plugin/web/sw_fastapi/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -59,9 +59,9 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      SW_FASTAPI_COLLECT_HTTP_PARAMS: 'True'
+      SW_AGENT_FASTAPI_COLLECT_HTTP_PARAMS: 'True'
 
 
 networks:
diff --git a/tests/plugin/web/sw_flask/docker-compose.yml b/tests/plugin/web/sw_flask/docker-compose.yml
index 84f883e..5464757 100644
--- a/tests/plugin/web/sw_flask/docker-compose.yml
+++ b/tests/plugin/web/sw_flask/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -59,8 +59,8 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      SW_FLASK_COLLECT_HTTP_PARAMS: 'True'
+      SW_AGENT_FLASK_COLLECT_HTTP_PARAMS: 'True'
 networks:
   beyond:
diff --git a/tests/plugin/web/sw_pyramid/docker-compose.yml b/tests/plugin/web/sw_pyramid/docker-compose.yml
index 99f1950..2250952 100644
--- a/tests/plugin/web/sw_pyramid/docker-compose.yml
+++ b/tests/plugin/web/sw_pyramid/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -59,7 +59,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tests/plugin/web/sw_sanic/docker-compose.yml b/tests/plugin/web/sw_sanic/docker-compose.yml
index 0d311bc..d7f5106 100644
--- a/tests/plugin/web/sw_sanic/docker-compose.yml
+++ b/tests/plugin/web/sw_sanic/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
   consumer:
     extends:
@@ -58,8 +58,8 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
-      SW_SANIC_COLLECT_HTTP_PARAMS: 'True'
+      SW_AGENT_SANIC_COLLECT_HTTP_PARAMS: 'True'
 networks:
   beyond:
diff --git a/tests/plugin/web/sw_tornado/docker-compose.yml b/tests/plugin/web/sw_tornado/docker-compose.yml
index 424c7c6..0e29370 100644
--- a/tests/plugin/web/sw_tornado/docker-compose.yml
+++ b/tests/plugin/web/sw_tornado/docker-compose.yml
@@ -41,7 +41,7 @@ services:
       timeout: 60s
       retries: 120
     environment:
-      SW_AGENT_NAME: provider
+      SW_AGENT_SERVICE_NAME: provider
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
   consumer:
@@ -59,7 +59,7 @@ services:
       provider:
         condition: service_healthy
     environment:
-      SW_AGENT_NAME: consumer
+      SW_AGENT_SERVICE_NAME: consumer
       SW_AGENT_LOGGING_LEVEL: DEBUG
 
 networks:
diff --git a/tools/config_doc_gen.py b/tools/config_doc_gen.py
new file mode 100644
index 0000000..56da558
--- /dev/null
+++ b/tools/config_doc_gen.py
@@ -0,0 +1,134 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""
+A simple doc generator for configuration options
+"""
+from skywalking.config import options_with_default_value_and_type
+
+DOC_HEAD = """# Supported Agent Configuration Options
+
+Below is the full list of supported configurations you can set to
+customize the agent behavior, please take some time to read the descriptions for what they can achieve.
+
+> Usage: (Pass in intrusive setup)
+```
+from skywalking import config, agent
+config.init(YourConfiguration=YourValue))
+agent.start()
+```
+> Usage: (Pass by environment variables)
+```
+export SW_AGENT_YourConfiguration=YourValue
+```
+
+"""
+TABLE_HEAD = """### {}
+| Configuration | Environment Variable | Type | Default Value | Description |
+| :------------ | :------------ | :------------ | :------------ | :------------ |
+"""
+
+
+def comments_from_file(file_path):
+    """
+    Get comments from config.py
+    """
+    comments = []
+    analyze = False
+    comment_block_begin = False
+    with open(file_path, 'r') as config_file:
+        lines = config_file.readlines()
+        lines = [line.rstrip() for line in lines]
+        for line in lines:
+            if line.startswith('# THIS MUST PRECEDE DIRECTLY BEFORE LIST OF CONFIG OPTIONS!'):
+                analyze = True
+                continue
+            if line.startswith('# THIS MUST FOLLOW DIRECTLY AFTER LIST OF CONFIG OPTIONS!'):
+                break
+            if analyze and line.startswith('#'):
+                if line.startswith('# BEGIN'):
+                    comments.append(line)
+                    comment_block_begin = False
+                    continue
+                if comment_block_begin:
+                    comments[-1] += line.lstrip('#') if not comments[-1].endswith('/') else line.lstrip('# ')
+                    continue
+                comment_block_begin = True
+                comments.append(line.lstrip('# '))
+            else:  # not comment
+                if comment_block_begin:
+                    comment_block_begin = False
+        return comments
+
+
+def create_entry(comment: str, config_index: int) -> str:
+    """
+    Each configuration entry is matched with comment (blocks) by index
+    Args:
+        comment: comment block
+        config_index: index of comment block in the list of comments
+    Returns: markdown table entry
+    """
+
+    def env_var_name(config_entry):
+        return 'SW_AGENT_' + config_entry.upper()
+
+    configuration = list(options_with_default_value_and_type.keys())[config_index]
+    type_ = options_with_default_value_and_type[configuration][1]
+    default_val = options_with_default_value_and_type[configuration][0]
+
+    # special case for randomly generated default value
+    if configuration == 'service_instance':
+        default_val = "str(uuid.uuid1()).replace('-', '')"
+    return f'| {configuration} | {env_var_name(configuration)} | {str(type_)} | {default_val} | {comment} |'
+
+
+def generate_markdown_table() -> None:
+    """
+    Goes through each configuration entry and its comment block and generates markdown tables
+    """
+    comments = comments_from_file('skywalking/config.py')
+
+    with open('docs/en/setup/Configuration.md', 'w') as plugin_doc:
+        plugin_doc.write(DOC_HEAD)
+        offset = 0
+        for config_index, comment in enumerate(comments):
+            if comment.startswith('# BEGIN'):
+                # remove `#BEGIN: `
+                plugin_doc.write(TABLE_HEAD.format(comment[8:]))
+                offset += 1
+            else:
+                table_entry = create_entry(comment, config_index - offset)
+                plugin_doc.write(f'{table_entry}\n')
+
+
+def config_env_var_verify():
+    """
+    A naive checker to verify if all configuration entries have corresponding environment
+    (prevents common typo but not all)
+    """
+    with open('skywalking/config.py', 'r') as config_file:
+        data = config_file.read().replace('\n', '')
+        for each in options_with_default_value_and_type.keys():
+            if f"'SW_AGENT_{each.upper()}'" not in data:
+                raise Exception(f'Environment variable SW_AGENT_{each.upper()} is not found in config.py\n'
+                                f'This means you have a mismatch of config.py variable and env var name')
+
+
+if __name__ == '__main__':
+    generate_markdown_table()
+    config_env_var_verify()
diff --git a/tools/plugin_doc_gen.py b/tools/plugin_doc_gen.py
index 730123a..bec3130 100644
--- a/tools/plugin_doc_gen.py
+++ b/tools/plugin_doc_gen.py
@@ -36,7 +36,7 @@ or a limitation of SkyWalking auto-instrumentation (welcome to contribute!)
 
 """
 table_head = """### Plugin Support Table
-Library | Python Version - Lib Version | Plugin Name
+| Library | Python Version - Lib Version | Plugin Name |
 | :--- | :--- | :--- |
 """