Skip to content

Commit

Permalink
Use new type name (Metrics) instead of old one (MetricsData)
Browse files Browse the repository at this point in the history
  • Loading branch information
mx-psi committed Jan 18, 2021
1 parent 6f772bf commit aa689df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion consumer/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"go.opentelemetry.io/collector/consumer/pdata"
)

// MetricsConsumer is the new metrics consumer interface that receives pdata.MetricData, processes it
// MetricsConsumer is the new metrics consumer interface that receives pdata.Metrics, processes it
// as needed, and sends it to the next processing node if any or to the destination.
type MetricsConsumer interface {
ConsumeMetrics(ctx context.Context, md pdata.Metrics) error
Expand Down
6 changes: 3 additions & 3 deletions consumer/pdata/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ type Metrics struct {
orig *[]*otlpmetrics.ResourceMetrics
}

// NewMetricData creates a new MetricData.
// NewMetrics creates a new Metrics.
func NewMetrics() Metrics {
orig := []*otlpmetrics.ResourceMetrics(nil)
return Metrics{&orig}
}

// MetricDataFromOtlp creates the internal MetricData representation from the OTLP.
// MetricsFromOtlp creates the internal Metrics representation from the OTLP.
func MetricsFromOtlp(orig []*otlpmetrics.ResourceMetrics) Metrics {
return Metrics{&orig}
}

// MetricDataToOtlp converts the internal MetricData to the OTLP.
// MetricsToOtlp converts the internal Metrics to the OTLP.
func MetricsToOtlp(md Metrics) []*otlpmetrics.ResourceMetrics {
return *md.orig
}
Expand Down

0 comments on commit aa689df

Please sign in to comment.