Skip to content

Commit

Permalink
Allow non-integral values for kafka_span_sample_rate_percent
Browse files Browse the repository at this point in the history
  • Loading branch information
ChimeraCoder committed May 7, 2018
1 parent edf9e9d commit e02cd0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Config struct {
KafkaSpanBufferFrequency string `yaml:"kafka_span_buffer_frequency"`
KafkaSpanBufferMesages int `yaml:"kafka_span_buffer_mesages"`
KafkaSpanRequireAcks string `yaml:"kafka_span_require_acks"`
KafkaSpanSampleRatePercent int `yaml:"kafka_span_sample_rate_percent"`
KafkaSpanSampleRatePercent float64 `yaml:"kafka_span_sample_rate_percent"`
KafkaSpanSampleTag string `yaml:"kafka_span_sample_tag"`
KafkaSpanSerializationFormat string `yaml:"kafka_span_serialization_format"`
KafkaSpanTopic string `yaml:"kafka_span_topic"`
Expand Down
6 changes: 2 additions & 4 deletions example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,8 @@ kafka_span_topic: "veneur_spans"
# of traceID
kafka_span_sample_tag: ""

# Sample rate in percent (as an integer)
# This should ideally be a floating point number, but at the time this was
# written, gojson interpreted whole-number floats in yaml as integers.
kafka_span_sample_rate_percent: 100
# Percentage of spans that will be sent to the Kafka sink
kafka_span_sample_rate_percent: 2.0

kafka_metric_buffer_bytes: 0

Expand Down

0 comments on commit e02cd0a

Please sign in to comment.