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

[demultiplexer] change the API to something clearer about DSD samples and timed samples #13247

Merged
merged 3 commits into from
Aug 31, 2022

Conversation

remeh
Copy link
Contributor

@remeh remeh commented Aug 25, 2022

What does this PR do?

Renamed some methods in the Demultiplexer interface:

  • AddTimeSample is only used to aggregate DogStatsD sample, it makes better sense named AggregateSample
  • AddTimeSampleBatch is only used to aggregate DogStatsD samples, it makes better sense named AggregateSamples
  • AddLateMetrics is only about sending timed samples to the no-agg pipeline, it makes better sense named SendSamplesWithoutAggregation
  • AddCheckSample is about aggregating check sample, better named AggregateCheckSample

Motivation

Clearer API in the Demultiplexers implementations.

Describe how to test/QA your changes

If DogStatsD traffic is still working, we're fine, it's just a renaming PR.

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • A release note has been added or the changelog/no-changelog label has been applied.
  • Changed code has automated tests for its functionality.
  • Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
  • At least one team/.. label has been applied, indicating the team(s) that should QA this change.
  • If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • If applicable, the need-change/operator and need-change/helm labels have been applied.
  • If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
  • If applicable, the config template has been updated.

… and timed samples.

  * `AddTimeSample` is only used to add DogStatsD sample, it makes better sense
named `AddDSDSample`
  * `AddTimeSampleBatch` is only used to add DogStatsD sample, it makes better sense
named `AddDSDSamples`
  * `AddLateMetrics` is only about sending timed samples to the no-agg pipeline,
it makes better sense named `AddTimedSample`
`AddDSDSample` -> `AggregateSample`
`AddDSDSamples` -> `AggregateSamples`
`AddTimedSample` -> `SendSamplesWithoutAggregation`
`AddCheckSample` -> `AggregateCheckSample`
Copy link
Contributor

@purple4reina purple4reina left a comment

Choose a reason for hiding this comment

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

All looks good to me!

@remeh remeh merged commit 2024e4c into main Aug 31, 2022
@remeh remeh deleted the remeh/no-agg-api branch August 31, 2022 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants