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

Commit d772c30

Browse files
authored
Run gofmt (#311)
1 parent 9ec418b commit d772c30

3 files changed

Lines changed: 18 additions & 15 deletions

File tree

stackdriver.go

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// Alternatively, pass the authentication options in both the MonitoringClientOptions
2525
// and the TraceClientOptions fields of Options.
2626
//
27-
// Stackdriver Monitoring
27+
// # Stackdriver Monitoring
2828
//
2929
// This exporter support exporting OpenCensus views to Stackdriver Monitoring.
3030
// Each registered view becomes a metric in Stackdriver Monitoring, with the
@@ -35,13 +35,13 @@
3535
//
3636
// In order to be able to push your stats to Stackdriver Monitoring, you must:
3737
//
38-
// 1. Create a Cloud project: https://support.google.com/cloud/answer/6251787?hl=en
39-
// 2. Enable billing: https://support.google.com/cloud/answer/6288653#new-billing
40-
// 3. Enable the Stackdriver Monitoring API: https://console.cloud.google.com/apis/dashboard
38+
// 1. Create a Cloud project: https://support.google.com/cloud/answer/6251787?hl=en
39+
// 2. Enable billing: https://support.google.com/cloud/answer/6288653#new-billing
40+
// 3. Enable the Stackdriver Monitoring API: https://console.cloud.google.com/apis/dashboard
4141
//
4242
// These steps enable the API but don't require that your app is hosted on Google Cloud Platform.
4343
//
44-
// Stackdriver Trace
44+
// # Stackdriver Trace
4545
//
4646
// This exporter supports exporting Trace Spans to Stackdriver Trace. It also
4747
// supports the Google "Cloud Trace" propagation format header.
@@ -418,12 +418,15 @@ func (e *Exporter) ExportMetrics(ctx context.Context, metrics []*metricdata.Metr
418418
// from all registered producers at set interval and exports them.
419419
// Use StopMetricsExporter to stop exporting metrics.
420420
// Previously, it required registering exporter to export stats collected by opencensus.
421-
// exporter := stackdriver.NewExporter(stackdriver.Option{})
422-
// view.RegisterExporter(exporter)
421+
//
422+
// exporter := stackdriver.NewExporter(stackdriver.Option{})
423+
// view.RegisterExporter(exporter)
424+
//
423425
// Now, it requires to call StartMetricsExporter() to export stats and metrics collected by opencensus.
424-
// exporter := stackdriver.NewExporter(stackdriver.Option{})
425-
// exporter.StartMetricsExporter()
426-
// defer exporter.StopMetricsExporter()
426+
//
427+
// exporter := stackdriver.NewExporter(stackdriver.Option{})
428+
// exporter.StartMetricsExporter()
429+
// defer exporter.StopMetricsExporter()
427430
//
428431
// Both approach should not be used simultaneously. Otherwise it may result into unknown behavior.
429432
// Previous approach continues to work as before but will not report newly define metrics such

stats.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,9 @@ var createServiceTimeSeries = func(ctx context.Context, c *monitoring.MetricClie
631631
}
632632

633633
// splitCreateTimeSeriesRequest splits a *monitoringpb.CreateTimeSeriesRequest object into two new objects:
634-
// * The first object only contains service time series.
635-
// * The second object only contains non-service time series.
634+
// - The first object only contains service time series.
635+
// - The second object only contains non-service time series.
636+
//
636637
// A returned object may be nil if no time series is found in the original request that satisfies the rules
637638
// above.
638639
// All other properties of the original CreateTimeSeriesRequest object are kept in the returned objects.
@@ -653,8 +654,8 @@ func splitCreateTimeSeriesRequest(req *monitoringpb.CreateTimeSeriesRequest) (*m
653654
}
654655

655656
// splitTimeSeries splits a []*monitoringpb.TimeSeries slice into two:
656-
// * The first slice only contains service time series
657-
// * The second slice only contains non-service time series
657+
// - The first slice only contains service time series
658+
// - The second slice only contains non-service time series
658659
func splitTimeSeries(timeSeries []*monitoringpb.TimeSeries) ([]*monitoringpb.TimeSeries, []*monitoringpb.TimeSeries) {
659660
var serviceTs, nonServiceTs []*monitoringpb.TimeSeries
660661
for _, ts := range timeSeries {

trace.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import (
3333

3434
// traceExporter is an implementation of trace.Exporter that uploads spans to
3535
// Stackdriver.
36-
//
3736
type traceExporter struct {
3837
o Options
3938
projectID string

0 commit comments

Comments
 (0)