Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[telemetry] optionally decouple telemetry destination from other metrics #558

Merged
merged 11 commits into from
Nov 20, 2020

Conversation

truthbk
Copy link
Member

@truthbk truthbk commented Apr 18, 2020

What does this PR do?

In some esoteric setups or testing it might be useful to submit telemetry statistics to a different dogstatsd server.

Description of the Change

This PR allows to set a different destination for telemetry metrics flushed.

Alternate Designs

No alternate designs were considered.

Possible Drawbacks

Added complexity to Dogstatsd constructor, could be confusing if not well documented.

Verification Process

Unit tests updated. Feature is being used for dogstatsd performance/feature testing currently.

Additional Notes

None.

Release Notes

Review checklist (to be filled by reviewers)

  • Feature or bug fix MUST have appropriate tests (unit, integration, etc...)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
  • PR should not have do-not-merge/ label attached.
  • If Applicable, issue must have kind/ and severity/ labels attached at least.

@truthbk truthbk requested a review from a team as a code owner April 18, 2020 01:40
Copy link
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.

One comment, LGTM otherwise

Comment on lines 53 to 54
telemetry_min_flush_interval=DEFAULT_TELEMETRY_MIN_FLUSH_INTERVAL,
telemetry_host=None, telemetry_port=DEFAULT_PORT, telemetry_socket_path=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we document the added params in the docstring please ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Absolutely, my bad.

Copy link
Member

Choose a reason for hiding this comment

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

We should use None too for the port, for the case where users change the port and want the telemetry to follow.

Copy link
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.

One quick typo, and lgtm

datadog/dogstatsd/base.py Outdated Show resolved Hide resolved
zippolyte
zippolyte previously approved these changes Apr 23, 2020
Comment on lines 53 to 54
telemetry_min_flush_interval=DEFAULT_TELEMETRY_MIN_FLUSH_INTERVAL,
telemetry_host=None, telemetry_port=DEFAULT_PORT, telemetry_socket_path=None):
Copy link
Member

Choose a reason for hiding this comment

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

We should use None too for the port, for the case where users change the port and want the telemetry to follow.

datadog/dogstatsd/base.py Show resolved Hide resolved
datadog/dogstatsd/base.py Outdated Show resolved Hide resolved
Copy link
Member

@hush-hush hush-hush left a comment

Choose a reason for hiding this comment

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

One last nit, looks good otherwise.

datadog/dogstatsd/base.py Outdated Show resolved Hide resolved
datadog/dogstatsd/base.py Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Jun 8, 2020

This issue has been automatically marked as stale because it has not had activity in the last 30 days.
Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity.

@github-actions github-actions bot added the stale Stale - Bot reminder label Jun 8, 2020

:envvar DD_TELEMETRY_PORT: the port for the dogstatsd server we wish to submit
telemetry stats to. If set, it overrides default value.
:type DD_TELEMETRY_HOST: string
Copy link

Choose a reason for hiding this comment

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

Should be DD_TELEMETRY_PORT in place of DD_TELEMETRY_HOST here, no ?

Copy link
Member Author

Choose a reason for hiding this comment

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

You're 100% right, thanks for pointing it out. We're bringing this PR back to life, hopefully we'll merge it soon.

hush-hush
hush-hush previously approved these changes Nov 16, 2020
@truthbk truthbk merged commit 2f45f38 into master Nov 20, 2020
@truthbk truthbk deleted the jaime/telemetryfork branch November 20, 2020 13:10
@skarimo skarimo added the changelog/Added Added features results into a minor version bump label Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/Added Added features results into a minor version bump stale Stale - Bot reminder
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants