Skip to content

Commit

Permalink
fixing constant placement
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Tanaka <[email protected]>
  • Loading branch information
pedro-stanaka committed Sep 16, 2024
1 parent f20070c commit 8e92d4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/statsd/instrument/aggregator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

module StatsD
module Instrument
DEFAULT_MAX_CONTEXT_SIZE = 250

class AggregationKey
attr_reader :name, :tags, :no_prefix, :type, :hash

Expand All @@ -26,12 +24,15 @@ def ==(other)
end

class Aggregator
DEFAULT_MAX_CONTEXT_SIZE = 250

CONST_SAMPLE_RATE = 1.0
COUNT = :c
DISTRIBUTION = :d
MEASURE = :ms
HISTOGRAM = :h
GAUGE = :g
private_constant :COUNT, :DISTRIBUTION, :MEASURE, :HISTOGRAM, :GAUGE, :CONST_SAMPLE_RATE

class << self
def finalize(aggregation_state, sink, datagram_builders, datagram_builder_class, default_tags)
Expand Down
2 changes: 1 addition & 1 deletion lib/statsd/instrument/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def initialize(
datagram_builder_class: self.class.datagram_builder_class_for_implementation(implementation),
enable_aggregation: false,
aggregation_flush_interval: 2.0,
aggregation_max_context_size: Aggregator::DEFAULT_MAX_CONTEXT_SIZE
aggregation_max_context_size: StatsD::Instrument::Aggregator::DEFAULT_MAX_CONTEXT_SIZE
)
@sink = sink
@datagram_builder_class = datagram_builder_class
Expand Down

0 comments on commit 8e92d4e

Please sign in to comment.