rename metrics.go to metrics_proto.go. (#107)
diff --git a/metrics.go b/metrics_proto.go
similarity index 98%
rename from metrics.go
rename to metrics_proto.go
index c37cbad..e897f70 100644
--- a/metrics.go
+++ b/metrics_proto.go
@@ -43,7 +43,7 @@
var errNilMetric = errors.New("expecting a non-nil metric")
-type metricPayload struct {
+type metricProtoPayload struct {
node *commonpb.Node
resource *resourcepb.Resource
metric *metricspb.Metric
@@ -56,7 +56,7 @@
}
for _, metric := range metrics {
- payload := &metricPayload{
+ payload := &metricProtoPayload{
metric: metric,
resource: rsc,
node: node,
@@ -67,7 +67,7 @@
return nil
}
-func (se *statsExporter) handleMetricsUpload(payloads []*metricPayload) error {
+func (se *statsExporter) handleMetricsProtoUpload(payloads []*metricProtoPayload) error {
ctx, cancel := se.o.newContextWithTimeout()
defer cancel()
diff --git a/metrics_test.go b/metrics_proto_test.go
similarity index 100%
rename from metrics_test.go
rename to metrics_proto_test.go
diff --git a/stats.go b/stats.go
index 9a404b8..c0f543e 100644
--- a/stats.go
+++ b/stats.go
@@ -108,9 +108,9 @@
vds := bundle.([]*view.Data)
e.handleUpload(vds...)
})
- e.protoMetricsBundler = bundler.NewBundler((*metricPayload)(nil), func(bundle interface{}) {
- payloads := bundle.([]*metricPayload)
- e.handleMetricsUpload(payloads)
+ e.protoMetricsBundler = bundler.NewBundler((*metricProtoPayload)(nil), func(bundle interface{}) {
+ payloads := bundle.([]*metricProtoPayload)
+ e.handleMetricsProtoUpload(payloads)
})
if delayThreshold := e.o.BundleDelayThreshold; delayThreshold > 0 {
e.viewDataBundler.DelayThreshold = delayThreshold