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

Add sample rate support for counter, transfer gauge to double and tra… #1361

Merged

Conversation

gavindoudou
Copy link
Contributor

…nsfer counter to int only.

Description:

  • Add sample rate support for counter
    If we receive counterName:10|c|@0.1, we will transfer the value to 10/0.1 = 100 to the following process
  • Transfer gauge to double only
    After discussion, we plan to transfer gauge to double only no matter what we receive
    gaugeName:86|g will be transferred to 86.0 as Double_Gauge only
  • Transfer counter to int only
    After discussion, we plan to transfer counter to int only no matter what we receive
    counterName:86|c will be transferred to 86 as Int only

Link to tracking Issue:

Testing:

  • Added unit tests

@gavindoudou gavindoudou requested review from jmacd and a team as code owners October 23, 2020 03:40
@project-bot project-bot bot added this to In progress in Collector Oct 23, 2020
@nilebox nilebox assigned keitwb and jmacd and unassigned nilebox Oct 23, 2020
Collector automation moved this from In progress to Reviewer approved Oct 23, 2020
@bogdandrutu
Copy link
Member

Not an expert in statsd protocol, @pmcollins @jrcamp take a look?

Copy link
Contributor

@keitwb keitwb left a comment

Choose a reason for hiding this comment

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

This needs to be converted to use pdata.Metrics at some point, but for what your stated changes are this looks good.

@tigrannajaryan tigrannajaryan merged commit 7880bd0 into open-telemetry:master Oct 26, 2020
Collector automation moved this from Reviewer approved to Done Oct 26, 2020
dyladan referenced this pull request in dynatrace-oss-contrib/opentelemetry-collector-contrib Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Collector
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

7 participants