Skip to content

Commit f2d3212

Browse files
metrics names to original ones
1 parent 33aab19 commit f2d3212

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

pkg/otlp/params.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ func Init(conf *Config, expc *exp.Config, log logrus.FieldLogger) error {
5555

5656
flushCount, err = meter.Int64Counter(
5757
fmt.Sprintf("%sflush_metrics", DefaultMetricPrefix),
58-
om.WithDescription("The number of times the output flushed"),
59-
om.WithUnit("1"))
58+
om.WithDescription("The number of times the output flushed"))
6059
if err != nil {
6160
return err
6261
}

pkg/otlp/wrapgauge.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
func newGaugeWrapper(id int, name string, isFloat bool, isTrend bool) (Wrapper, error) {
1313
if isFloat {
14-
fmetric, err := meter.Float64Gauge(name, om.WithUnit("ms"))
14+
fmetric, err := meter.Float64Gauge(name)
1515
if err != nil {
1616
return nil, err
1717
}
@@ -22,7 +22,7 @@ func newGaugeWrapper(id int, name string, isFloat bool, isTrend bool) (Wrapper,
2222
}, nil
2323
}
2424

25-
imetric, err := meter.Int64Gauge(name, om.WithUnit("1"))
25+
imetric, err := meter.Int64Gauge(name)
2626
if err != nil {
2727
return nil, err
2828
}

pkg/otlp/wraphistogram.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ import (
99

1010
func newHistogramWrapper(id int, name string, isFloat bool) (Wrapper, error) {
1111
if isFloat {
12-
fmetric, err := meter.Float64Histogram(name, om.WithUnit("ms"))
12+
fmetric, err := meter.Float64Histogram(name)
1313
if err != nil {
1414
return nil, err
1515
}
1616

1717
return &floatHistogramWrapper{id: id, metric: fmetric}, nil
1818
}
1919

20-
imetric, err := meter.Int64Histogram(name, om.WithUnit("1"))
20+
imetric, err := meter.Int64Histogram(name)
2121
if err != nil {
2222
return nil, err
2323
}

pkg/otlp/wrappcounter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func newCounterWrapper(id int, name string, isFloat bool) (Wrapper, error) {
1111
if isFloat {
12-
fmetric, err := meter.Float64Counter(name, om.WithUnit("ms"))
12+
fmetric, err := meter.Float64Counter(name)
1313
if err != nil {
1414
return nil, err
1515
}
@@ -19,7 +19,7 @@ func newCounterWrapper(id int, name string, isFloat bool) (Wrapper, error) {
1919
}, nil
2020
}
2121

22-
imetric, err := meter.Int64Counter(name, om.WithUnit("1"))
22+
imetric, err := meter.Int64Counter(name)
2323
if err != nil {
2424
return nil, err
2525
}

0 commit comments

Comments
 (0)