Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 97b79b6

Browse files
authored
Rename ExportMetricsProtoSync to ExportMetricsProto (#189)
1 parent 93f882d commit 97b79b6

3 files changed

Lines changed: 6 additions & 13 deletions

File tree

equivalence_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ func TestEquivalenceStatsVsMetricsUploads(t *testing.T) {
337337
})
338338

339339
// Export the proto Metrics to the Stackdriver backend.
340-
se.ExportMetricsProtoSync(context.Background(), nil, nil, metricPbs)
340+
se.ExportMetricsProto(context.Background(), nil, nil, metricPbs)
341341
se.Flush()
342342

343343
var stackdriverTimeSeriesFromMetrics []*monitoringpb.CreateTimeSeriesRequest

metrics_proto.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ var percentileLabelKey = &metricspb.LabelKey{
4848
var globalResource = &resource.Resource{Type: "global"}
4949
var domains = []string{"googleapis.com", "kubernetes.io", "istio.io"}
5050

51-
// ExportMetricsProtoSync exports OpenCensus Metrics Proto to Stackdriver Monitoring synchronously,
51+
// ExportMetricsProto exports OpenCensus Metrics Proto to Stackdriver Monitoring synchronously,
5252
// without de-duping or adding proto metrics to the bundler.
53-
func (se *statsExporter) ExportMetricsProtoSync(ctx context.Context, node *commonpb.Node, rsc *resourcepb.Resource, metrics []*metricspb.Metric) error {
53+
func (se *statsExporter) ExportMetricsProto(ctx context.Context, node *commonpb.Node, rsc *resourcepb.Resource, metrics []*metricspb.Metric) error {
5454
if len(metrics) == 0 {
5555
return errNilMetricOrMetricDescriptor
5656
}

stackdriver.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -347,17 +347,10 @@ func (e *Exporter) ExportView(vd *view.Data) {
347347
e.statsExporter.ExportView(vd)
348348
}
349349

350-
// ExportMetricsProto exports OpenCensus Metrics Proto to Stackdriver Monitoring.
351-
func (e *Exporter) ExportMetricsProto(ctx context.Context, node *commonpb.Node, rsc *resourcepb.Resource, metrics []*metricspb.Metric) error {
352-
return e.statsExporter.ExportMetricsProtoSync(ctx, node, rsc, metrics)
353-
}
354-
355-
// ExportMetricsProtoSync exports OpenCensus Metrics Proto to Stackdriver Monitoring synchronously,
350+
// ExportMetricsProto exports OpenCensus Metrics Proto to Stackdriver Monitoring synchronously,
356351
// without de-duping or adding proto metrics to the bundler.
357-
//
358-
// Deprecated: experimental API for internal use at OpenTelemetry-Service only.
359-
func (e *Exporter) ExportMetricsProtoSync(ctx context.Context, node *commonpb.Node, rsc *resourcepb.Resource, metrics []*metricspb.Metric) error {
360-
return e.statsExporter.ExportMetricsProtoSync(ctx, node, rsc, metrics)
352+
func (e *Exporter) ExportMetricsProto(ctx context.Context, node *commonpb.Node, rsc *resourcepb.Resource, metrics []*metricspb.Metric) error {
353+
return e.statsExporter.ExportMetricsProto(ctx, node, rsc, metrics)
361354
}
362355

363356
// ExportMetrics exports OpenCensus Metrics to Stackdriver Monitoring

0 commit comments

Comments
 (0)