Skip to content

Clarify docstring for metrics#463

Merged
zippolyte merged 3 commits intoDataDog:masterfrom
dabcoder:davidb/metric-docstring
Oct 16, 2019
Merged

Clarify docstring for metrics#463
zippolyte merged 3 commits intoDataDog:masterfrom
dabcoder:davidb/metric-docstring

Conversation

@dabcoder
Copy link
Copy Markdown

Addresses #269.

@dabcoder dabcoder requested a review from a team as a code owner October 16, 2019 08:34
@@ -54,6 +54,12 @@ def send(cls, metrics=None, attach_host_name=True, **single_metric):
:param metric: the name of the time series
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's just describe more explicitly in the main description above what a metric dict should look like

Copy link
Copy Markdown
Contributor

@zippolyte zippolyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 final nit, and we're good :)

>>> api.Metric.send(metric='my.series', points=[(now, 15), (future_10s, 16)])

>>> metrics = [{'metric': 'my.series', 'type': 'gauge', 'points': [(now, 15), (future_10s, 16)]},
>>> {'metric': 'my.series', 'type': 'gauge', 'points': [(now, 15), (future_10s, 16)]}]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
>>> {'metric': 'my.series', 'type': 'gauge', 'points': [(now, 15), (future_10s, 16)]}]
{'metric': 'my.series2', 'type': 'gauge', 'points': [(now, 15), (future_10s, 16)]}]

@zippolyte zippolyte merged commit 75b5327 into DataDog:master Oct 16, 2019
dabcoder pushed a commit to dabcoder/datadogpy that referenced this pull request Oct 25, 2019
@dabcoder dabcoder deleted the davidb/metric-docstring branch November 7, 2019 12:32
dabcoder pushed a commit to dabcoder/datadogpy that referenced this pull request Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants