Skip to content

Commit

Permalink
Fix PR feedback: improve comment and remove double colons
Browse files Browse the repository at this point in the history
  • Loading branch information
Achooo committed Aug 3, 2023
1 parent 3e7bd17 commit d355427
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions agent/hcp/telemetry/otel_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type MetricsClient interface {
// EndpointProvider provides the endpoint where metrics are exported to by the OTELExporter.
// EndpointProvider exposes the GetEndpoint() interface method to fetch the endpoint.
// This abstraction layer offers flexibility, in particular for dynamic configuration or changes to the endpoint.
// The OTELExporter calls the Disabled interface to verify that it should actually export metrics.
type EndpointProvider interface {
Disabled
GetEndpoint() *url.URL
Expand Down
4 changes: 2 additions & 2 deletions agent/hcp/telemetry/otlp_transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func metricTypeToPB(m metricdata.Metrics) (*mpb.Metric, error) {
}
case metricdata.Histogram[float64]:
if a.Temporality != metricdata.CumulativeTemporality {
return out, fmt.Errorf("failed to convert metric to otel format:: %w: %T", errTemporality, a)
return out, fmt.Errorf("failed to convert metric to otel format: %w: %T", errTemporality, a)
}
out.Data = &mpb.Metric_Histogram{
Histogram: &mpb.Histogram{
Expand All @@ -116,7 +116,7 @@ func metricTypeToPB(m metricdata.Metrics) (*mpb.Metric, error) {
},
}
default:
return out, fmt.Errorf("failed to convert metric to otel format:: %w: %T", errAggregaton, a)
return out, fmt.Errorf("failed to convert metric to otel format: %w: %T", errAggregaton, a)
}
return out, nil
}
Expand Down

0 comments on commit d355427

Please sign in to comment.