Skip to content

Commit

Permalink
Fix a grammatical error in the python example. (open-telemetry#2293)
Browse files Browse the repository at this point in the history
* Fix a grammatical error of the python example.

 - remove useless "}"
 - using only "}" without "{" makes grammatical errors in Python

* rename function Add to add

it's following "Style Guide"
see [PEP 8 Guide](https://www.python.org/dev/peps/pep-0008/#function-and-variable-names)

Co-authored-by: Bogdan Drutu <[email protected]>
  • Loading branch information
hong9lol and bogdandrutu authored Feb 8, 2022
1 parent 6e1cbb0 commit ec2e118
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions specification/metrics/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ consider:
```python
# Python

exception_counter.Add(1, {"exception_type": "IOError", "handled_by_user": True})
exception_counter.Add(1, exception_type="IOError", handled_by_user=True})
exception_counter.add(1, {"exception_type": "IOError", "handled_by_user": True})
exception_counter.add(1, exception_type="IOError", handled_by_user=True)
```

```csharp
Expand Down Expand Up @@ -832,8 +832,8 @@ API](../overview.md#api) authors might consider:

```python
# Python
customers_in_store.Add(1, {"account.type": "commercial"})
customers_in_store.Add(-1, account_type="residential")
customers_in_store.add(1, {"account.type": "commercial"})
customers_in_store.add(-1, account_type="residential")
```

```csharp
Expand Down

0 comments on commit ec2e118

Please sign in to comment.