kezhenxu94 commented on code in PR #231:
URL: https://github.com/apache/skywalking-python/pull/231#discussion_r967784458
##########
docs/en/setup/advanced/MeterReporter.md:
##########
@@ -0,0 +1,110 @@
+# Python Agent Meter Reporter
+
+To enable or disable this feature, you will need to set some environment
variables.
+
+
+## Enabling the feature (default)
+```Python
+os.environ['SW_AGENT_METER_REPORTER_ACTIVE'] = 'True'
+```
+or
+```bash
+export SW_AGENT_METER_REPORTER_ACTIVE=True
+```
+
+## Disable the feature
+```Python
+os.environ['SW_AGENT_METER_REPORTER_ACTIVE'] = 'False'
+```
+or
+```bash
+export SW_AGENT_METER_REPORTER_ACTIVE=False
+```
+## Counter
+* `Counter` API represents a single monotonically increasing counter,
automatic collect data and report to backend.
+```python
+tg_ls = [MeterTag("key", "value")]
Review Comment:
Would be awesome if we can just pass in a Python tuple
```suggestion
tg_ls = [("key", "value")]
```
##########
docs/en/setup/advanced/MeterReporter.md:
##########
@@ -0,0 +1,110 @@
+# Python Agent Meter Reporter
Review Comment:
Can you please also add a link in the menu to this doc?
https://github.com/apache/skywalking-python/blob/aad9034d4898a7f505f8347f28504353138a59d9/docs/menu.yml#L34-L38
##########
docs/en/setup/advanced/MeterReporter.md:
##########
@@ -0,0 +1,110 @@
+# Python Agent Meter Reporter
+
+To enable or disable this feature, you will need to set some environment
variables.
+
+
+## Enabling the feature (default)
+```Python
+os.environ['SW_AGENT_METER_REPORTER_ACTIVE'] = 'True'
+```
+or
+```bash
+export SW_AGENT_METER_REPORTER_ACTIVE=True
+```
+
+## Disable the feature
+```Python
+os.environ['SW_AGENT_METER_REPORTER_ACTIVE'] = 'False'
+```
+or
+```bash
+export SW_AGENT_METER_REPORTER_ACTIVE=False
+```
+## Counter
+* `Counter` API represents a single monotonically increasing counter,
automatic collect data and report to backend.
+```python
+tg_ls = [MeterTag("key", "value")]
+c = Counter('c2', CounterMode.INCREMENT, tg_ls)
+# or with more compact way
+# Counter('c2', CounterMode.INCREMENT).tag('key1', 'value1').tag('key2',
'value2')
+c.build()
+c.increment(2)
+```
+### Syntactic sugars
+```python
+c = Counter('c2', CounterMode.INCREMENT)
+c.build()
Review Comment:
Looks like every meter should invoke `build` after construction, what about
just embed the `build` inside the construction of the meters? So that users
won't forget to call the `build` method?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]