From 41cd10ff423ed2594356163d89a624c470beb0e7 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Fri, 27 Nov 2020 22:52:19 -0800 Subject: [PATCH 01/35] Push->basic --- sdk/metric/controller/{push => basic}/config.go | 0 sdk/metric/controller/{push => basic}/config_test.go | 0 sdk/metric/controller/{push => basic}/push.go | 0 sdk/metric/controller/{push => basic}/push_test.go | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename sdk/metric/controller/{push => basic}/config.go (100%) rename sdk/metric/controller/{push => basic}/config_test.go (100%) rename sdk/metric/controller/{push => basic}/push.go (100%) rename sdk/metric/controller/{push => basic}/push_test.go (100%) diff --git a/sdk/metric/controller/push/config.go b/sdk/metric/controller/basic/config.go similarity index 100% rename from sdk/metric/controller/push/config.go rename to sdk/metric/controller/basic/config.go diff --git a/sdk/metric/controller/push/config_test.go b/sdk/metric/controller/basic/config_test.go similarity index 100% rename from sdk/metric/controller/push/config_test.go rename to sdk/metric/controller/basic/config_test.go diff --git a/sdk/metric/controller/push/push.go b/sdk/metric/controller/basic/push.go similarity index 100% rename from sdk/metric/controller/push/push.go rename to sdk/metric/controller/basic/push.go diff --git a/sdk/metric/controller/push/push_test.go b/sdk/metric/controller/basic/push_test.go similarity index 100% rename from sdk/metric/controller/push/push_test.go rename to sdk/metric/controller/basic/push_test.go From a4cc1909ce14c5a36136d0d179ec91727ef027f5 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Fri, 27 Nov 2020 22:57:17 -0800 Subject: [PATCH 02/35] Repackage --- sdk/metric/controller/basic/config.go | 4 ++-- sdk/metric/controller/basic/config_test.go | 2 +- sdk/metric/controller/basic/push.go | 2 +- sdk/metric/controller/basic/push_test.go | 24 +++++++++++----------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sdk/metric/controller/basic/config.go b/sdk/metric/controller/basic/config.go index d708780d685..e2225f66ee4 100644 --- a/sdk/metric/controller/basic/config.go +++ b/sdk/metric/controller/basic/config.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package push // import "go.opentelemetry.io/otel/sdk/metric/controller/push" +package basic // import "go.opentelemetry.io/otel/sdk/metric/controller/basic" import ( "time" @@ -20,7 +20,7 @@ import ( "go.opentelemetry.io/otel/sdk/resource" ) -// Config contains configuration for a push Controller. +// Config contains configuration for a basic Controller. type Config struct { // Resource is the OpenTelemetry resource associated with all Meters // created by the Controller. diff --git a/sdk/metric/controller/basic/config_test.go b/sdk/metric/controller/basic/config_test.go index 899d5ade41b..b9210d6c334 100644 --- a/sdk/metric/controller/basic/config_test.go +++ b/sdk/metric/controller/basic/config_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package push +package basic import ( "testing" diff --git a/sdk/metric/controller/basic/push.go b/sdk/metric/controller/basic/push.go index 4350de32de5..8a679fef4ea 100644 --- a/sdk/metric/controller/basic/push.go +++ b/sdk/metric/controller/basic/push.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package push // import "go.opentelemetry.io/otel/sdk/metric/controller/push" +package basic // import "go.opentelemetry.io/otel/sdk/metric/controller/basic" import ( "context" diff --git a/sdk/metric/controller/basic/push_test.go b/sdk/metric/controller/basic/push_test.go index 17c21f29703..3ff5d485cc4 100644 --- a/sdk/metric/controller/basic/push_test.go +++ b/sdk/metric/controller/basic/push_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package push_test +package basic_test import ( "context" @@ -29,9 +29,9 @@ import ( "go.opentelemetry.io/otel/metric" export "go.opentelemetry.io/otel/sdk/export/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" + controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" "go.opentelemetry.io/otel/sdk/metric/controller/controllertest" - "go.opentelemetry.io/otel/sdk/metric/controller/push" - "go.opentelemetry.io/otel/sdk/metric/processor/basic" + processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" processorTest "go.opentelemetry.io/otel/sdk/metric/processor/processortest" "go.opentelemetry.io/otel/sdk/resource" ) @@ -83,7 +83,7 @@ func newCheckpointer() export.Checkpointer { func TestPushDoubleStop(t *testing.T) { exporter := newExporter() checkpointer := newCheckpointer() - p := push.New(checkpointer, exporter) + p := controller.New(checkpointer, exporter) p.Start() p.Stop() p.Stop() @@ -92,7 +92,7 @@ func TestPushDoubleStop(t *testing.T) { func TestPushDoubleStart(t *testing.T) { exporter := newExporter() checkpointer := newCheckpointer() - p := push.New(checkpointer, exporter) + p := controller.New(checkpointer, exporter) p.Start() p.Start() p.Stop() @@ -101,11 +101,11 @@ func TestPushDoubleStart(t *testing.T) { func TestPushTicker(t *testing.T) { exporter := newExporter() checkpointer := newCheckpointer() - p := push.New( + p := controller.New( checkpointer, exporter, - push.WithPeriod(time.Second), - push.WithResource(testResource), + controller.WithPeriod(time.Second), + controller.WithResource(testResource), ) meter := p.MeterProvider().Meter("name") @@ -180,12 +180,12 @@ func TestPushExportError(t *testing.T) { // This test validates the error handling // behavior of the basic Processor is honored // by the push processor. - checkpointer := basic.New(processorTest.AggregatorSelector(), exporter) - p := push.New( + checkpointer := processor.New(processorTest.AggregatorSelector(), exporter) + p := controller.New( checkpointer, exporter, - push.WithPeriod(time.Second), - push.WithResource(testResource), + controller.WithPeriod(time.Second), + controller.WithResource(testResource), ) mock := controllertest.NewMockClock() From d2eb0380070b67987f523c007ca9fcd6aa2e2a3a Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Fri, 27 Nov 2020 22:58:09 -0800 Subject: [PATCH 03/35] Rename away from push --- sdk/metric/controller/basic/{push.go => controller.go} | 0 sdk/metric/controller/basic/{push_test.go => controller_test.go} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename sdk/metric/controller/basic/{push.go => controller.go} (100%) rename sdk/metric/controller/basic/{push_test.go => controller_test.go} (100%) diff --git a/sdk/metric/controller/basic/push.go b/sdk/metric/controller/basic/controller.go similarity index 100% rename from sdk/metric/controller/basic/push.go rename to sdk/metric/controller/basic/controller.go diff --git a/sdk/metric/controller/basic/push_test.go b/sdk/metric/controller/basic/controller_test.go similarity index 100% rename from sdk/metric/controller/basic/push_test.go rename to sdk/metric/controller/basic/controller_test.go From d421cb5a0daff6a316c2bf53c77fbd179c74edf0 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Sat, 28 Nov 2020 00:40:07 -0800 Subject: [PATCH 04/35] Make exporter optional; export from a separate goroutine --- sdk/metric/controller/basic/config.go | 81 +++++++--- sdk/metric/controller/basic/controller.go | 152 +++++++++++++----- .../controller/basic/controller_test.go | 12 +- sdk/metric/sdk.go | 3 +- 4 files changed, 182 insertions(+), 66 deletions(-) diff --git a/sdk/metric/controller/basic/config.go b/sdk/metric/controller/basic/config.go index e2225f66ee4..03759bd7bd0 100644 --- a/sdk/metric/controller/basic/config.go +++ b/sdk/metric/controller/basic/config.go @@ -18,6 +18,7 @@ import ( "time" "go.opentelemetry.io/otel/sdk/resource" + export "go.opentelemetry.io/otel/sdk/export/metric" ) // Config contains configuration for a basic Controller. @@ -26,13 +27,32 @@ type Config struct { // created by the Controller. Resource *resource.Resource - // Period is the interval between calls to Collect a checkpoint. - Period time.Duration - - // Timeout is the duration a collection (i.e. collect, accumulate, - // integrate, and export) can last before it is canceled. Defaults to - // the controller push period. - Timeout time.Duration + // CollectPeriod is the interval between calls to Collect a + // checkpoint. + // + // When pulling metrics and not exporting, this is the minimum + // time between calls to Collect. In a pull-only + // configuration, collection is performed on demand; set + // CollectPeriod to 0 always recompute the export record set. + // + // When exporting metrics, this must be > 0. + // + // Default value is 10s. + CollectPeriod time.Duration + + // CollectTimeout is the timeout of the Context passed to + // Collect() and subsequently to Observer instrument callbacks. + // + // Defaults to the configured collection period (see CollectPeriod). + CollectTimeout time.Duration + + // Exporter is used for pushing metric data. + Exporter export.Exporter + + // ExportTimeout is the timeout of the Context when an Exporter is configured. + // + // Defaults to the configured collection period (see CollectPeriod). + ExportTimeout time.Duration } // Option is the interface that applies the value to a configuration option. @@ -52,24 +72,47 @@ func (o resourceOption) Apply(config *Config) { config.Resource = o.Resource } -// WithPeriod sets the Period configuration option of a Config. -func WithPeriod(period time.Duration) Option { - return periodOption(period) +// WithCollectPeriod sets the CollectPeriod configuration option of a Config. +func WithCollectPeriod(period time.Duration) Option { + return collectPeriodOption(period) +} + +type collectPeriodOption time.Duration + +func (o collectPeriodOption) Apply(config *Config) { + config.CollectPeriod = time.Duration(o) +} + +// WithCollectTimeout sets the CollectTimeout configuration option of a Config. +func WithCollectTimeout(timeout time.Duration) Option { + return collectTimeoutOption(timeout) } -type periodOption time.Duration +type collectTimeoutOption time.Duration -func (o periodOption) Apply(config *Config) { - config.Period = time.Duration(o) +func (o collectTimeoutOption) Apply(config *Config) { + config.CollectTimeout = time.Duration(o) } -// WithTimeout sets the Timeout configuration option of a Config. -func WithTimeout(timeout time.Duration) Option { - return timeoutOption(timeout) +// WithExporter sets the Exporter configuration option of a Config. +func WithExporter(exporter export.Exporter) Option { + return exporterOption{exporter} } -type timeoutOption time.Duration +type exporterOption struct { export.Exporter } -func (o timeoutOption) Apply(config *Config) { - config.Timeout = time.Duration(o) +func (o exporterOption) Apply(config *Config) { + config.Exporter = o.Exporter } + +// WithExportTimeout sets the ExportTimeout configuration option of a Config. +func WithExportTimeout(timeout time.Duration) Option { + return exportTimeoutOption(timeout) +} + +type exportTimeoutOption time.Duration + +func (o exportTimeoutOption) Apply(config *Config) { + config.ExportTimeout = time.Duration(o) +} + diff --git a/sdk/metric/controller/basic/controller.go b/sdk/metric/controller/basic/controller.go index 8a679fef4ea..9487db563e4 100644 --- a/sdk/metric/controller/basic/controller.go +++ b/sdk/metric/controller/basic/controller.go @@ -27,36 +27,51 @@ import ( controllerTime "go.opentelemetry.io/otel/sdk/metric/controller/time" ) -// DefaultPushPeriod is the default time interval between pushes. -const DefaultPushPeriod = 10 * time.Second +// DefaultPeriod is the minimum time between collections, maximum time +// for Export(). +const DefaultPeriod = 10 * time.Second // Controller organizes a periodic push of metric data. type Controller struct { - lock sync.Mutex - accumulator *sdk.Accumulator - provider *registry.MeterProvider - checkpointer export.Checkpointer - exporter export.Exporter - wg sync.WaitGroup - ch chan struct{} - period time.Duration - timeout time.Duration - clock controllerTime.Clock - ticker controllerTime.Ticker + lock sync.Mutex + accumulator *sdk.Accumulator + provider *registry.MeterProvider + checkpointer export.Checkpointer + exporter export.Exporter + wg sync.WaitGroup + stopCh chan struct{} + exportRequestCh chan struct{} + exportResponseCh chan struct{} + clock controllerTime.Clock + ticker controllerTime.Ticker + + collectPeriod time.Duration + collectTimeout time.Duration + exportTimeout time.Duration } // New constructs a Controller, an implementation of MeterProvider, using the // provided checkpointer, exporter, and options to configure an SDK with // periodic collection. -func New(checkpointer export.Checkpointer, exporter export.Exporter, opts ...Option) *Controller { +func New(checkpointer export.Checkpointer, opts ...Option) *Controller { c := &Config{ - Period: DefaultPushPeriod, + CollectPeriod: DefaultPeriod, } for _, opt := range opts { opt.Apply(c) } - if c.Timeout == 0 { - c.Timeout = c.Period + if c.CollectTimeout == 0 { + c.CollectTimeout = c.CollectPeriod + } + + var exportRequestCh chan struct{} + var exportResponseCh chan struct{} + if c.Exporter != nil { + exportRequestCh = make(chan struct{}, 1) + exportResponseCh = make(chan struct{}, 1) + } + if c.ExportTimeout == 0 { + c.ExportTimeout = c.CollectPeriod } impl := sdk.NewAccumulator( @@ -64,14 +79,17 @@ func New(checkpointer export.Checkpointer, exporter export.Exporter, opts ...Opt c.Resource, ) return &Controller{ - provider: registry.NewMeterProvider(impl), - accumulator: impl, - checkpointer: checkpointer, - exporter: exporter, - ch: make(chan struct{}), - period: c.Period, - timeout: c.Timeout, - clock: controllerTime.RealClock{}, + provider: registry.NewMeterProvider(impl), + accumulator: impl, + checkpointer: checkpointer, + exporter: c.Exporter, + stopCh: make(chan struct{}), + collectPeriod: c.CollectPeriod, + collectTimeout: c.CollectTimeout, + exportTimeout: c.ExportTimeout, + exportRequestCh: exportRequestCh, + exportResponseCh: exportResponseCh, + clock: controllerTime.RealClock{}, } } @@ -98,9 +116,14 @@ func (c *Controller) Start() { return } - c.ticker = c.clock.Ticker(c.period) c.wg.Add(1) - go c.run(c.ch) + c.ticker = c.clock.Ticker(c.collectPeriod) + + if c.exporter != nil { + c.wg.Add(2) + go c.runTicker(c.stopCh) + go c.runExporter(c.stopCh) + } } // Stop waits for the background goroutine to return and then collects @@ -109,32 +132,58 @@ func (c *Controller) Stop() { c.lock.Lock() defer c.lock.Unlock() - if c.ch == nil { + if c.stopCh == nil { return } - close(c.ch) - c.ch = nil + close(c.stopCh) + c.stopCh = nil + c.wg.Done() c.wg.Wait() c.ticker.Stop() - c.tick() + c.collect(nil) } -func (c *Controller) run(ch chan struct{}) { +func (c *Controller) runTicker(stopCh chan struct{}) { + defer c.wg.Done() for { select { - case <-ch: - c.wg.Done() + case <-stopCh: return case <-c.ticker.C(): - c.tick() + c.collect(stopCh) } } } -func (c *Controller) tick() { - ctx, cancel := context.WithTimeout(context.Background(), c.timeout) +func (c *Controller) collect(stopCh chan struct{}) { + if c.exporter != nil { + // Wait for the previous export to finish or timeout. + select { + case <-c.exportResponseCh: + // ok + case <-stopCh: + return + } + + } + if err := c.checkpoint(); err != nil { + otel.Handle(err) + } + if c.exporter != nil { + // Begin a new export. + select { + case c.exportRequestCh <- struct{}{}: + // ok + case <-stopCh: + return + } + } +} + +func (c *Controller) checkpoint() error { + ctx, cancel := context.WithTimeout(context.Background(), c.collectTimeout) defer cancel() ckpt := c.checkpointer.CheckpointSet() @@ -143,9 +192,34 @@ func (c *Controller) tick() { c.checkpointer.StartCollection() c.accumulator.Collect(ctx) - if err := c.checkpointer.FinishCollection(); err != nil { - otel.Handle(err) + return c.checkpointer.FinishCollection() +} + +func (c *Controller) runExporter(stopCh chan struct{}) { + defer c.wg.Done() + c.exportResponseCh <- struct{}{} + for { + select { + case <-c.exportRequestCh: + case <-stopCh: + return + } + c.export() + select { + case c.exportResponseCh <- struct{}{}: + case <-stopCh: + return + } } +} + +func (c *Controller) export() { + ctx, cancel := context.WithTimeout(context.Background(), c.exportTimeout) + defer cancel() + + ckpt := c.checkpointer.CheckpointSet() + ckpt.RLock() + defer ckpt.RUnlock() if err := c.exporter.Export(ctx, ckpt); err != nil { otel.Handle(err) diff --git a/sdk/metric/controller/basic/controller_test.go b/sdk/metric/controller/basic/controller_test.go index 3ff5d485cc4..7c1062a942f 100644 --- a/sdk/metric/controller/basic/controller_test.go +++ b/sdk/metric/controller/basic/controller_test.go @@ -83,7 +83,7 @@ func newCheckpointer() export.Checkpointer { func TestPushDoubleStop(t *testing.T) { exporter := newExporter() checkpointer := newCheckpointer() - p := controller.New(checkpointer, exporter) + p := controller.New(checkpointer, controller.WithExporter(exporter)) p.Start() p.Stop() p.Stop() @@ -92,7 +92,7 @@ func TestPushDoubleStop(t *testing.T) { func TestPushDoubleStart(t *testing.T) { exporter := newExporter() checkpointer := newCheckpointer() - p := controller.New(checkpointer, exporter) + p := controller.New(checkpointer, controller.WithExporter(exporter)) p.Start() p.Start() p.Stop() @@ -103,8 +103,8 @@ func TestPushTicker(t *testing.T) { checkpointer := newCheckpointer() p := controller.New( checkpointer, - exporter, - controller.WithPeriod(time.Second), + controller.WithExporter(exporter), + controller.WithCollectPeriod(time.Second), controller.WithResource(testResource), ) meter := p.MeterProvider().Meter("name") @@ -183,8 +183,8 @@ func TestPushExportError(t *testing.T) { checkpointer := processor.New(processorTest.AggregatorSelector(), exporter) p := controller.New( checkpointer, - exporter, - controller.WithPeriod(time.Second), + controller.WithExporter(exporter), + controller.WithCollectPeriod(time.Second), controller.WithResource(testResource), ) diff --git a/sdk/metric/sdk.go b/sdk/metric/sdk.go index a8dc1013cc8..8d4d3731829 100644 --- a/sdk/metric/sdk.go +++ b/sdk/metric/sdk.go @@ -416,8 +416,7 @@ func (m *Accumulator) observeAsyncInstruments(ctx context.Context) int { asyncCollected := 0 - // TODO: change this to `ctx` (in a separate PR, with tests) - m.asyncInstruments.Run(context.Background(), m) + m.asyncInstruments.Run(ctx, m) for _, inst := range m.asyncInstruments.Instruments() { if a := m.fromAsync(inst); a != nil { From b3b080d5c38a89ce8274a101e8d37c05b8ec9f4e Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Sat, 28 Nov 2020 22:53:18 -0800 Subject: [PATCH 05/35] Move pull_test into controller_test --- sdk/metric/controller/basic/controller.go | 158 ++++++++++-------- .../controller/basic/controller_test.go | 89 ++++++++++ sdk/metric/controller/pull/config.go | 64 ------- sdk/metric/controller/pull/pull.go | 118 ------------- sdk/metric/controller/pull/pull_test.go | 119 ------------- 5 files changed, 173 insertions(+), 375 deletions(-) delete mode 100644 sdk/metric/controller/pull/config.go delete mode 100644 sdk/metric/controller/pull/pull.go delete mode 100644 sdk/metric/controller/pull/pull_test.go diff --git a/sdk/metric/controller/basic/controller.go b/sdk/metric/controller/basic/controller.go index 9487db563e4..21a809a433c 100644 --- a/sdk/metric/controller/basic/controller.go +++ b/sdk/metric/controller/basic/controller.go @@ -33,21 +33,23 @@ const DefaultPeriod = 10 * time.Second // Controller organizes a periodic push of metric data. type Controller struct { - lock sync.Mutex - accumulator *sdk.Accumulator - provider *registry.MeterProvider - checkpointer export.Checkpointer - exporter export.Exporter - wg sync.WaitGroup - stopCh chan struct{} - exportRequestCh chan struct{} - exportResponseCh chan struct{} - clock controllerTime.Clock - ticker controllerTime.Ticker + lock sync.Mutex + accumulator *sdk.Accumulator + provider *registry.MeterProvider + checkpointer export.Checkpointer + exporter export.Exporter + wg sync.WaitGroup + stopCh chan struct{} + clock controllerTime.Clock + ticker controllerTime.Ticker collectPeriod time.Duration collectTimeout time.Duration exportTimeout time.Duration + + // collectedTime is used only in configurations with no + // exporter, when ticker != nil. + collectedTime time.Time } // New constructs a Controller, an implementation of MeterProvider, using the @@ -63,13 +65,6 @@ func New(checkpointer export.Checkpointer, opts ...Option) *Controller { if c.CollectTimeout == 0 { c.CollectTimeout = c.CollectPeriod } - - var exportRequestCh chan struct{} - var exportResponseCh chan struct{} - if c.Exporter != nil { - exportRequestCh = make(chan struct{}, 1) - exportResponseCh = make(chan struct{}, 1) - } if c.ExportTimeout == 0 { c.ExportTimeout = c.CollectPeriod } @@ -79,17 +74,15 @@ func New(checkpointer export.Checkpointer, opts ...Option) *Controller { c.Resource, ) return &Controller{ - provider: registry.NewMeterProvider(impl), - accumulator: impl, - checkpointer: checkpointer, - exporter: c.Exporter, - stopCh: make(chan struct{}), - collectPeriod: c.CollectPeriod, - collectTimeout: c.CollectTimeout, - exportTimeout: c.ExportTimeout, - exportRequestCh: exportRequestCh, - exportResponseCh: exportResponseCh, - clock: controllerTime.RealClock{}, + provider: registry.NewMeterProvider(impl), + accumulator: impl, + checkpointer: checkpointer, + exporter: c.Exporter, + stopCh: make(chan struct{}), + collectPeriod: c.CollectPeriod, + collectTimeout: c.CollectTimeout, + exportTimeout: c.ExportTimeout, + clock: controllerTime.RealClock{}, } } @@ -120,9 +113,8 @@ func (c *Controller) Start() { c.ticker = c.clock.Ticker(c.collectPeriod) if c.exporter != nil { - c.wg.Add(2) + c.wg.Add(1) go c.runTicker(c.stopCh) - go c.runExporter(c.stopCh) } } @@ -158,70 +150,88 @@ func (c *Controller) runTicker(stopCh chan struct{}) { } func (c *Controller) collect(stopCh chan struct{}) { - if c.exporter != nil { - // Wait for the previous export to finish or timeout. - select { - case <-c.exportResponseCh: - // ok - case <-stopCh: - return - } - - } - if err := c.checkpoint(); err != nil { + if err := c.checkpoint(func() bool { + return true + }); err != nil { otel.Handle(err) } - if c.exporter != nil { - // Begin a new export. - select { - case c.exportRequestCh <- struct{}{}: - // ok - case <-stopCh: - return - } + if c.exporter == nil { + return + } + // This export has to complete before starting another + // collection since it will hold a read lock and + // checkpoint() must re-acquire a write lock. + if err := c.export(); err != nil { + otel.Handle(err) } } -func (c *Controller) checkpoint() error { - ctx, cancel := context.WithTimeout(context.Background(), c.collectTimeout) - defer cancel() - +func (c *Controller) checkpoint(cond func() bool) error { ckpt := c.checkpointer.CheckpointSet() ckpt.Lock() defer ckpt.Unlock() + if !cond() { + return nil + } c.checkpointer.StartCollection() + + ctx, cancel := context.WithTimeout(context.Background(), c.collectTimeout) + defer cancel() + c.accumulator.Collect(ctx) + return c.checkpointer.FinishCollection() } -func (c *Controller) runExporter(stopCh chan struct{}) { - defer c.wg.Done() - c.exportResponseCh <- struct{}{} - for { - select { - case <-c.exportRequestCh: - case <-stopCh: - return - } - c.export() - select { - case c.exportResponseCh <- struct{}{}: - case <-stopCh: - return - } - } -} +func (c *Controller) export() error { + ckpt := c.checkpointer.CheckpointSet() + ckpt.RLock() + defer ckpt.RUnlock() -func (c *Controller) export() { ctx, cancel := context.WithTimeout(context.Background(), c.exportTimeout) defer cancel() + return c.exporter.Export(ctx, ckpt) +} + +// Foreach gives the caller read-locked access to the current +// export.CheckpointSet. +func (c *Controller) ForEach(ks export.ExportKindSelector, f func(export.Record) error) error { ckpt := c.checkpointer.CheckpointSet() ckpt.RLock() defer ckpt.RUnlock() - if err := c.exporter.Export(ctx, ckpt); err != nil { - otel.Handle(err) + return ckpt.ForEach(ks, f) +} + +// IsRunning returns true if the controller was started via Start(). +func (c *Controller) IsRunning() bool { + c.lock.Lock() + defer c.lock.Unlock() + return c.ticker != nil +} + +// Collect requests a collection. The collection will be skipped if +// the last collection is aged less than the CachePeriod. +func (c *Controller) Collect(ctx context.Context) error { + if c.IsRunning() { + // When there's a non-nil ticker, there's a goroutine + // computing checkpoints with the collection period. + return nil } + + return c.checkpoint(func() bool { + // This is called with the CheckpointSet exclusive + // lock held. + if c.collectPeriod == 0 { + return true + } + now := c.clock.Now() + if now.Sub(c.collectedTime) <= c.collectPeriod { + return false + } + c.collectedTime = now + return true + }) } diff --git a/sdk/metric/controller/basic/controller_test.go b/sdk/metric/controller/basic/controller_test.go index 7c1062a942f..11a5ee1d60d 100644 --- a/sdk/metric/controller/basic/controller_test.go +++ b/sdk/metric/controller/basic/controller_test.go @@ -31,7 +31,10 @@ import ( "go.opentelemetry.io/otel/sdk/export/metric/aggregation" controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" "go.opentelemetry.io/otel/sdk/metric/controller/controllertest" + "go.opentelemetry.io/otel/sdk/metric/controller/pull" + "go.opentelemetry.io/otel/sdk/metric/processor/basic" processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" + "go.opentelemetry.io/otel/sdk/metric/processor/processortest" processorTest "go.opentelemetry.io/otel/sdk/metric/processor/processortest" "go.opentelemetry.io/otel/sdk/resource" ) @@ -223,3 +226,89 @@ func TestPushExportError(t *testing.T) { }) } } + +func TestPullNoCache(t *testing.T) { + puller := pull.New( + basic.New( + processorTest.AggregatorSelector(), + export.CumulativeExportKindSelector(), + basic.WithMemory(true), + ), + pull.WithCachePeriod(0), + ) + + ctx := context.Background() + meter := puller.MeterProvider().Meter("nocache") + counter := metric.Must(meter).NewInt64Counter("counter.sum") + + counter.Add(ctx, 10, label.String("A", "B")) + + require.NoError(t, puller.Collect(ctx)) + records := processortest.NewOutput(label.DefaultEncoder()) + require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) + + require.EqualValues(t, map[string]float64{ + "counter.sum/A=B/": 10, + }, records.Map()) + + counter.Add(ctx, 10, label.String("A", "B")) + + require.NoError(t, puller.Collect(ctx)) + records = processortest.NewOutput(label.DefaultEncoder()) + require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) + + require.EqualValues(t, map[string]float64{ + "counter.sum/A=B/": 20, + }, records.Map()) +} + +func TestPullWithCache(t *testing.T) { + puller := pull.New( + basic.New( + processorTest.AggregatorSelector(), + export.CumulativeExportKindSelector(), + basic.WithMemory(true), + ), + pull.WithCachePeriod(time.Second), + ) + mock := controllertest.NewMockClock() + puller.SetClock(mock) + + ctx := context.Background() + meter := puller.MeterProvider().Meter("nocache") + counter := metric.Must(meter).NewInt64Counter("counter.sum") + + counter.Add(ctx, 10, label.String("A", "B")) + + require.NoError(t, puller.Collect(ctx)) + records := processortest.NewOutput(label.DefaultEncoder()) + require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) + + require.EqualValues(t, map[string]float64{ + "counter.sum/A=B/": 10, + }, records.Map()) + + counter.Add(ctx, 10, label.String("A", "B")) + + // Cached value! + require.NoError(t, puller.Collect(ctx)) + records = processortest.NewOutput(label.DefaultEncoder()) + require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) + + require.EqualValues(t, map[string]float64{ + "counter.sum/A=B/": 10, + }, records.Map()) + + mock.Add(time.Second) + runtime.Gosched() + + // Re-computed value! + require.NoError(t, puller.Collect(ctx)) + records = processortest.NewOutput(label.DefaultEncoder()) + require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) + + require.EqualValues(t, map[string]float64{ + "counter.sum/A=B/": 20, + }, records.Map()) + +} diff --git a/sdk/metric/controller/pull/config.go b/sdk/metric/controller/pull/config.go deleted file mode 100644 index 363285bf8c7..00000000000 --- a/sdk/metric/controller/pull/config.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pull // import "go.opentelemetry.io/otel/sdk/metric/controller/pull" - -import ( - "time" - - "go.opentelemetry.io/otel/sdk/resource" -) - -// Config contains configuration for a pull Controller. -type Config struct { - - // Resource is the OpenTelemetry resource associated with all Meters - // created by the Controller. - Resource *resource.Resource - - // CachePeriod is the period which a recently-computed result - // will be returned without gathering metric data again. - // - // If the period is zero, caching of the result is disabled. - // The default value is 10 seconds. - CachePeriod time.Duration -} - -// Option is the interface that applies the value to a configuration option. -type Option interface { - // Apply sets the Option value of a Config. - Apply(*Config) -} - -// WithResource sets the Resource configuration option of a Config. -func WithResource(r *resource.Resource) Option { - return resourceOption{r} -} - -type resourceOption struct{ *resource.Resource } - -func (o resourceOption) Apply(config *Config) { - config.Resource = o.Resource -} - -// WithCachePeriod sets the CachePeriod configuration option of a Config. -func WithCachePeriod(cachePeriod time.Duration) Option { - return cachePeriodOption(cachePeriod) -} - -type cachePeriodOption time.Duration - -func (o cachePeriodOption) Apply(config *Config) { - config.CachePeriod = time.Duration(o) -} diff --git a/sdk/metric/controller/pull/pull.go b/sdk/metric/controller/pull/pull.go deleted file mode 100644 index 68ea34b351c..00000000000 --- a/sdk/metric/controller/pull/pull.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pull // import "go.opentelemetry.io/otel/sdk/metric/controller/pull" - -import ( - "context" - "time" - - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/registry" - export "go.opentelemetry.io/otel/sdk/export/metric" - sdk "go.opentelemetry.io/otel/sdk/metric" - controllerTime "go.opentelemetry.io/otel/sdk/metric/controller/time" - "go.opentelemetry.io/otel/sdk/resource" -) - -// DefaultCachePeriod determines how long a recently-computed result -// will be returned without gathering metric data again. -const DefaultCachePeriod time.Duration = 10 * time.Second - -// Controller manages access to a *sdk.Accumulator and *basic.Processor. Use -// MeterProvider() for obtaining Meters. Use Foreach() for accessing current -// records. -type Controller struct { - accumulator *sdk.Accumulator - checkpointer export.Checkpointer - provider *registry.MeterProvider - period time.Duration - lastCollect time.Time - clock controllerTime.Clock - checkpoint export.CheckpointSet -} - -// New returns a *Controller configured with an export.Checkpointer. -// -// Pull controllers are typically used in an environment where there -// are multiple readers. It is common, therefore, when configuring a -// basic Processor for use with this controller, to use a -// CumulativeExport strategy and the basic.WithMemory(true) option, -// which ensures that every CheckpointSet includes full state. -func New(checkpointer export.Checkpointer, options ...Option) *Controller { - config := &Config{ - Resource: resource.Empty(), - CachePeriod: DefaultCachePeriod, - } - for _, opt := range options { - opt.Apply(config) - } - accum := sdk.NewAccumulator( - checkpointer, - config.Resource, - ) - return &Controller{ - accumulator: accum, - checkpointer: checkpointer, - provider: registry.NewMeterProvider(accum), - period: config.CachePeriod, - checkpoint: checkpointer.CheckpointSet(), - clock: controllerTime.RealClock{}, - } -} - -// SetClock sets the clock used for caching. For testing purposes. -func (c *Controller) SetClock(clock controllerTime.Clock) { - c.checkpointer.CheckpointSet().Lock() - defer c.checkpointer.CheckpointSet().Unlock() - c.clock = clock -} - -// MeterProvider returns a MeterProvider for the implementation managed by -// this controller. -func (c *Controller) MeterProvider() metric.MeterProvider { - return c.provider -} - -// Foreach gives the caller read-locked access to the current -// export.CheckpointSet. -func (c *Controller) ForEach(ks export.ExportKindSelector, f func(export.Record) error) error { - c.checkpointer.CheckpointSet().RLock() - defer c.checkpointer.CheckpointSet().RUnlock() - - return c.checkpoint.ForEach(ks, f) -} - -// Collect requests a collection. The collection will be skipped if -// the last collection is aged less than the CachePeriod. -func (c *Controller) Collect(ctx context.Context) error { - c.checkpointer.CheckpointSet().Lock() - defer c.checkpointer.CheckpointSet().Unlock() - - if c.period > 0 { - now := c.clock.Now() - elapsed := now.Sub(c.lastCollect) - - if elapsed < c.period { - return nil - } - c.lastCollect = now - } - - c.checkpointer.StartCollection() - c.accumulator.Collect(ctx) - err := c.checkpointer.FinishCollection() - c.checkpoint = c.checkpointer.CheckpointSet() - return err -} diff --git a/sdk/metric/controller/pull/pull_test.go b/sdk/metric/controller/pull/pull_test.go deleted file mode 100644 index 06988105deb..00000000000 --- a/sdk/metric/controller/pull/pull_test.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pull_test - -import ( - "context" - "runtime" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/otel/label" - "go.opentelemetry.io/otel/metric" - export "go.opentelemetry.io/otel/sdk/export/metric" - "go.opentelemetry.io/otel/sdk/metric/controller/controllertest" - "go.opentelemetry.io/otel/sdk/metric/controller/pull" - "go.opentelemetry.io/otel/sdk/metric/processor/basic" - "go.opentelemetry.io/otel/sdk/metric/processor/processortest" - selector "go.opentelemetry.io/otel/sdk/metric/selector/simple" -) - -func TestPullNoCache(t *testing.T) { - puller := pull.New( - basic.New( - selector.NewWithExactDistribution(), - export.CumulativeExportKindSelector(), - basic.WithMemory(true), - ), - pull.WithCachePeriod(0), - ) - - ctx := context.Background() - meter := puller.MeterProvider().Meter("nocache") - counter := metric.Must(meter).NewInt64Counter("counter.sum") - - counter.Add(ctx, 10, label.String("A", "B")) - - require.NoError(t, puller.Collect(ctx)) - records := processortest.NewOutput(label.DefaultEncoder()) - require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) - - require.EqualValues(t, map[string]float64{ - "counter.sum/A=B/": 10, - }, records.Map()) - - counter.Add(ctx, 10, label.String("A", "B")) - - require.NoError(t, puller.Collect(ctx)) - records = processortest.NewOutput(label.DefaultEncoder()) - require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) - - require.EqualValues(t, map[string]float64{ - "counter.sum/A=B/": 20, - }, records.Map()) -} - -func TestPullWithCache(t *testing.T) { - puller := pull.New( - basic.New( - selector.NewWithExactDistribution(), - export.CumulativeExportKindSelector(), - basic.WithMemory(true), - ), - pull.WithCachePeriod(time.Second), - ) - mock := controllertest.NewMockClock() - puller.SetClock(mock) - - ctx := context.Background() - meter := puller.MeterProvider().Meter("nocache") - counter := metric.Must(meter).NewInt64Counter("counter.sum") - - counter.Add(ctx, 10, label.String("A", "B")) - - require.NoError(t, puller.Collect(ctx)) - records := processortest.NewOutput(label.DefaultEncoder()) - require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) - - require.EqualValues(t, map[string]float64{ - "counter.sum/A=B/": 10, - }, records.Map()) - - counter.Add(ctx, 10, label.String("A", "B")) - - // Cached value! - require.NoError(t, puller.Collect(ctx)) - records = processortest.NewOutput(label.DefaultEncoder()) - require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) - - require.EqualValues(t, map[string]float64{ - "counter.sum/A=B/": 10, - }, records.Map()) - - mock.Add(time.Second) - runtime.Gosched() - - // Re-computed value! - require.NoError(t, puller.Collect(ctx)) - records = processortest.NewOutput(label.DefaultEncoder()) - require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) - - require.EqualValues(t, map[string]float64{ - "counter.sum/A=B/": 20, - }, records.Map()) - -} From 14f9dc3bd017a3d9ec509fb04870b4dc0775e45c Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Sat, 28 Nov 2020 23:25:12 -0800 Subject: [PATCH 06/35] Precommit pass --- example/basic/main.go | 10 ++++---- example/otel-collector/main.go | 12 +++++----- exporters/metric/prometheus/example_test.go | 4 ++-- exporters/metric/prometheus/prometheus.go | 24 +++++++++---------- .../metric/prometheus/prometheus_test.go | 8 +++---- exporters/otlp/otlp_integration_test.go | 6 ++--- exporters/stdout/exporter.go | 18 +++++++------- sdk/metric/controller/basic/config.go | 7 +++--- sdk/metric/controller/basic/controller.go | 2 +- .../controller/basic/controller_test.go | 13 +++++----- 10 files changed, 52 insertions(+), 52 deletions(-) diff --git a/example/basic/main.go b/example/basic/main.go index 20193dad43c..5e23bf73560 100644 --- a/example/basic/main.go +++ b/example/basic/main.go @@ -24,8 +24,8 @@ import ( "go.opentelemetry.io/otel/label" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/propagation" - "go.opentelemetry.io/otel/sdk/metric/controller/push" - "go.opentelemetry.io/otel/sdk/metric/processor/basic" + controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" + processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" "go.opentelemetry.io/otel/sdk/metric/selector/simple" sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/trace" @@ -50,12 +50,12 @@ func main() { bsp := sdktrace.NewBatchSpanProcessor(exporter) tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(bsp)) defer func() { _ = tp.Shutdown(context.Background()) }() - pusher := push.New( - basic.New( + pusher := controller.New( + processor.New( simple.NewWithExactDistribution(), exporter, ), - exporter, + controller.WithExporter(exporter), ) pusher.Start() defer pusher.Stop() diff --git a/example/otel-collector/main.go b/example/otel-collector/main.go index a2452f87485..d12c1f45aa1 100644 --- a/example/otel-collector/main.go +++ b/example/otel-collector/main.go @@ -30,8 +30,8 @@ import ( "go.opentelemetry.io/otel/label" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/propagation" - "go.opentelemetry.io/otel/sdk/metric/controller/push" - "go.opentelemetry.io/otel/sdk/metric/processor/basic" + controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" + processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" "go.opentelemetry.io/otel/sdk/metric/selector/simple" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" @@ -71,13 +71,13 @@ func initProvider() func() { sdktrace.WithSpanProcessor(bsp), ) - pusher := push.New( - basic.New( + pusher := controller.New( + processor.New( simple.NewWithExactDistribution(), exp, ), - exp, - push.WithPeriod(2*time.Second), + controller.WithExporter(exp), + controller.WithCollectPeriod(2*time.Second), ) // set global propagator to tracecontext (the default is no-op). diff --git a/exporters/metric/prometheus/example_test.go b/exporters/metric/prometheus/example_test.go index 921a777b106..3eb264393c3 100644 --- a/exporters/metric/prometheus/example_test.go +++ b/exporters/metric/prometheus/example_test.go @@ -25,7 +25,7 @@ import ( "go.opentelemetry.io/otel/exporters/metric/prometheus" "go.opentelemetry.io/otel/label" "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/sdk/metric/controller/pull" + controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" "go.opentelemetry.io/otel/sdk/resource" ) @@ -50,7 +50,7 @@ func ExampleNewExportPipeline() { // Create a meter exporter, err := prometheus.NewExportPipeline( prometheus.Config{}, - pull.WithResource(res), + controller.WithResource(res), ) if err != nil { panic(err) diff --git a/exporters/metric/prometheus/prometheus.go b/exporters/metric/prometheus/prometheus.go index a12a8ff3c48..137d6f920d4 100644 --- a/exporters/metric/prometheus/prometheus.go +++ b/exporters/metric/prometheus/prometheus.go @@ -29,8 +29,8 @@ import ( "go.opentelemetry.io/otel/metric/number" export "go.opentelemetry.io/otel/sdk/export/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/controller/pull" - "go.opentelemetry.io/otel/sdk/metric/processor/basic" + controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" + processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" "go.opentelemetry.io/otel/sdk/metric/selector/simple" ) @@ -48,7 +48,7 @@ type Exporter struct { // struct allows the exporter to potentially support multiple // controllers (e.g., with different resources). lock sync.RWMutex - controller *pull.Controller + controller *controller.Controller defaultSummaryQuantiles []float64 defaultHistogramBoundaries []float64 @@ -86,8 +86,8 @@ type Config struct { } // NewExportPipeline sets up a complete export pipeline with the recommended setup, -// using the recommended selector and standard processor. See the pull.Options. -func NewExportPipeline(config Config, options ...pull.Option) (*Exporter, error) { +// using the recommended selector and standard processor. See the controller.Options. +func NewExportPipeline(config Config, options ...controller.Option) (*Exporter, error) { if config.Registry == nil { config.Registry = prometheus.NewRegistry() } @@ -130,7 +130,7 @@ func NewExportPipeline(config Config, options ...pull.Option) (*Exporter, error) // http.HandleFunc("/metrics", hf) // defer pipeline.Stop() // ... Done -func InstallNewPipeline(config Config, options ...pull.Option) (*Exporter, error) { +func InstallNewPipeline(config Config, options ...controller.Option) (*Exporter, error) { exp, err := NewExportPipeline(config, options...) if err != nil { return nil, err @@ -139,17 +139,17 @@ func InstallNewPipeline(config Config, options ...pull.Option) (*Exporter, error return exp, nil } -// SetController sets up a standard *pull.Controller as the metric provider +// SetController sets up a standard *controller.Controller as the metric provider // for this exporter. -func (e *Exporter) SetController(config Config, options ...pull.Option) { +func (e *Exporter) SetController(config Config, options ...controller.Option) { e.lock.Lock() defer e.lock.Unlock() - e.controller = pull.New( - basic.New( + e.controller = controller.New( + processor.New( simple.NewWithHistogramDistribution(config.DefaultHistogramBoundaries), e, - basic.WithMemory(true), + processor.WithMemory(true), ), options..., ) @@ -161,7 +161,7 @@ func (e *Exporter) MeterProvider() metric.MeterProvider { } // Controller returns the controller object that coordinates collection for the SDK. -func (e *Exporter) Controller() *pull.Controller { +func (e *Exporter) Controller() *controller.Controller { e.lock.RLock() defer e.lock.RUnlock() return e.controller diff --git a/exporters/metric/prometheus/prometheus_test.go b/exporters/metric/prometheus/prometheus_test.go index 547b9fd6484..fec47e217ea 100644 --- a/exporters/metric/prometheus/prometheus_test.go +++ b/exporters/metric/prometheus/prometheus_test.go @@ -29,7 +29,7 @@ import ( "go.opentelemetry.io/otel/exporters/metric/prometheus" "go.opentelemetry.io/otel/label" "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/sdk/metric/controller/pull" + controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" "go.opentelemetry.io/otel/sdk/resource" ) @@ -42,8 +42,8 @@ func TestPrometheusExporter(t *testing.T) { prometheus.Config{ DefaultHistogramBoundaries: []float64{-0.5, 1}, }, - pull.WithCachePeriod(0), - pull.WithResource(resource.NewWithAttributes(label.String("R", "V"))), + controller.WithCollectPeriod(0), + controller.WithResource(resource.NewWithAttributes(label.String("R", "V"))), ) require.NoError(t, err) @@ -116,7 +116,7 @@ func TestPrometheusStatefulness(t *testing.T) { // Create a meter exporter, err := prometheus.NewExportPipeline( prometheus.Config{}, - pull.WithCachePeriod(0), + controller.WithCollectPeriod(0), ) require.NoError(t, err) diff --git a/exporters/otlp/otlp_integration_test.go b/exporters/otlp/otlp_integration_test.go index ced8d103558..f9c0b7ae1f7 100644 --- a/exporters/otlp/otlp_integration_test.go +++ b/exporters/otlp/otlp_integration_test.go @@ -32,7 +32,7 @@ import ( "go.opentelemetry.io/otel/metric/number" metricsdk "go.opentelemetry.io/otel/sdk/export/metric" exporttrace "go.opentelemetry.io/otel/sdk/export/trace" - "go.opentelemetry.io/otel/sdk/metric/controller/push" + controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" "go.opentelemetry.io/otel/sdk/metric/selector/simple" "go.opentelemetry.io/otel/sdk/resource" @@ -122,7 +122,7 @@ func newExporterEndToEndTest(t *testing.T, additionalOpts []otlp.ExporterOption) selector := simple.NewWithInexpensiveDistribution() processor := processor.New(selector, metricsdk.StatelessExportKindSelector()) - pusher := push.New(processor, exp) + pusher := controller.New(processor, controller.WithExporter(exp)) pusher.Start() meter := pusher.MeterProvider().Meter("test-meter") @@ -519,7 +519,7 @@ func TestNewExporter_withMultipleAttributeTypes(t *testing.T) { selector := simple.NewWithInexpensiveDistribution() processor := processor.New(selector, metricsdk.StatelessExportKindSelector()) - pusher := push.New(processor, exp) + pusher := controller.New(processor, controller.WithExporter(exp)) pusher.Start() // Flush and close. diff --git a/exporters/stdout/exporter.go b/exporters/stdout/exporter.go index 21a64c022cd..3643c6d5eb1 100644 --- a/exporters/stdout/exporter.go +++ b/exporters/stdout/exporter.go @@ -18,8 +18,8 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/sdk/export/metric" exporttrace "go.opentelemetry.io/otel/sdk/export/trace" - "go.opentelemetry.io/otel/sdk/metric/controller/push" - "go.opentelemetry.io/otel/sdk/metric/processor/basic" + controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" + processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" "go.opentelemetry.io/otel/sdk/metric/selector/simple" sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/trace" @@ -50,20 +50,22 @@ func NewExporter(options ...Option) (*Exporter, error) { // NewExportPipeline creates a complete export pipeline with the default // selectors, processors, and trace registration. It is the responsibility // of the caller to stop the returned push Controller. -func NewExportPipeline(exportOpts []Option, pushOpts []push.Option) (trace.TracerProvider, *push.Controller, error) { +func NewExportPipeline(exportOpts []Option, pushOpts []controller.Option) (trace.TracerProvider, *controller.Controller, error) { exporter, err := NewExporter(exportOpts...) if err != nil { return nil, nil, err } tp := sdktrace.NewTracerProvider(sdktrace.WithBatcher(exporter)) - pusher := push.New( - basic.New( + pusher := controller.New( + processor.New( simple.NewWithExactDistribution(), exporter, ), - exporter, - pushOpts..., + append( + pushOpts, + controller.WithExporter(exporter), + )..., ) pusher.Start() @@ -82,7 +84,7 @@ func NewExportPipeline(exportOpts []Option, pushOpts []push.Option) (trace.Trace // } // defer pipeline.Stop() // ... Done -func InstallNewPipeline(exportOpts []Option, pushOpts []push.Option) (*push.Controller, error) { +func InstallNewPipeline(exportOpts []Option, pushOpts []controller.Option) (*controller.Controller, error) { tracerProvider, controller, err := NewExportPipeline(exportOpts, pushOpts) if err != nil { return controller, err diff --git a/sdk/metric/controller/basic/config.go b/sdk/metric/controller/basic/config.go index 03759bd7bd0..e7c16679280 100644 --- a/sdk/metric/controller/basic/config.go +++ b/sdk/metric/controller/basic/config.go @@ -17,8 +17,8 @@ package basic // import "go.opentelemetry.io/otel/sdk/metric/controller/basic" import ( "time" - "go.opentelemetry.io/otel/sdk/resource" export "go.opentelemetry.io/otel/sdk/export/metric" + "go.opentelemetry.io/otel/sdk/resource" ) // Config contains configuration for a basic Controller. @@ -42,7 +42,7 @@ type Config struct { // CollectTimeout is the timeout of the Context passed to // Collect() and subsequently to Observer instrument callbacks. - // + // // Defaults to the configured collection period (see CollectPeriod). CollectTimeout time.Duration @@ -99,7 +99,7 @@ func WithExporter(exporter export.Exporter) Option { return exporterOption{exporter} } -type exporterOption struct { export.Exporter } +type exporterOption struct{ export.Exporter } func (o exporterOption) Apply(config *Config) { config.Exporter = o.Exporter @@ -115,4 +115,3 @@ type exportTimeoutOption time.Duration func (o exportTimeoutOption) Apply(config *Config) { config.ExportTimeout = time.Duration(o) } - diff --git a/sdk/metric/controller/basic/controller.go b/sdk/metric/controller/basic/controller.go index 21a809a433c..dccd0371a6c 100644 --- a/sdk/metric/controller/basic/controller.go +++ b/sdk/metric/controller/basic/controller.go @@ -228,7 +228,7 @@ func (c *Controller) Collect(ctx context.Context) error { return true } now := c.clock.Now() - if now.Sub(c.collectedTime) <= c.collectPeriod { + if now.Sub(c.collectedTime) < c.collectPeriod { return false } c.collectedTime = now diff --git a/sdk/metric/controller/basic/controller_test.go b/sdk/metric/controller/basic/controller_test.go index 11a5ee1d60d..2145838325d 100644 --- a/sdk/metric/controller/basic/controller_test.go +++ b/sdk/metric/controller/basic/controller_test.go @@ -31,7 +31,6 @@ import ( "go.opentelemetry.io/otel/sdk/export/metric/aggregation" controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" "go.opentelemetry.io/otel/sdk/metric/controller/controllertest" - "go.opentelemetry.io/otel/sdk/metric/controller/pull" "go.opentelemetry.io/otel/sdk/metric/processor/basic" processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" "go.opentelemetry.io/otel/sdk/metric/processor/processortest" @@ -227,14 +226,14 @@ func TestPushExportError(t *testing.T) { } } -func TestPullNoCache(t *testing.T) { - puller := pull.New( +func TestPullNoCollect(t *testing.T) { + puller := controller.New( basic.New( processorTest.AggregatorSelector(), export.CumulativeExportKindSelector(), basic.WithMemory(true), ), - pull.WithCachePeriod(0), + controller.WithCollectPeriod(0), ) ctx := context.Background() @@ -262,14 +261,14 @@ func TestPullNoCache(t *testing.T) { }, records.Map()) } -func TestPullWithCache(t *testing.T) { - puller := pull.New( +func TestPullWithCollect(t *testing.T) { + puller := controller.New( basic.New( processorTest.AggregatorSelector(), export.CumulativeExportKindSelector(), basic.WithMemory(true), ), - pull.WithCachePeriod(time.Second), + controller.WithCollectPeriod(time.Second), ) mock := controllertest.NewMockClock() puller.SetClock(mock) From 6da90ab89c1e52ffb08ad0a8cbf38a68d783c7bf Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Sun, 29 Nov 2020 00:17:26 -0800 Subject: [PATCH 07/35] New OTLP/Prom example --- example/otel-collector/go.sum | 68 +++++++++ example/prom-collector/go.mod | 18 +++ example/prom-collector/go.sum | 168 ++++++++++++++++++++++ example/prom-collector/main.go | 155 ++++++++++++++++++++ exporters/metric/prometheus/go.sum | 1 + exporters/metric/prometheus/prometheus.go | 27 ++-- go.mod | 1 + go.sum | 108 ++++++++++++++ sdk/go.sum | 90 ++++++++++++ 9 files changed, 623 insertions(+), 13 deletions(-) create mode 100644 example/prom-collector/go.mod create mode 100644 example/prom-collector/go.sum create mode 100644 example/prom-collector/main.go diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index 125f50ba892..351822079aa 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -2,22 +2,39 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= @@ -34,16 +51,52 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0/go.mod h1:1YFGCWmDN9G7Wz/wTOqEU1+nrfLjc1F1hxIjtdGwjmA= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -51,18 +104,27 @@ golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvx golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 h1:2mqDk8w/o6UmeUCu5Qiq2y7iMf6anbx+YA8d1JFoFrs= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -92,8 +154,14 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/example/prom-collector/go.mod b/example/prom-collector/go.mod new file mode 100644 index 00000000000..9463fc27d67 --- /dev/null +++ b/example/prom-collector/go.mod @@ -0,0 +1,18 @@ +module go.opentelemetry.io/otel/example/prom-collector + +go 1.14 + +replace ( + go.opentelemetry.io/otel => ../.. + go.opentelemetry.io/otel/exporters/metric/prometheus => ../../exporters/metric/prometheus + go.opentelemetry.io/otel/exporters/otlp => ../../exporters/otlp + go.opentelemetry.io/otel/sdk => ../../sdk +) + +require ( + go.opentelemetry.io/otel v0.14.0 + go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0 + go.opentelemetry.io/otel/exporters/otlp v0.14.0 + go.opentelemetry.io/otel/sdk v0.14.0 + google.golang.org/grpc v1.32.0 +) diff --git a/example/prom-collector/go.sum b/example/prom-collector/go.sum new file mode 100644 index 00000000000..1dae20f7cc9 --- /dev/null +++ b/example/prom-collector/go.sum @@ -0,0 +1,168 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +go.opentelemetry.io v0.1.0 h1:EANZoRCOP+A3faIlw/iN6YEWoYb1vleZRKm1EvH8T48= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 h1:2mqDk8w/o6UmeUCu5Qiq2y7iMf6anbx+YA8d1JFoFrs= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884 h1:fiNLklpBwWK1mth30Hlwk+fcdBmIALlgF5iy77O37Ig= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/example/prom-collector/main.go b/example/prom-collector/main.go new file mode 100644 index 00000000000..4f6cfb207ec --- /dev/null +++ b/example/prom-collector/main.go @@ -0,0 +1,155 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "context" + "fmt" + "log" + "net/http" + "sync" + "time" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/exporters/metric/prometheus" + "go.opentelemetry.io/otel/exporters/otlp" + "go.opentelemetry.io/otel/label" + "go.opentelemetry.io/otel/metric" + export "go.opentelemetry.io/otel/sdk/export/metric" + controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" + processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" + "go.opentelemetry.io/otel/sdk/metric/selector/simple" + "go.opentelemetry.io/otel/sdk/resource" + "google.golang.org/grpc" +) + +func initMeter() { + ctx := context.Background() + + res, err := resource.New( + ctx, + resource.WithAttributes(label.String("R", "V")), + ) + if err != nil { + log.Panic("could not initialize resource:", err) + } + + otlpExporter, err := otlp.NewExporter(ctx, + otlp.WithInsecure(), + otlp.WithAddress("127.0.0.1:7001"), + otlp.WithGRPCDialOption(grpc.WithBlock()), // useful for testing + ) + if err != nil { + log.Panic("could not initialize OTLP:", err) + } + + options := []controller.Option{ + controller.WithResource(res), + controller.WithExporter(otlpExporter), + } + + cont := controller.New( + processor.New( + simple.NewWithHistogramDistribution([]float64{ + 0.001, 0.01, 0.1, 1, 10, 100, 1000, + }), + export.CumulativeExportKindSelector(), + processor.WithMemory(true), + ), + options..., + ) + + promExporter, err := prometheus.NewExporter(prometheus.Config{}, cont) + if err != nil { + log.Panic("could not initialize prometheus:", err) + } + http.HandleFunc("/", promExporter.ServeHTTP) + go func() { + _ = http.ListenAndServe(":2222", nil) + }() + + otel.SetMeterProvider(cont.MeterProvider()) + + fmt.Println("Prometheus server running on :2222") + fmt.Println("Exporting OTLP to :7001") +} + +func main() { + initMeter() + + meter := otel.Meter("ex.com/basic") + observerLock := new(sync.RWMutex) + observerValueToReport := new(float64) + observerLabelsToReport := new([]label.KeyValue) + cb := func(_ context.Context, result metric.Float64ObserverResult) { + (*observerLock).RLock() + value := *observerValueToReport + labels := *observerLabelsToReport + (*observerLock).RUnlock() + result.Observe(value, labels...) + } + _ = metric.Must(meter).NewFloat64ValueObserver("ex.com.one", cb, + metric.WithDescription("A ValueObserver set to 1.0"), + ) + + valuerecorder := metric.Must(meter).NewFloat64ValueRecorder("ex.com.two") + counter := metric.Must(meter).NewFloat64Counter("ex.com.three") + + commonLabels := []label.KeyValue{label.Int("I", 10), label.String("A", "1"), label.String("B", "2"), label.String("C", "3")} + notSoCommonLabels := []label.KeyValue{label.Int("I", 13)} + + ctx := context.Background() + + (*observerLock).Lock() + *observerValueToReport = 1.0 + *observerLabelsToReport = commonLabels + (*observerLock).Unlock() + meter.RecordBatch( + ctx, + commonLabels, + valuerecorder.Measurement(2.0), + counter.Measurement(12.0), + ) + + time.Sleep(5 * time.Second) + + (*observerLock).Lock() + *observerValueToReport = 1.0 + *observerLabelsToReport = notSoCommonLabels + (*observerLock).Unlock() + meter.RecordBatch( + ctx, + notSoCommonLabels, + valuerecorder.Measurement(2.0), + counter.Measurement(22.0), + ) + + time.Sleep(5 * time.Second) + + (*observerLock).Lock() + *observerValueToReport = 13.0 + *observerLabelsToReport = commonLabels + (*observerLock).Unlock() + meter.RecordBatch( + ctx, + commonLabels, + valuerecorder.Measurement(12.0), + counter.Measurement(13.0), + ) + + fmt.Println("Example finished updating, please visit :2222") + + select {} +} diff --git a/exporters/metric/prometheus/go.sum b/exporters/metric/prometheus/go.sum index 29f13df06c0..28257372730 100644 --- a/exporters/metric/prometheus/go.sum +++ b/exporters/metric/prometheus/go.sum @@ -84,6 +84,7 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0/go.mod h1:1YFGCWmDN9G7Wz/wTOqEU1+nrfLjc1F1hxIjtdGwjmA= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= diff --git a/exporters/metric/prometheus/prometheus.go b/exporters/metric/prometheus/prometheus.go index 137d6f920d4..cdeb41b0028 100644 --- a/exporters/metric/prometheus/prometheus.go +++ b/exporters/metric/prometheus/prometheus.go @@ -85,9 +85,8 @@ type Config struct { DefaultHistogramBoundaries []float64 } -// NewExportPipeline sets up a complete export pipeline with the recommended setup, -// using the recommended selector and standard processor. See the controller.Options. -func NewExportPipeline(config Config, options ...controller.Option) (*Exporter, error) { +// NewExporter returns a new Prometheus +func NewExporter(config Config, controller *controller.Controller) (*Exporter, error) { if config.Registry == nil { config.Registry = prometheus.NewRegistry() } @@ -104,6 +103,7 @@ func NewExportPipeline(config Config, options ...controller.Option) (*Exporter, handler: promhttp.HandlerFor(config.Gatherer, promhttp.HandlerOpts{}), registerer: config.Registerer, gatherer: config.Gatherer, + controller: controller, defaultSummaryQuantiles: config.DefaultSummaryQuantiles, defaultHistogramBoundaries: config.DefaultHistogramBoundaries, } @@ -111,14 +111,18 @@ func NewExportPipeline(config Config, options ...controller.Option) (*Exporter, c := &collector{ exp: e, } - e.SetController(config, options...) if err := config.Registerer.Register(c); err != nil { return nil, fmt.Errorf("cannot register the collector: %w", err) } - return e, nil } +// NewExportPipeline sets up a complete export pipeline with the recommended setup, +// using the recommended selector and standard processor. See the controller.Options. +func NewExportPipeline(config Config, options ...controller.Option) (*Exporter, error) { + return NewExporter(config, defaultController(config, options...)) +} + // InstallNewPipeline instantiates a NewExportPipeline and registers it globally. // Typically called as: // @@ -139,16 +143,13 @@ func InstallNewPipeline(config Config, options ...controller.Option) (*Exporter, return exp, nil } -// SetController sets up a standard *controller.Controller as the metric provider -// for this exporter. -func (e *Exporter) SetController(config Config, options ...controller.Option) { - e.lock.Lock() - defer e.lock.Unlock() - - e.controller = controller.New( +// defaultController returns a standard *controller.Controller for use +// with Prometheus. +func defaultController(config Config, options ...controller.Option) *controller.Controller { + return controller.New( processor.New( simple.NewWithHistogramDistribution(config.DefaultHistogramBoundaries), - e, + export.CumulativeExportKindSelector(), processor.WithMemory(true), ), options..., diff --git a/go.mod b/go.mod index 5dfec2aa1d7..b266b5babe2 100644 --- a/go.mod +++ b/go.mod @@ -5,4 +5,5 @@ go 1.14 require ( github.com/google/go-cmp v0.5.3 github.com/stretchr/testify v1.6.1 + go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0 ) diff --git a/go.sum b/go.sum index 118ac6a984f..b5b07eb8956 100644 --- a/go.sum +++ b/go.sum @@ -1,15 +1,123 @@ +github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +go.opentelemetry.io v0.1.0 h1:EANZoRCOP+A3faIlw/iN6YEWoYb1vleZRKm1EvH8T48= +go.opentelemetry.io/otel v0.14.0/go.mod h1:vH5xEuwy7Rts0GNtsCW3HYQoZDY+OmBJ6t1bFGGlxgw= +go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0 h1:F0hQ6ktEf49bJtEctigyaahHHSTVzWamd2cvw2stmtw= +go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0/go.mod h1:1YFGCWmDN9G7Wz/wTOqEU1+nrfLjc1F1hxIjtdGwjmA= +go.opentelemetry.io/otel/sdk v0.14.0 h1:Pqgd85y5XhyvHQlOxkKW+FD4DAX7AoeaNIDKC2VhfHQ= +go.opentelemetry.io/otel/sdk v0.14.0/go.mod h1:kGO5pEMSNqSJppHAm8b73zztLxB5fgDQnD56/dl5xqE= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/go.sum b/sdk/go.sum index 57f074623d2..e69c8c688ef 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -1,21 +1,111 @@ github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0/go.mod h1:1YFGCWmDN9G7Wz/wTOqEU1+nrfLjc1F1hxIjtdGwjmA= +go.opentelemetry.io/otel/sdk v0.14.0/go.mod h1:kGO5pEMSNqSJppHAm8b73zztLxB5fgDQnD56/dl5xqE= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From ac85aa57f46291e461087585042cc0f671d2442b Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Sun, 29 Nov 2020 00:20:18 -0800 Subject: [PATCH 08/35] Precommit --- .github/dependabot.yml | 10 +++ .gitignore | 1 + bridge/opencensus/go.sum | 9 +++ bridge/opentracing/go.sum | 9 +++ example/basic/go.sum | 9 +++ example/jaeger/go.sum | 4 ++ example/namedtracer/go.sum | 9 +++ example/opencensus/go.sum | 9 +++ example/otel-collector/go.sum | 65 +----------------- example/prom-collector/go.sum | 6 +- example/prom-collector/main.go | 3 +- example/zipkin/go.sum | 7 ++ exporters/metric/prometheus/go.sum | 1 - exporters/otlp/go.sum | 9 +++ exporters/stdout/go.sum | 9 +++ exporters/trace/jaeger/go.sum | 4 ++ exporters/trace/zipkin/go.sum | 7 ++ go.mod | 4 +- go.sum | 105 +---------------------------- sdk/go.sum | 87 +----------------------- 20 files changed, 115 insertions(+), 252 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7c563372091..b556d4a2f35 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -106,6 +106,16 @@ updates: schedule: day: sunday interval: weekly + - + package-ecosystem: gomod + directory: /example/prom-collector + labels: + - dependencies + - go + - "Skip Changelog" + schedule: + day: sunday + interval: weekly - package-ecosystem: gomod directory: /example/zipkin diff --git a/.gitignore b/.gitignore index 90bd682fde4..22005bda019 100644 --- a/.gitignore +++ b/.gitignore @@ -19,5 +19,6 @@ gen/ /example/namedtracer/namedtracer /example/opencensus/opencensus /example/prometheus/prometheus +/example/prom-collector/prom-collector /example/zipkin/zipkin /example/otel-collector/otel-collector diff --git a/bridge/opencensus/go.sum b/bridge/opencensus/go.sum index 15c1a955767..b1a3447ebd2 100644 --- a/bridge/opencensus/go.sum +++ b/bridge/opencensus/go.sum @@ -3,6 +3,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -12,6 +14,11 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -53,6 +60,8 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/bridge/opentracing/go.sum b/bridge/opentracing/go.sum index f54f9cb911d..0edd60c6cd8 100644 --- a/bridge/opentracing/go.sum +++ b/bridge/opentracing/go.sum @@ -1,7 +1,14 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -14,5 +21,7 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IV golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/example/basic/go.sum b/example/basic/go.sum index 57f074623d2..c7a24069021 100644 --- a/example/basic/go.sum +++ b/example/basic/go.sum @@ -4,10 +4,17 @@ github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJy github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -17,5 +24,7 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IV golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/example/jaeger/go.sum b/example/jaeger/go.sum index b088e72c00c..e587e4ea5a1 100644 --- a/example/jaeger/go.sum +++ b/example/jaeger/go.sum @@ -45,6 +45,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -376,6 +378,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/example/namedtracer/go.sum b/example/namedtracer/go.sum index 57f074623d2..c7a24069021 100644 --- a/example/namedtracer/go.sum +++ b/example/namedtracer/go.sum @@ -4,10 +4,17 @@ github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJy github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -17,5 +24,7 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IV golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/example/opencensus/go.sum b/example/opencensus/go.sum index aec2a1be51f..01d10a22742 100644 --- a/example/opencensus/go.sum +++ b/example/opencensus/go.sum @@ -7,6 +7,8 @@ github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiU github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -18,6 +20,11 @@ github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -59,6 +66,8 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index 351822079aa..279f89abedb 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -2,17 +2,9 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= @@ -23,18 +15,11 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= @@ -51,52 +36,21 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0/go.mod h1:1YFGCWmDN9G7Wz/wTOqEU1+nrfLjc1F1hxIjtdGwjmA= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -104,27 +58,18 @@ golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvx golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 h1:2mqDk8w/o6UmeUCu5Qiq2y7iMf6anbx+YA8d1JFoFrs= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -154,14 +99,10 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/example/prom-collector/go.sum b/example/prom-collector/go.sum index 1dae20f7cc9..26245b13acc 100644 --- a/example/prom-collector/go.sum +++ b/example/prom-collector/go.sum @@ -52,6 +52,7 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -60,8 +61,10 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -99,7 +102,6 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -go.opentelemetry.io v0.1.0 h1:EANZoRCOP+A3faIlw/iN6YEWoYb1vleZRKm1EvH8T48= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -135,6 +137,7 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -157,6 +160,7 @@ google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyz google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/example/prom-collector/main.go b/example/prom-collector/main.go index 4f6cfb207ec..a6d6db2b114 100644 --- a/example/prom-collector/main.go +++ b/example/prom-collector/main.go @@ -22,6 +22,8 @@ import ( "sync" "time" + "google.golang.org/grpc" + "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/exporters/metric/prometheus" "go.opentelemetry.io/otel/exporters/otlp" @@ -32,7 +34,6 @@ import ( processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" "go.opentelemetry.io/otel/sdk/metric/selector/simple" "go.opentelemetry.io/otel/sdk/resource" - "google.golang.org/grpc" ) func initMeter() { diff --git a/example/zipkin/go.sum b/example/zipkin/go.sum index 42fd0cf2cb1..33c93cfe3cb 100644 --- a/example/zipkin/go.sum +++ b/example/zipkin/go.sum @@ -44,6 +44,11 @@ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -107,6 +112,8 @@ google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/exporters/metric/prometheus/go.sum b/exporters/metric/prometheus/go.sum index 28257372730..29f13df06c0 100644 --- a/exporters/metric/prometheus/go.sum +++ b/exporters/metric/prometheus/go.sum @@ -84,7 +84,6 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0/go.mod h1:1YFGCWmDN9G7Wz/wTOqEU1+nrfLjc1F1hxIjtdGwjmA= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= diff --git a/exporters/otlp/go.sum b/exporters/otlp/go.sum index 2688698810a..7e4b094a929 100644 --- a/exporters/otlp/go.sum +++ b/exporters/otlp/go.sum @@ -9,6 +9,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -37,6 +39,11 @@ github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -93,6 +100,8 @@ google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyz google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/exporters/stdout/go.sum b/exporters/stdout/go.sum index 57f074623d2..c7a24069021 100644 --- a/exporters/stdout/go.sum +++ b/exporters/stdout/go.sum @@ -4,10 +4,17 @@ github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJy github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -17,5 +24,7 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IV golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/exporters/trace/jaeger/go.sum b/exporters/trace/jaeger/go.sum index d719931b5a0..c7540dbf250 100644 --- a/exporters/trace/jaeger/go.sum +++ b/exporters/trace/jaeger/go.sum @@ -45,6 +45,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -383,6 +385,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/exporters/trace/zipkin/go.sum b/exporters/trace/zipkin/go.sum index 1a4f5840508..399c6555270 100644 --- a/exporters/trace/zipkin/go.sum +++ b/exporters/trace/zipkin/go.sum @@ -44,6 +44,11 @@ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -110,6 +115,8 @@ google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/go.mod b/go.mod index b266b5babe2..d1805b071a8 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,9 @@ module go.opentelemetry.io/otel go 1.14 require ( + github.com/davecgh/go-spew v1.1.1 // indirect github.com/google/go-cmp v0.5.3 + github.com/kr/pretty v0.1.0 // indirect github.com/stretchr/testify v1.6.1 - go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0 + gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect ) diff --git a/go.sum b/go.sum index b5b07eb8956..086e4a034cc 100644 --- a/go.sum +++ b/go.sum @@ -1,123 +1,24 @@ -github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= -github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -go.opentelemetry.io v0.1.0 h1:EANZoRCOP+A3faIlw/iN6YEWoYb1vleZRKm1EvH8T48= -go.opentelemetry.io/otel v0.14.0/go.mod h1:vH5xEuwy7Rts0GNtsCW3HYQoZDY+OmBJ6t1bFGGlxgw= -go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0 h1:F0hQ6ktEf49bJtEctigyaahHHSTVzWamd2cvw2stmtw= -go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0/go.mod h1:1YFGCWmDN9G7Wz/wTOqEU1+nrfLjc1F1hxIjtdGwjmA= -go.opentelemetry.io/otel/sdk v0.14.0 h1:Pqgd85y5XhyvHQlOxkKW+FD4DAX7AoeaNIDKC2VhfHQ= -go.opentelemetry.io/otel/sdk v0.14.0/go.mod h1:kGO5pEMSNqSJppHAm8b73zztLxB5fgDQnD56/dl5xqE= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/go.sum b/sdk/go.sum index e69c8c688ef..c7a24069021 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -1,111 +1,30 @@ github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0/go.mod h1:1YFGCWmDN9G7Wz/wTOqEU1+nrfLjc1F1hxIjtdGwjmA= -go.opentelemetry.io/otel/sdk v0.14.0/go.mod h1:kGO5pEMSNqSJppHAm8b73zztLxB5fgDQnD56/dl5xqE= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 5adda9828ca3c43d45739a4a0839ab1cbfd3dfae Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Sun, 29 Nov 2020 00:26:25 -0800 Subject: [PATCH 09/35] Fix the example --- example/prom-collector/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/example/prom-collector/main.go b/example/prom-collector/main.go index a6d6db2b114..3d7f6931d84 100644 --- a/example/prom-collector/main.go +++ b/example/prom-collector/main.go @@ -72,6 +72,8 @@ func initMeter() { options..., ) + cont.Start() + promExporter, err := prometheus.NewExporter(prometheus.Config{}, cont) if err != nil { log.Panic("could not initialize prometheus:", err) From 410096f60c141550969e1a999189d3affcac0663 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Sun, 29 Nov 2020 22:52:33 -0800 Subject: [PATCH 10/35] Shorten the example --- example/prom-collector/main.go | 95 ++++++++++------------------------ 1 file changed, 28 insertions(+), 67 deletions(-) diff --git a/example/prom-collector/main.go b/example/prom-collector/main.go index 3d7f6931d84..a63912f0df1 100644 --- a/example/prom-collector/main.go +++ b/example/prom-collector/main.go @@ -16,10 +16,9 @@ package main import ( "context" - "fmt" "log" + "math/rand" "net/http" - "sync" "time" "google.golang.org/grpc" @@ -49,18 +48,13 @@ func initMeter() { otlpExporter, err := otlp.NewExporter(ctx, otlp.WithInsecure(), - otlp.WithAddress("127.0.0.1:7001"), + otlp.WithAddress("127.0.0.1:17001"), otlp.WithGRPCDialOption(grpc.WithBlock()), // useful for testing ) if err != nil { log.Panic("could not initialize OTLP:", err) } - options := []controller.Option{ - controller.WithResource(res), - controller.WithExporter(otlpExporter), - } - cont := controller.New( processor.New( simple.NewWithHistogramDistribution([]float64{ @@ -69,7 +63,8 @@ func initMeter() { export.CumulativeExportKindSelector(), processor.WithMemory(true), ), - options..., + controller.WithResource(res), + controller.WithExporter(otlpExporter), ) cont.Start() @@ -80,79 +75,45 @@ func initMeter() { } http.HandleFunc("/", promExporter.ServeHTTP) go func() { - _ = http.ListenAndServe(":2222", nil) + log.Fatal(http.ListenAndServe(":17000", nil)) }() otel.SetMeterProvider(cont.MeterProvider()) - fmt.Println("Prometheus server running on :2222") - fmt.Println("Exporting OTLP to :7001") + log.Println("Prometheus server running on :17000") + log.Println("Exporting OTLP to :17001") } func main() { initMeter() - meter := otel.Meter("ex.com/basic") - observerLock := new(sync.RWMutex) - observerValueToReport := new(float64) - observerLabelsToReport := new([]label.KeyValue) - cb := func(_ context.Context, result metric.Float64ObserverResult) { - (*observerLock).RLock() - value := *observerValueToReport - labels := *observerLabelsToReport - (*observerLock).RUnlock() - result.Observe(value, labels...) + labels := []label.KeyValue{ + label.String("label1", "value1"), } - _ = metric.Must(meter).NewFloat64ValueObserver("ex.com.one", cb, - metric.WithDescription("A ValueObserver set to 1.0"), - ) - - valuerecorder := metric.Must(meter).NewFloat64ValueRecorder("ex.com.two") - counter := metric.Must(meter).NewFloat64Counter("ex.com.three") - commonLabels := []label.KeyValue{label.Int("I", 10), label.String("A", "1"), label.String("B", "2"), label.String("C", "3")} - notSoCommonLabels := []label.KeyValue{label.Int("I", 13)} - - ctx := context.Background() - - (*observerLock).Lock() - *observerValueToReport = 1.0 - *observerLabelsToReport = commonLabels - (*observerLock).Unlock() - meter.RecordBatch( - ctx, - commonLabels, - valuerecorder.Measurement(2.0), - counter.Measurement(12.0), + meter := otel.Meter("ex.com/prom-collector") + _ = metric.Must(meter).NewFloat64ValueObserver( + "randval", + func(_ context.Context, result metric.Float64ObserverResult) { + result.Observe( + rand.Float64(), + labels..., + ) + }, + metric.WithDescription("A random value"), ) - time.Sleep(5 * time.Second) - - (*observerLock).Lock() - *observerValueToReport = 1.0 - *observerLabelsToReport = notSoCommonLabels - (*observerLock).Unlock() - meter.RecordBatch( - ctx, - notSoCommonLabels, - valuerecorder.Measurement(2.0), - counter.Measurement(22.0), - ) + temperature := metric.Must(meter).NewFloat64ValueRecorder("temperature") + interrupts := metric.Must(meter).NewInt64Counter("interrupts") - time.Sleep(5 * time.Second) + ctx := context.Background() - (*observerLock).Lock() - *observerValueToReport = 13.0 - *observerLabelsToReport = commonLabels - (*observerLock).Unlock() - meter.RecordBatch( - ctx, - commonLabels, - valuerecorder.Measurement(12.0), - counter.Measurement(13.0), - ) + log.Println("Example is running, please visit :17000") - fmt.Println("Example finished updating, please visit :2222") + for { + temperature.Record(ctx, 100+10*rand.NormFloat64(), labels...) + interrupts.Add(ctx, int64(rand.Intn(100)), labels...) - select {} + time.Sleep(time.Second * time.Duration(rand.Intn(10))) + } } From 85e4889a57e004fd5a4444e4f22236bc99e293a7 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Sun, 29 Nov 2020 23:43:25 -0800 Subject: [PATCH 11/35] Test starting controller w/o exporter --- example/prom-collector/README.md | 3 + sdk/metric/controller/basic/controller.go | 8 +- .../controller/basic/controller_test.go | 106 +++++++++++++++--- 3 files changed, 97 insertions(+), 20 deletions(-) create mode 100644 example/prom-collector/README.md diff --git a/example/prom-collector/README.md b/example/prom-collector/README.md new file mode 100644 index 00000000000..465342382ac --- /dev/null +++ b/example/prom-collector/README.md @@ -0,0 +1,3 @@ +This example demonstrates a metrics export pipeline that supports +Prometheus (pull) and simultaneously exports OTLP to an OpenTelemetry +endpoint (push). diff --git a/sdk/metric/controller/basic/controller.go b/sdk/metric/controller/basic/controller.go index dccd0371a6c..e8cba48d554 100644 --- a/sdk/metric/controller/basic/controller.go +++ b/sdk/metric/controller/basic/controller.go @@ -109,13 +109,9 @@ func (c *Controller) Start() { return } - c.wg.Add(1) + c.wg.Add(2) c.ticker = c.clock.Ticker(c.collectPeriod) - - if c.exporter != nil { - c.wg.Add(1) - go c.runTicker(c.stopCh) - } + go c.runTicker(c.stopCh) } // Stop waits for the background goroutine to return and then collects diff --git a/sdk/metric/controller/basic/controller_test.go b/sdk/metric/controller/basic/controller_test.go index 2145838325d..f75890a808f 100644 --- a/sdk/metric/controller/basic/controller_test.go +++ b/sdk/metric/controller/basic/controller_test.go @@ -31,10 +31,8 @@ import ( "go.opentelemetry.io/otel/sdk/export/metric/aggregation" controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" "go.opentelemetry.io/otel/sdk/metric/controller/controllertest" - "go.opentelemetry.io/otel/sdk/metric/processor/basic" processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" "go.opentelemetry.io/otel/sdk/metric/processor/processortest" - processorTest "go.opentelemetry.io/otel/sdk/metric/processor/processortest" "go.opentelemetry.io/otel/sdk/resource" ) @@ -66,17 +64,17 @@ func init() { otel.SetErrorHandler(testHandler) } -func newExporter() *processorTest.Exporter { - return processorTest.NewExporter( +func newExporter() *processortest.Exporter { + return processortest.NewExporter( export.StatelessExportKindSelector(), label.DefaultEncoder(), ) } func newCheckpointer() export.Checkpointer { - return processorTest.Checkpointer( - processorTest.NewProcessor( - processorTest.AggregatorSelector(), + return processortest.Checkpointer( + processortest.NewProcessor( + processortest.AggregatorSelector(), label.DefaultEncoder(), ), ) @@ -182,7 +180,7 @@ func TestPushExportError(t *testing.T) { // This test validates the error handling // behavior of the basic Processor is honored // by the push processor. - checkpointer := processor.New(processorTest.AggregatorSelector(), exporter) + checkpointer := processor.New(processortest.AggregatorSelector(), exporter) p := controller.New( checkpointer, controller.WithExporter(exporter), @@ -228,10 +226,10 @@ func TestPushExportError(t *testing.T) { func TestPullNoCollect(t *testing.T) { puller := controller.New( - basic.New( - processorTest.AggregatorSelector(), + processor.New( + processortest.AggregatorSelector(), export.CumulativeExportKindSelector(), - basic.WithMemory(true), + processor.WithMemory(true), ), controller.WithCollectPeriod(0), ) @@ -263,10 +261,10 @@ func TestPullNoCollect(t *testing.T) { func TestPullWithCollect(t *testing.T) { puller := controller.New( - basic.New( - processorTest.AggregatorSelector(), + processor.New( + processortest.AggregatorSelector(), export.CumulativeExportKindSelector(), - basic.WithMemory(true), + processor.WithMemory(true), ), controller.WithCollectPeriod(time.Second), ) @@ -311,3 +309,83 @@ func TestPullWithCollect(t *testing.T) { }, records.Map()) } + +func TestStartNoExporter(t *testing.T) { + ctx := context.Background() + + cont := controller.New( + processor.New( + processortest.AggregatorSelector(), + export.CumulativeExportKindSelector(), + ), + controller.WithCollectPeriod(time.Second), + ) + mock := controllertest.NewMockClock() + cont.SetClock(mock) + + prov := cont.MeterProvider() + calls := int64(0) + + _ = metric.Must(prov.Meter("named")).NewInt64SumObserver("calls.lastvalue", + func(_ context.Context, result metric.Int64ObserverResult) { + calls++ + result.Observe(calls, label.String("A", "B")) + }, + ) + + getMap := func() map[string]float64 { + out := processortest.NewOutput(label.DefaultEncoder()) + + require.NoError(t, cont.ForEach( + export.CumulativeExportKindSelector(), + func(record export.Record) error { + return out.AddRecord(record) + }, + )) + return out.Map() + } + + // Collect() has not been called. The controller is unstarted. + expect := map[string]float64{} + + // The time advances, but doesn't change the result (not collected). + require.EqualValues(t, expect, getMap()) + mock.Add(time.Second) + require.EqualValues(t, expect, getMap()) + mock.Add(time.Second) + + expect = map[string]float64{ + "calls.lastvalue/A=B/": 1, + } + + // Collect once + require.NoError(t, cont.Collect(ctx)) + + require.EqualValues(t, expect, getMap()) + mock.Add(time.Second) + require.EqualValues(t, expect, getMap()) + mock.Add(time.Second) + + // Again + expect = map[string]float64{ + "calls.lastvalue/A=B/": 2, + } + + require.NoError(t, cont.Collect(ctx)) + + require.EqualValues(t, expect, getMap()) + mock.Add(time.Second) + require.EqualValues(t, expect, getMap()) + + // Start the controller + cont.Start() + + for i := 1; i <= 3; i++ { + expect = map[string]float64{ + "calls.lastvalue/A=B/": 2 + float64(i), + } + + mock.Add(time.Second) + require.EqualValues(t, expect, getMap()) + } +} From 2089c2263d137ef233fe0054699348befe8f52da Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Mon, 30 Nov 2020 01:11:32 -0800 Subject: [PATCH 12/35] Test export timeout --- sdk/metric/controller/basic/config.go | 4 +- sdk/metric/controller/basic/controller.go | 83 ++++--- .../controller/basic/controller_test.go | 219 +++++++++++++++--- 3 files changed, 243 insertions(+), 63 deletions(-) diff --git a/sdk/metric/controller/basic/config.go b/sdk/metric/controller/basic/config.go index e7c16679280..1312b1676d4 100644 --- a/sdk/metric/controller/basic/config.go +++ b/sdk/metric/controller/basic/config.go @@ -43,7 +43,7 @@ type Config struct { // CollectTimeout is the timeout of the Context passed to // Collect() and subsequently to Observer instrument callbacks. // - // Defaults to the configured collection period (see CollectPeriod). + // Default value is 10s. If zero, no Collect timeout is applied. CollectTimeout time.Duration // Exporter is used for pushing metric data. @@ -51,7 +51,7 @@ type Config struct { // ExportTimeout is the timeout of the Context when an Exporter is configured. // - // Defaults to the configured collection period (see CollectPeriod). + // Default value is 10s. If zero, no Export timeout is applied. ExportTimeout time.Duration } diff --git a/sdk/metric/controller/basic/controller.go b/sdk/metric/controller/basic/controller.go index e8cba48d554..afbe8dc9adf 100644 --- a/sdk/metric/controller/basic/controller.go +++ b/sdk/metric/controller/basic/controller.go @@ -16,6 +16,7 @@ package basic // import "go.opentelemetry.io/otel/sdk/metric/controller/basic" import ( "context" + "fmt" "sync" "time" @@ -31,6 +32,8 @@ import ( // for Export(). const DefaultPeriod = 10 * time.Second +var ErrControllerStarted = fmt.Errorf("controller already started") + // Controller organizes a periodic push of metric data. type Controller struct { lock sync.Mutex @@ -57,17 +60,13 @@ type Controller struct { // periodic collection. func New(checkpointer export.Checkpointer, opts ...Option) *Controller { c := &Config{ - CollectPeriod: DefaultPeriod, + CollectPeriod: DefaultPeriod, + CollectTimeout: DefaultPeriod, + ExportTimeout: DefaultPeriod, } for _, opt := range opts { opt.Apply(c) } - if c.CollectTimeout == 0 { - c.CollectTimeout = c.CollectPeriod - } - if c.ExportTimeout == 0 { - c.ExportTimeout = c.CollectPeriod - } impl := sdk.NewAccumulator( checkpointer, @@ -101,27 +100,28 @@ func (c *Controller) MeterProvider() metric.MeterProvider { // Start begins a ticker that periodically collects and exports // metrics with the configured interval. -func (c *Controller) Start() { +func (c *Controller) Start(ctx context.Context) error { c.lock.Lock() defer c.lock.Unlock() if c.ticker != nil { - return + return ErrControllerStarted } c.wg.Add(2) c.ticker = c.clock.Ticker(c.collectPeriod) - go c.runTicker(c.stopCh) + go c.runTicker(ctx, c.stopCh) + return nil } // Stop waits for the background goroutine to return and then collects // and exports metrics one last time before returning. -func (c *Controller) Stop() { +func (c *Controller) Stop(ctx context.Context) error { c.lock.Lock() defer c.lock.Unlock() if c.stopCh == nil { - return + return nil } close(c.stopCh) @@ -130,39 +130,42 @@ func (c *Controller) Stop() { c.wg.Wait() c.ticker.Stop() - c.collect(nil) + return c.collect(ctx, nil) } -func (c *Controller) runTicker(stopCh chan struct{}) { +func (c *Controller) runTicker(ctx context.Context, stopCh chan struct{}) { defer c.wg.Done() for { select { case <-stopCh: return case <-c.ticker.C(): - c.collect(stopCh) + if err := c.collect(ctx, stopCh); err != nil { + otel.Handle(err) + } } } } -func (c *Controller) collect(stopCh chan struct{}) { - if err := c.checkpoint(func() bool { +func (c *Controller) collect(ctx context.Context, stopCh chan struct{}) error { + if err := c.checkpoint(ctx, func() bool { return true }); err != nil { - otel.Handle(err) + return err } if c.exporter == nil { - return + return nil } // This export has to complete before starting another // collection since it will hold a read lock and // checkpoint() must re-acquire a write lock. if err := c.export(); err != nil { - otel.Handle(err) + return err } + return nil } -func (c *Controller) checkpoint(cond func() bool) error { +func (c *Controller) checkpoint(ctx context.Context, cond func() bool) error { ckpt := c.checkpointer.CheckpointSet() ckpt.Lock() defer ckpt.Unlock() @@ -172,12 +175,32 @@ func (c *Controller) checkpoint(cond func() bool) error { } c.checkpointer.StartCollection() - ctx, cancel := context.WithTimeout(context.Background(), c.collectTimeout) - defer cancel() + if c.collectTimeout > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, c.collectTimeout) + defer cancel() + } + + _ = c.accumulator.Collect(ctx) + + var err error + select { + case <-ctx.Done(): + err = ctx.Err() + default: + // The context wasn't done, ok. + } - c.accumulator.Collect(ctx) + // Finish the checkpoint whether the accumulator timed out or not. + if cerr := c.checkpointer.FinishCollection(); cerr != nil { + if err == nil { + err = cerr + } else { + err = fmt.Errorf("%s: %w", cerr.Error(), err) + } + } - return c.checkpointer.FinishCollection() + return err } func (c *Controller) export() error { @@ -185,8 +208,12 @@ func (c *Controller) export() error { ckpt.RLock() defer ckpt.RUnlock() - ctx, cancel := context.WithTimeout(context.Background(), c.exportTimeout) - defer cancel() + ctx := context.Background() + if c.exportTimeout > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, c.exportTimeout) + defer cancel() + } return c.exporter.Export(ctx, ckpt) } @@ -217,7 +244,7 @@ func (c *Controller) Collect(ctx context.Context) error { return nil } - return c.checkpoint(func() bool { + return c.checkpoint(ctx, func() bool { // This is called with the CheckpointSet exclusive // lock held. if c.collectPeriod == 0 { diff --git a/sdk/metric/controller/basic/controller_test.go b/sdk/metric/controller/basic/controller_test.go index f75890a808f..658b4aef667 100644 --- a/sdk/metric/controller/basic/controller_test.go +++ b/sdk/metric/controller/basic/controller_test.go @@ -16,6 +16,7 @@ package basic_test import ( "context" + "errors" "fmt" "runtime" "sync" @@ -81,21 +82,23 @@ func newCheckpointer() export.Checkpointer { } func TestPushDoubleStop(t *testing.T) { + ctx := context.Background() exporter := newExporter() checkpointer := newCheckpointer() p := controller.New(checkpointer, controller.WithExporter(exporter)) - p.Start() - p.Stop() - p.Stop() + p.Start(ctx) + p.Stop(ctx) + p.Stop(ctx) } func TestPushDoubleStart(t *testing.T) { + ctx := context.Background() exporter := newExporter() checkpointer := newCheckpointer() p := controller.New(checkpointer, controller.WithExporter(exporter)) - p.Start() - p.Start() - p.Stop() + p.Start(ctx) + p.Start(ctx) + p.Stop(ctx) } func TestPushTicker(t *testing.T) { @@ -116,7 +119,7 @@ func TestPushTicker(t *testing.T) { counter := metric.Must(meter).NewInt64Counter("counter.sum") - p.Start() + p.Start(ctx) counter.Add(ctx, 3) @@ -144,7 +147,7 @@ func TestPushTicker(t *testing.T) { require.Equal(t, 1, exporter.ExportCount()) exporter.Reset() - p.Stop() + p.Stop(ctx) } func TestPushExportError(t *testing.T) { @@ -197,7 +200,7 @@ func TestPushExportError(t *testing.T) { counter1 := metric.Must(meter).NewInt64Counter("counter1.sum") counter2 := metric.Must(meter).NewInt64Counter("counter2.sum") - p.Start() + p.Start(ctx) runtime.Gosched() counter1.Add(ctx, 3, label.String("X", "Y")) @@ -219,7 +222,7 @@ func TestPushExportError(t *testing.T) { require.Equal(t, tt.expectedError, err) } - p.Stop() + p.Stop(ctx) }) } } @@ -310,9 +313,19 @@ func TestPullWithCollect(t *testing.T) { } -func TestStartNoExporter(t *testing.T) { - ctx := context.Background() +func getMap(t *testing.T, cont *controller.Controller) map[string]float64 { + out := processortest.NewOutput(label.DefaultEncoder()) + + require.NoError(t, cont.ForEach( + export.CumulativeExportKindSelector(), + func(record export.Record) error { + return out.AddRecord(record) + }, + )) + return out.Map() +} +func TestStartNoExporter(t *testing.T) { cont := controller.New( processor.New( processortest.AggregatorSelector(), @@ -327,31 +340,20 @@ func TestStartNoExporter(t *testing.T) { calls := int64(0) _ = metric.Must(prov.Meter("named")).NewInt64SumObserver("calls.lastvalue", - func(_ context.Context, result metric.Int64ObserverResult) { + func(ctx context.Context, result metric.Int64ObserverResult) { calls++ + require.Equal(t, "B", ctx.Value("A")) result.Observe(calls, label.String("A", "B")) }, ) - getMap := func() map[string]float64 { - out := processortest.NewOutput(label.DefaultEncoder()) - - require.NoError(t, cont.ForEach( - export.CumulativeExportKindSelector(), - func(record export.Record) error { - return out.AddRecord(record) - }, - )) - return out.Map() - } - // Collect() has not been called. The controller is unstarted. expect := map[string]float64{} // The time advances, but doesn't change the result (not collected). - require.EqualValues(t, expect, getMap()) + require.EqualValues(t, expect, getMap(t, cont)) mock.Add(time.Second) - require.EqualValues(t, expect, getMap()) + require.EqualValues(t, expect, getMap(t, cont)) mock.Add(time.Second) expect = map[string]float64{ @@ -359,11 +361,14 @@ func TestStartNoExporter(t *testing.T) { } // Collect once + ctx := context.Background() + ctx = context.WithValue(ctx, "A", "B") + require.NoError(t, cont.Collect(ctx)) - require.EqualValues(t, expect, getMap()) + require.EqualValues(t, expect, getMap(t, cont)) mock.Add(time.Second) - require.EqualValues(t, expect, getMap()) + require.EqualValues(t, expect, getMap(t, cont)) mock.Add(time.Second) // Again @@ -373,12 +378,12 @@ func TestStartNoExporter(t *testing.T) { require.NoError(t, cont.Collect(ctx)) - require.EqualValues(t, expect, getMap()) + require.EqualValues(t, expect, getMap(t, cont)) mock.Add(time.Second) - require.EqualValues(t, expect, getMap()) + require.EqualValues(t, expect, getMap(t, cont)) // Start the controller - cont.Start() + cont.Start(ctx) for i := 1; i <= 3; i++ { expect = map[string]float64{ @@ -386,6 +391,154 @@ func TestStartNoExporter(t *testing.T) { } mock.Add(time.Second) - require.EqualValues(t, expect, getMap()) + require.EqualValues(t, expect, getMap(t, cont)) + } +} + +func TestObserverCanceled(t *testing.T) { + cont := controller.New( + processor.New( + processortest.AggregatorSelector(), + export.CumulativeExportKindSelector(), + ), + controller.WithCollectPeriod(0), + controller.WithCollectTimeout(time.Millisecond), + ) + + prov := cont.MeterProvider() + calls := int64(0) + + _ = metric.Must(prov.Meter("named")).NewInt64SumObserver("done.lastvalue", + func(ctx context.Context, result metric.Int64ObserverResult) { + <-ctx.Done() + calls++ + result.Observe(calls) + }, + ) + // This relies on the context timing out + err := cont.Collect(context.Background()) + require.Error(t, err) + require.True(t, errors.Is(err, context.DeadlineExceeded)) + + expect := map[string]float64{ + "done.lastvalue//": 1, } + + require.EqualValues(t, expect, getMap(t, cont)) +} + +func TestObserverContext(t *testing.T) { + cont := controller.New( + processor.New( + processortest.AggregatorSelector(), + export.CumulativeExportKindSelector(), + ), + controller.WithCollectTimeout(0), + ) + + prov := cont.MeterProvider() + + _ = metric.Must(prov.Meter("named")).NewInt64SumObserver("done.lastvalue", + func(ctx context.Context, result metric.Int64ObserverResult) { + time.Sleep(10 * time.Millisecond) + require.Equal(t, "B", ctx.Value("A")) + result.Observe(1) + }, + ) + ctx := context.Background() + ctx = context.WithValue(ctx, "A", "B") + + require.NoError(t, cont.Collect(ctx)) + + expect := map[string]float64{ + "done.lastvalue//": 1, + } + + require.EqualValues(t, expect, getMap(t, cont)) +} + +type blockingExporter struct { + calls int + exporter *processortest.Exporter +} + +func newBlockingExporter() *blockingExporter { + return &blockingExporter{ + exporter: processortest.NewExporter( + export.CumulativeExportKindSelector(), + label.DefaultEncoder(), + ), + } +} + +func (b *blockingExporter) Export(ctx context.Context, output export.CheckpointSet) error { + var err error + _ = b.exporter.Export(ctx, output) + if b.calls == 0 { + // timeout once + <-ctx.Done() + err = ctx.Err() + } + b.calls++ + return err +} + +func (_ *blockingExporter) ExportKindFor( + _ *metric.Descriptor, + _ aggregation.Kind, +) export.ExportKind { + return export.CumulativeExportKind +} + +func TestExportTimeout(t *testing.T) { + exporter := newBlockingExporter() + cont := controller.New( + processor.New( + processortest.AggregatorSelector(), + export.CumulativeExportKindSelector(), + ), + controller.WithCollectPeriod(time.Second), + controller.WithExportTimeout(time.Millisecond), + controller.WithExporter(exporter), + ) + mock := controllertest.NewMockClock() + cont.SetClock(mock) + + prov := cont.MeterProvider() + + calls := int64(0) + _ = metric.Must(prov.Meter("named")).NewInt64SumObserver("one.lastvalue", + func(ctx context.Context, result metric.Int64ObserverResult) { + calls++ + result.Observe(calls) + }, + ) + + require.NoError(t, cont.Start(context.Background())) + + // Initial empty state + expect := map[string]float64{} + require.EqualValues(t, expect, exporter.exporter.Values()) + + // Collect after 1s, timeout + mock.Add(time.Second) + + err := testHandler.Flush() + require.Error(t, err) + require.True(t, errors.Is(err, context.DeadlineExceeded)) + + expect = map[string]float64{ + "one.lastvalue//": 1, + } + require.EqualValues(t, expect, exporter.exporter.Values()) + + // Collect again + mock.Add(time.Second) + expect = map[string]float64{ + "one.lastvalue//": 2, + } + require.EqualValues(t, expect, exporter.exporter.Values()) + + err = testHandler.Flush() + require.NoError(t, err) } From c64eba1e58cabcdd3f4eb1ddb074d01f4ce2f19f Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Mon, 30 Nov 2020 01:32:17 -0800 Subject: [PATCH 13/35] Remove ancient example & lint --- .github/dependabot.yml | 10 -- example/basic/go.mod | 15 --- example/basic/go.sum | 30 ----- example/basic/main.go | 118 ------------------ example/otel-collector/main.go | 8 +- example/prom-collector/main.go | 10 +- exporters/otlp/otlp_integration_test.go | 8 +- exporters/stdout/example_test.go | 7 +- exporters/stdout/exporter.go | 6 +- .../controller/basic/controller_test.go | 51 +++++--- 10 files changed, 54 insertions(+), 209 deletions(-) delete mode 100644 example/basic/go.mod delete mode 100644 example/basic/go.sum delete mode 100644 example/basic/main.go diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b556d4a2f35..10449c4554f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -46,16 +46,6 @@ updates: schedule: day: sunday interval: weekly - - - package-ecosystem: gomod - directory: /example/basic - labels: - - dependencies - - go - - "Skip Changelog" - schedule: - day: sunday - interval: weekly - package-ecosystem: gomod directory: /example/jaeger diff --git a/example/basic/go.mod b/example/basic/go.mod deleted file mode 100644 index d62c9966371..00000000000 --- a/example/basic/go.mod +++ /dev/null @@ -1,15 +0,0 @@ -module go.opentelemetry.io/otel/example/basic - -go 1.14 - -replace ( - go.opentelemetry.io/otel => ../.. - go.opentelemetry.io/otel/exporters/stdout => ../../exporters/stdout - go.opentelemetry.io/otel/sdk => ../../sdk -) - -require ( - go.opentelemetry.io/otel v0.14.0 - go.opentelemetry.io/otel/exporters/stdout v0.14.0 - go.opentelemetry.io/otel/sdk v0.14.0 -) diff --git a/example/basic/go.sum b/example/basic/go.sum deleted file mode 100644 index c7a24069021..00000000000 --- a/example/basic/go.sum +++ /dev/null @@ -1,30 +0,0 @@ -github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= -github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= -github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/example/basic/main.go b/example/basic/main.go deleted file mode 100644 index 5e23bf73560..00000000000 --- a/example/basic/main.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "context" - "log" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/baggage" - "go.opentelemetry.io/otel/exporters/stdout" - "go.opentelemetry.io/otel/label" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/propagation" - controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" - processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" - "go.opentelemetry.io/otel/sdk/metric/selector/simple" - sdktrace "go.opentelemetry.io/otel/sdk/trace" - "go.opentelemetry.io/otel/trace" -) - -var ( - fooKey = label.Key("ex.com/foo") - barKey = label.Key("ex.com/bar") - lemonsKey = label.Key("ex.com/lemons") - anotherKey = label.Key("ex.com/another") -) - -func main() { - exporter, err := stdout.NewExporter([]stdout.Option{ - stdout.WithQuantiles([]float64{0.5, 0.9, 0.99}), - stdout.WithPrettyPrint(), - }...) - if err != nil { - log.Fatalf("failed to initialize stdout export pipeline: %v", err) - } - - bsp := sdktrace.NewBatchSpanProcessor(exporter) - tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(bsp)) - defer func() { _ = tp.Shutdown(context.Background()) }() - pusher := controller.New( - processor.New( - simple.NewWithExactDistribution(), - exporter, - ), - controller.WithExporter(exporter), - ) - pusher.Start() - defer pusher.Stop() - otel.SetTracerProvider(tp) - otel.SetMeterProvider(pusher.MeterProvider()) - - // set global propagator to baggage (the default is no-op). - otel.SetTextMapPropagator(propagation.Baggage{}) - tracer := otel.Tracer("ex.com/basic") - meter := otel.Meter("ex.com/basic") - - commonLabels := []label.KeyValue{lemonsKey.Int(10), label.String("A", "1"), label.String("B", "2"), label.String("C", "3")} - - oneMetricCB := func(_ context.Context, result metric.Float64ObserverResult) { - result.Observe(1, commonLabels...) - } - _ = metric.Must(meter).NewFloat64ValueObserver("ex.com.one", oneMetricCB, - metric.WithDescription("A ValueObserver set to 1.0"), - ) - - valuerecorderTwo := metric.Must(meter).NewFloat64ValueRecorder("ex.com.two") - - ctx := context.Background() - ctx = baggage.ContextWithValues(ctx, fooKey.String("foo1"), barKey.String("bar1")) - - valuerecorder := valuerecorderTwo.Bind(commonLabels...) - defer valuerecorder.Unbind() - - err = func(ctx context.Context) error { - var span trace.Span - ctx, span = tracer.Start(ctx, "operation") - defer span.End() - - span.AddEvent("Nice operation!", trace.WithAttributes(label.Int("bogons", 100))) - span.SetAttributes(anotherKey.String("yes")) - - meter.RecordBatch( - // Note: call-site variables added as context Entries: - baggage.ContextWithValues(ctx, anotherKey.String("xyz")), - commonLabels, - - valuerecorderTwo.Measurement(2.0), - ) - - return func(ctx context.Context) error { - var span trace.Span - ctx, span = tracer.Start(ctx, "Sub operation...") - defer span.End() - - span.SetAttributes(lemonsKey.String("five")) - span.AddEvent("Sub span event") - valuerecorder.Record(ctx, 1.3) - - return nil - }(ctx) - }(ctx) - if err != nil { - panic(err) - } -} diff --git a/example/otel-collector/main.go b/example/otel-collector/main.go index d12c1f45aa1..d9c80a48d3a 100644 --- a/example/otel-collector/main.go +++ b/example/otel-collector/main.go @@ -71,7 +71,7 @@ func initProvider() func() { sdktrace.WithSpanProcessor(bsp), ) - pusher := controller.New( + controller := controller.New( processor.New( simple.NewWithExactDistribution(), exp, @@ -83,13 +83,13 @@ func initProvider() func() { // set global propagator to tracecontext (the default is no-op). otel.SetTextMapPropagator(propagation.TraceContext{}) otel.SetTracerProvider(tracerProvider) - otel.SetMeterProvider(pusher.MeterProvider()) - pusher.Start() + otel.SetMeterProvider(controller.MeterProvider()) + handleErr(controller.Start(context.Background()), "failed to start controller") return func() { handleErr(tracerProvider.Shutdown(ctx), "failed to shutdown provider") handleErr(exp.Shutdown(ctx), "failed to stop exporter") - pusher.Stop() // pushes any last exports to the receiver + handleErr(controller.Stop(context.Background()), "failed to stop controller") } } diff --git a/example/prom-collector/main.go b/example/prom-collector/main.go index a63912f0df1..173a05e189b 100644 --- a/example/prom-collector/main.go +++ b/example/prom-collector/main.go @@ -43,7 +43,7 @@ func initMeter() { resource.WithAttributes(label.String("R", "V")), ) if err != nil { - log.Panic("could not initialize resource:", err) + log.Fatal("could not initialize resource:", err) } otlpExporter, err := otlp.NewExporter(ctx, @@ -52,7 +52,7 @@ func initMeter() { otlp.WithGRPCDialOption(grpc.WithBlock()), // useful for testing ) if err != nil { - log.Panic("could not initialize OTLP:", err) + log.Fatal("could not initialize OTLP:", err) } cont := controller.New( @@ -67,11 +67,13 @@ func initMeter() { controller.WithExporter(otlpExporter), ) - cont.Start() + if err := cont.Start(context.Background()); err != nil { + log.Fatal("could not start controller:", err) + } promExporter, err := prometheus.NewExporter(prometheus.Config{}, cont) if err != nil { - log.Panic("could not initialize prometheus:", err) + log.Fatal("could not initialize prometheus:", err) } http.HandleFunc("/", promExporter.ServeHTTP) go func() { diff --git a/exporters/otlp/otlp_integration_test.go b/exporters/otlp/otlp_integration_test.go index f9c0b7ae1f7..0fd8f1d5a86 100644 --- a/exporters/otlp/otlp_integration_test.go +++ b/exporters/otlp/otlp_integration_test.go @@ -123,7 +123,7 @@ func newExporterEndToEndTest(t *testing.T, additionalOpts []otlp.ExporterOption) selector := simple.NewWithInexpensiveDistribution() processor := processor.New(selector, metricsdk.StatelessExportKindSelector()) pusher := controller.New(processor, controller.WithExporter(exp)) - pusher.Start() + require.NoError(t, pusher.Start(context.Background())) meter := pusher.MeterProvider().Meter("test-meter") labels := []label.KeyValue{label.Bool("test", true)} @@ -184,7 +184,7 @@ func newExporterEndToEndTest(t *testing.T, additionalOpts []otlp.ExporterOption) } // Flush and close. - pusher.Stop() + require.NoError(t, pusher.Stop(context.Background())) // Wait >2 cycles. <-time.After(40 * time.Millisecond) @@ -520,10 +520,10 @@ func TestNewExporter_withMultipleAttributeTypes(t *testing.T) { selector := simple.NewWithInexpensiveDistribution() processor := processor.New(selector, metricsdk.StatelessExportKindSelector()) pusher := controller.New(processor, controller.WithExporter(exp)) - pusher.Start() + require.NoError(t, pusher.Start(context.Background())) // Flush and close. - pusher.Stop() + require.NoError(t, pusher.Stop(context.Background())) // Wait >2 cycles. <-time.After(40 * time.Millisecond) diff --git a/exporters/stdout/example_test.go b/exporters/stdout/example_test.go index e537f71e4d2..4bf4805b2d8 100644 --- a/exporters/stdout/example_test.go +++ b/exporters/stdout/example_test.go @@ -85,8 +85,11 @@ func Example() { if err != nil { log.Fatal("Could not initialize stdout exporter:", err) } - defer pusher.Stop() - ctx := context.Background() + log.Println("the answer is", add(ctx, multiply(ctx, multiply(ctx, 2, 2), 10), 2)) + + if err := pusher.Stop(ctx); err != nil { + log.Fatal("Could not stop stdout exporter:", err) + } } diff --git a/exporters/stdout/exporter.go b/exporters/stdout/exporter.go index 3643c6d5eb1..2a80e9c890c 100644 --- a/exporters/stdout/exporter.go +++ b/exporters/stdout/exporter.go @@ -15,6 +15,8 @@ package stdout // import "go.opentelemetry.io/otel/exporters/stdout" import ( + "context" + "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/sdk/export/metric" exporttrace "go.opentelemetry.io/otel/sdk/export/trace" @@ -67,9 +69,9 @@ func NewExportPipeline(exportOpts []Option, pushOpts []controller.Option) (trace controller.WithExporter(exporter), )..., ) - pusher.Start() + err = pusher.Start(context.Background()) - return tp, pusher, nil + return tp, pusher, err } // InstallNewPipeline creates a complete export pipelines with defaults and diff --git a/sdk/metric/controller/basic/controller_test.go b/sdk/metric/controller/basic/controller_test.go index 658b4aef667..dde67f81e2b 100644 --- a/sdk/metric/controller/basic/controller_test.go +++ b/sdk/metric/controller/basic/controller_test.go @@ -86,9 +86,9 @@ func TestPushDoubleStop(t *testing.T) { exporter := newExporter() checkpointer := newCheckpointer() p := controller.New(checkpointer, controller.WithExporter(exporter)) - p.Start(ctx) - p.Stop(ctx) - p.Stop(ctx) + require.NoError(t, p.Start(ctx)) + require.NoError(t, p.Stop(ctx)) + require.NoError(t, p.Stop(ctx)) } func TestPushDoubleStart(t *testing.T) { @@ -96,9 +96,11 @@ func TestPushDoubleStart(t *testing.T) { exporter := newExporter() checkpointer := newCheckpointer() p := controller.New(checkpointer, controller.WithExporter(exporter)) - p.Start(ctx) - p.Start(ctx) - p.Stop(ctx) + require.NoError(t, p.Start(ctx)) + err := p.Start(ctx) + require.Error(t, err) + require.True(t, errors.Is(err, controller.ErrControllerStarted)) + require.NoError(t, p.Stop(ctx)) } func TestPushTicker(t *testing.T) { @@ -119,7 +121,7 @@ func TestPushTicker(t *testing.T) { counter := metric.Must(meter).NewInt64Counter("counter.sum") - p.Start(ctx) + require.NoError(t, p.Start(ctx)) counter.Add(ctx, 3) @@ -147,7 +149,7 @@ func TestPushTicker(t *testing.T) { require.Equal(t, 1, exporter.ExportCount()) exporter.Reset() - p.Stop(ctx) + require.NoError(t, p.Stop(ctx)) } func TestPushExportError(t *testing.T) { @@ -200,7 +202,7 @@ func TestPushExportError(t *testing.T) { counter1 := metric.Must(meter).NewInt64Counter("counter1.sum") counter2 := metric.Must(meter).NewInt64Counter("counter2.sum") - p.Start(ctx) + require.NoError(t, p.Start(ctx)) runtime.Gosched() counter1.Add(ctx, 3, label.String("X", "Y")) @@ -222,7 +224,7 @@ func TestPushExportError(t *testing.T) { require.Equal(t, tt.expectedError, err) } - p.Stop(ctx) + require.NoError(t, p.Stop(ctx)) }) } } @@ -325,6 +327,17 @@ func getMap(t *testing.T, cont *controller.Controller) map[string]float64 { return out.Map() } +type testContextKey string + +func testContext() context.Context { + ctx := context.Background() + return context.WithValue(ctx, testContextKey("A"), "B") +} + +func checkTestContext(t *testing.T, ctx context.Context) { + require.Equal(t, "B", ctx.Value(testContextKey("A"))) +} + func TestStartNoExporter(t *testing.T) { cont := controller.New( processor.New( @@ -342,7 +355,7 @@ func TestStartNoExporter(t *testing.T) { _ = metric.Must(prov.Meter("named")).NewInt64SumObserver("calls.lastvalue", func(ctx context.Context, result metric.Int64ObserverResult) { calls++ - require.Equal(t, "B", ctx.Value("A")) + checkTestContext(t, ctx) result.Observe(calls, label.String("A", "B")) }, ) @@ -361,8 +374,7 @@ func TestStartNoExporter(t *testing.T) { } // Collect once - ctx := context.Background() - ctx = context.WithValue(ctx, "A", "B") + ctx := testContext() require.NoError(t, cont.Collect(ctx)) @@ -383,7 +395,7 @@ func TestStartNoExporter(t *testing.T) { require.EqualValues(t, expect, getMap(t, cont)) // Start the controller - cont.Start(ctx) + require.NoError(t, cont.Start(ctx)) for i := 1; i <= 3; i++ { expect = map[string]float64{ @@ -441,12 +453,11 @@ func TestObserverContext(t *testing.T) { _ = metric.Must(prov.Meter("named")).NewInt64SumObserver("done.lastvalue", func(ctx context.Context, result metric.Int64ObserverResult) { time.Sleep(10 * time.Millisecond) - require.Equal(t, "B", ctx.Value("A")) + checkTestContext(t, ctx) result.Observe(1) }, ) - ctx := context.Background() - ctx = context.WithValue(ctx, "A", "B") + ctx := testContext() require.NoError(t, cont.Collect(ctx)) @@ -483,9 +494,9 @@ func (b *blockingExporter) Export(ctx context.Context, output export.CheckpointS return err } -func (_ *blockingExporter) ExportKindFor( - _ *metric.Descriptor, - _ aggregation.Kind, +func (*blockingExporter) ExportKindFor( + *metric.Descriptor, + aggregation.Kind, ) export.ExportKind { return export.CumulativeExportKind } From 70d532689fa519f52aa05aa3681c96661212b4f7 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Mon, 30 Nov 2020 01:35:43 -0800 Subject: [PATCH 14/35] go.mod revert & tidy --- bridge/opencensus/go.sum | 9 --------- bridge/opentracing/go.sum | 9 --------- example/jaeger/go.sum | 4 ---- example/namedtracer/go.sum | 9 --------- example/opencensus/go.sum | 9 --------- example/otel-collector/go.sum | 9 --------- example/zipkin/go.sum | 7 ------- exporters/otlp/go.sum | 9 --------- exporters/stdout/go.sum | 9 --------- exporters/trace/jaeger/go.sum | 4 ---- exporters/trace/zipkin/go.sum | 7 ------- go.mod | 3 --- go.sum | 9 --------- sdk/go.sum | 9 --------- 14 files changed, 106 deletions(-) diff --git a/bridge/opencensus/go.sum b/bridge/opencensus/go.sum index b1a3447ebd2..15c1a955767 100644 --- a/bridge/opencensus/go.sum +++ b/bridge/opencensus/go.sum @@ -3,8 +3,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -14,11 +12,6 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -60,8 +53,6 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/bridge/opentracing/go.sum b/bridge/opentracing/go.sum index 0edd60c6cd8..f54f9cb911d 100644 --- a/bridge/opentracing/go.sum +++ b/bridge/opentracing/go.sum @@ -1,14 +1,7 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -21,7 +14,5 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IV golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/example/jaeger/go.sum b/example/jaeger/go.sum index e587e4ea5a1..b088e72c00c 100644 --- a/example/jaeger/go.sum +++ b/example/jaeger/go.sum @@ -45,8 +45,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -378,8 +376,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/example/namedtracer/go.sum b/example/namedtracer/go.sum index c7a24069021..57f074623d2 100644 --- a/example/namedtracer/go.sum +++ b/example/namedtracer/go.sum @@ -4,17 +4,10 @@ github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJy github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -24,7 +17,5 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IV golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/example/opencensus/go.sum b/example/opencensus/go.sum index 01d10a22742..aec2a1be51f 100644 --- a/example/opencensus/go.sum +++ b/example/opencensus/go.sum @@ -7,8 +7,6 @@ github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiU github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -20,11 +18,6 @@ github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -66,8 +59,6 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index 279f89abedb..125f50ba892 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -9,8 +9,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -40,11 +38,6 @@ github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -101,8 +94,6 @@ google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyz google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/example/zipkin/go.sum b/example/zipkin/go.sum index 33c93cfe3cb..42fd0cf2cb1 100644 --- a/example/zipkin/go.sum +++ b/example/zipkin/go.sum @@ -44,11 +44,6 @@ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -112,8 +107,6 @@ google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/exporters/otlp/go.sum b/exporters/otlp/go.sum index 7e4b094a929..2688698810a 100644 --- a/exporters/otlp/go.sum +++ b/exporters/otlp/go.sum @@ -9,8 +9,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -39,11 +37,6 @@ github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -100,8 +93,6 @@ google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyz google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/exporters/stdout/go.sum b/exporters/stdout/go.sum index c7a24069021..57f074623d2 100644 --- a/exporters/stdout/go.sum +++ b/exporters/stdout/go.sum @@ -4,17 +4,10 @@ github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJy github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -24,7 +17,5 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IV golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/exporters/trace/jaeger/go.sum b/exporters/trace/jaeger/go.sum index c7540dbf250..d719931b5a0 100644 --- a/exporters/trace/jaeger/go.sum +++ b/exporters/trace/jaeger/go.sum @@ -45,8 +45,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -385,8 +383,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/exporters/trace/zipkin/go.sum b/exporters/trace/zipkin/go.sum index 399c6555270..1a4f5840508 100644 --- a/exporters/trace/zipkin/go.sum +++ b/exporters/trace/zipkin/go.sum @@ -44,11 +44,6 @@ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -115,8 +110,6 @@ google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/go.mod b/go.mod index d1805b071a8..5dfec2aa1d7 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,6 @@ module go.opentelemetry.io/otel go 1.14 require ( - github.com/davecgh/go-spew v1.1.1 // indirect github.com/google/go-cmp v0.5.3 - github.com/kr/pretty v0.1.0 // indirect github.com/stretchr/testify v1.6.1 - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect ) diff --git a/go.sum b/go.sum index 086e4a034cc..118ac6a984f 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,7 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -18,7 +11,5 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IV golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/go.sum b/sdk/go.sum index c7a24069021..57f074623d2 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -4,17 +4,10 @@ github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJy github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -24,7 +17,5 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IV golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From f0318ac721cbcfd1c47416cb7f509cfb284141e6 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Mon, 30 Nov 2020 01:58:59 -0800 Subject: [PATCH 15/35] Comments --- .gitignore | 1 - sdk/metric/controller/basic/controller.go | 60 +++++++++++++++++++---- 2 files changed, 50 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 22005bda019..06860682946 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ coverage.* gen/ -/example/basic/basic /example/grpc/client/client /example/grpc/server/server /example/http/client/client diff --git a/sdk/metric/controller/basic/controller.go b/sdk/metric/controller/basic/controller.go index afbe8dc9adf..e90348f2557 100644 --- a/sdk/metric/controller/basic/controller.go +++ b/sdk/metric/controller/basic/controller.go @@ -28,13 +28,31 @@ import ( controllerTime "go.opentelemetry.io/otel/sdk/metric/controller/time" ) -// DefaultPeriod is the minimum time between collections, maximum time -// for Export(). +// DefaultPeriod is used for: +// +// - the minimum time between calls to Collect() +// - the timeout for Export() +// - the timeout for Collect(). const DefaultPeriod = 10 * time.Second +// ErrControllerStarted indicates that a controller was started more +// than once. var ErrControllerStarted = fmt.Errorf("controller already started") -// Controller organizes a periodic push of metric data. +// Controller organizes and synchronizes collection of metric data in +// both "pull" and "push" configurations. This supports two distinct +// modes: +// +// - Push and Pull: Start() must be called to begin calling the exporter; +// Collect() is called periodically by a background thread after starting +// the controller. +// - Pull-Only: Start() is optional in this case, to call Collect periodically. +// If Start() is not called, Collect() can be called manually to initiate +// collection +// +// The controller supports mixing push and pull access to metric data +// using the export.CheckpointSet RWLock interface. Collection will +// be blocked by a pull request in the basic controller. type Controller struct { lock sync.Mutex accumulator *sdk.Accumulator @@ -55,9 +73,9 @@ type Controller struct { collectedTime time.Time } -// New constructs a Controller, an implementation of MeterProvider, using the -// provided checkpointer, exporter, and options to configure an SDK with -// periodic collection. +// New constructs a Controller using the provided checkpointer and +// options (including an optional Exporter) to configure an metric +// export pipeline. func New(checkpointer export.Checkpointer, opts ...Option) *Controller { c := &Config{ CollectPeriod: DefaultPeriod, @@ -99,7 +117,17 @@ func (c *Controller) MeterProvider() metric.MeterProvider { } // Start begins a ticker that periodically collects and exports -// metrics with the configured interval. +// metrics with the configured interval. This is required for calling +// a configured Exporter (see WithExporter) and is otherwise optional +// when only pulling metric data. +// +// The passed context is passed to Collect() and subsequently to +// asychronous instrument callbacks. Returns an error when the +// controller was already started. +// +// Note that it is not necessary to Start a controller when only +// pulling data; use the Collect() and ForEach() methods directly in +// this case. func (c *Controller) Start(ctx context.Context) error { c.lock.Lock() defer c.lock.Unlock() @@ -115,7 +143,9 @@ func (c *Controller) Start(ctx context.Context) error { } // Stop waits for the background goroutine to return and then collects -// and exports metrics one last time before returning. +// and exports metrics one last time before returning. The passed +// context is passed to Collect() and subsequently to asynchronous +// instruments. func (c *Controller) Stop(ctx context.Context) error { c.lock.Lock() defer c.lock.Unlock() @@ -133,6 +163,7 @@ func (c *Controller) Stop(ctx context.Context) error { return c.collect(ctx, nil) } +// runTicker collection on ticker events until the stop channel is closed. func (c *Controller) runTicker(ctx context.Context, stopCh chan struct{}) { defer c.wg.Done() for { @@ -147,6 +178,7 @@ func (c *Controller) runTicker(ctx context.Context, stopCh chan struct{}) { } } +// collect computes a checkpoint and optionally exports it. func (c *Controller) collect(ctx context.Context, stopCh chan struct{}) error { if err := c.checkpoint(ctx, func() bool { return true @@ -165,6 +197,9 @@ func (c *Controller) collect(ctx context.Context, stopCh chan struct{}) error { return nil } +// checkpoint calls the Accumulator and Checkpointer interfaces to +// compute the CheckpointSet. This applies the configured collection +// timeout. func (c *Controller) checkpoint(ctx context.Context, cond func() bool) error { ckpt := c.checkpointer.CheckpointSet() ckpt.Lock() @@ -203,6 +238,8 @@ func (c *Controller) checkpoint(ctx context.Context, cond func() bool) error { return err } +// export calls the exporter with a read lock on the CheckpointSet, +// applying the configured export timeout. func (c *Controller) export() error { ckpt := c.checkpointer.CheckpointSet() ckpt.RLock() @@ -228,7 +265,9 @@ func (c *Controller) ForEach(ks export.ExportKindSelector, f func(export.Record) return ckpt.ForEach(ks, f) } -// IsRunning returns true if the controller was started via Start(). +// IsRunning returns true if the controller was started via Start(), +// indicating that the current export.CheckpointSet is being kept +// up-to-date. func (c *Controller) IsRunning() bool { c.lock.Lock() defer c.lock.Unlock() @@ -236,7 +275,8 @@ func (c *Controller) IsRunning() bool { } // Collect requests a collection. The collection will be skipped if -// the last collection is aged less than the CachePeriod. +// the last collection is aged less than the configured collection +// period. func (c *Controller) Collect(ctx context.Context) error { if c.IsRunning() { // When there's a non-nil ticker, there's a goroutine From a345da872778409fd28d2eec88f8644c0a0e6ef0 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Mon, 30 Nov 2020 02:00:33 -0800 Subject: [PATCH 16/35] Tidy a diff --- .github/dependabot.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 10449c4554f..8a7022b15ba 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -58,7 +58,7 @@ updates: interval: weekly - package-ecosystem: gomod - directory: /example/namedtracer + directory: /example/prom-collector labels: - dependencies - go @@ -68,7 +68,7 @@ updates: interval: weekly - package-ecosystem: gomod - directory: /example/opencensus + directory: /example/namedtracer labels: - dependencies - go @@ -78,7 +78,7 @@ updates: interval: weekly - package-ecosystem: gomod - directory: /example/otel-collector + directory: /example/opencensus labels: - dependencies - go @@ -88,7 +88,7 @@ updates: interval: weekly - package-ecosystem: gomod - directory: /example/prometheus + directory: /example/otel-collector labels: - dependencies - go @@ -98,7 +98,7 @@ updates: interval: weekly - package-ecosystem: gomod - directory: /example/prom-collector + directory: /example/prometheus labels: - dependencies - go From 92adfd66418c0e69f12ed0eb5b3da38a2745c752 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Mon, 30 Nov 2020 02:01:14 -0800 Subject: [PATCH 17/35] Tidy a diff --- .github/dependabot.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8a7022b15ba..aa5a78781b2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -48,7 +48,7 @@ updates: interval: weekly - package-ecosystem: gomod - directory: /example/jaeger + directory: /example/prom-collector labels: - dependencies - go @@ -58,7 +58,7 @@ updates: interval: weekly - package-ecosystem: gomod - directory: /example/prom-collector + directory: /example/jaeger labels: - dependencies - go From 14e88140db21db09cfbee8db6c08aef2312da196 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Mon, 30 Nov 2020 22:10:34 -0800 Subject: [PATCH 18/35] Move export kind selector in the new example --- example/prom-collector/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/prom-collector/main.go b/example/prom-collector/main.go index 173a05e189b..76e45fbe98c 100644 --- a/example/prom-collector/main.go +++ b/example/prom-collector/main.go @@ -50,6 +50,7 @@ func initMeter() { otlp.WithInsecure(), otlp.WithAddress("127.0.0.1:17001"), otlp.WithGRPCDialOption(grpc.WithBlock()), // useful for testing + otlp.WithMetricExportKindSelector(export.CumulativeExportKindSelector()), ) if err != nil { log.Fatal("could not initialize OTLP:", err) @@ -60,7 +61,7 @@ func initMeter() { simple.NewWithHistogramDistribution([]float64{ 0.001, 0.01, 0.1, 1, 10, 100, 1000, }), - export.CumulativeExportKindSelector(), + otlpExporter, // otlpExporter is an ExportKindSelector processor.WithMemory(true), ), controller.WithResource(res), From 8eccdc97bc6e5a9bdb5360d45cb9f981dc108ff5 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Tue, 1 Dec 2020 01:28:05 -0800 Subject: [PATCH 19/35] Split this test into its original parts --- .../controller/basic/controller_test.go | 283 ------------------ sdk/metric/controller/basic/pull_test.go | 118 ++++++++ sdk/metric/controller/basic/push_test.go | 230 ++++++++++++++ 3 files changed, 348 insertions(+), 283 deletions(-) create mode 100644 sdk/metric/controller/basic/pull_test.go create mode 100644 sdk/metric/controller/basic/push_test.go diff --git a/sdk/metric/controller/basic/controller_test.go b/sdk/metric/controller/basic/controller_test.go index dde67f81e2b..55c98a81549 100644 --- a/sdk/metric/controller/basic/controller_test.go +++ b/sdk/metric/controller/basic/controller_test.go @@ -17,15 +17,11 @@ package basic_test import ( "context" "errors" - "fmt" - "runtime" - "sync" "testing" "time" "github.com/stretchr/testify/require" - "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/label" "go.opentelemetry.io/otel/metric" export "go.opentelemetry.io/otel/sdk/export/metric" @@ -34,287 +30,8 @@ import ( "go.opentelemetry.io/otel/sdk/metric/controller/controllertest" processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" "go.opentelemetry.io/otel/sdk/metric/processor/processortest" - "go.opentelemetry.io/otel/sdk/resource" ) -var testResource = resource.NewWithAttributes(label.String("R", "V")) - -type handler struct { - sync.Mutex - err error -} - -func (h *handler) Handle(err error) { - h.Lock() - h.err = err - h.Unlock() -} - -func (h *handler) Flush() error { - h.Lock() - err := h.err - h.err = nil - h.Unlock() - return err -} - -var testHandler *handler - -func init() { - testHandler = new(handler) - otel.SetErrorHandler(testHandler) -} - -func newExporter() *processortest.Exporter { - return processortest.NewExporter( - export.StatelessExportKindSelector(), - label.DefaultEncoder(), - ) -} - -func newCheckpointer() export.Checkpointer { - return processortest.Checkpointer( - processortest.NewProcessor( - processortest.AggregatorSelector(), - label.DefaultEncoder(), - ), - ) -} - -func TestPushDoubleStop(t *testing.T) { - ctx := context.Background() - exporter := newExporter() - checkpointer := newCheckpointer() - p := controller.New(checkpointer, controller.WithExporter(exporter)) - require.NoError(t, p.Start(ctx)) - require.NoError(t, p.Stop(ctx)) - require.NoError(t, p.Stop(ctx)) -} - -func TestPushDoubleStart(t *testing.T) { - ctx := context.Background() - exporter := newExporter() - checkpointer := newCheckpointer() - p := controller.New(checkpointer, controller.WithExporter(exporter)) - require.NoError(t, p.Start(ctx)) - err := p.Start(ctx) - require.Error(t, err) - require.True(t, errors.Is(err, controller.ErrControllerStarted)) - require.NoError(t, p.Stop(ctx)) -} - -func TestPushTicker(t *testing.T) { - exporter := newExporter() - checkpointer := newCheckpointer() - p := controller.New( - checkpointer, - controller.WithExporter(exporter), - controller.WithCollectPeriod(time.Second), - controller.WithResource(testResource), - ) - meter := p.MeterProvider().Meter("name") - - mock := controllertest.NewMockClock() - p.SetClock(mock) - - ctx := context.Background() - - counter := metric.Must(meter).NewInt64Counter("counter.sum") - - require.NoError(t, p.Start(ctx)) - - counter.Add(ctx, 3) - - require.EqualValues(t, map[string]float64{}, exporter.Values()) - - mock.Add(time.Second) - runtime.Gosched() - - require.EqualValues(t, map[string]float64{ - "counter.sum//R=V": 3, - }, exporter.Values()) - - require.Equal(t, 1, exporter.ExportCount()) - exporter.Reset() - - counter.Add(ctx, 7) - - mock.Add(time.Second) - runtime.Gosched() - - require.EqualValues(t, map[string]float64{ - "counter.sum//R=V": 10, - }, exporter.Values()) - - require.Equal(t, 1, exporter.ExportCount()) - exporter.Reset() - - require.NoError(t, p.Stop(ctx)) -} - -func TestPushExportError(t *testing.T) { - injector := func(name string, e error) func(r export.Record) error { - return func(r export.Record) error { - if r.Descriptor().Name() == name { - return e - } - return nil - } - } - var errAggregator = fmt.Errorf("unexpected error") - var tests = []struct { - name string - injectedError error - expected map[string]float64 - expectedError error - }{ - {"errNone", nil, map[string]float64{ - "counter1.sum/X=Y/R=V": 3, - "counter2.sum//R=V": 5, - }, nil}, - {"errNoData", aggregation.ErrNoData, map[string]float64{ - "counter2.sum//R=V": 5, - }, nil}, - {"errUnexpected", errAggregator, map[string]float64{}, errAggregator}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - exporter := newExporter() - exporter.InjectErr = injector("counter1.sum", tt.injectedError) - - // This test validates the error handling - // behavior of the basic Processor is honored - // by the push processor. - checkpointer := processor.New(processortest.AggregatorSelector(), exporter) - p := controller.New( - checkpointer, - controller.WithExporter(exporter), - controller.WithCollectPeriod(time.Second), - controller.WithResource(testResource), - ) - - mock := controllertest.NewMockClock() - p.SetClock(mock) - - ctx := context.Background() - - meter := p.MeterProvider().Meter("name") - counter1 := metric.Must(meter).NewInt64Counter("counter1.sum") - counter2 := metric.Must(meter).NewInt64Counter("counter2.sum") - - require.NoError(t, p.Start(ctx)) - runtime.Gosched() - - counter1.Add(ctx, 3, label.String("X", "Y")) - counter2.Add(ctx, 5) - - require.Equal(t, 0, exporter.ExportCount()) - require.Nil(t, testHandler.Flush()) - - mock.Add(time.Second) - runtime.Gosched() - - require.Equal(t, 1, exporter.ExportCount()) - if tt.expectedError == nil { - require.EqualValues(t, tt.expected, exporter.Values()) - require.NoError(t, testHandler.Flush()) - } else { - err := testHandler.Flush() - require.Error(t, err) - require.Equal(t, tt.expectedError, err) - } - - require.NoError(t, p.Stop(ctx)) - }) - } -} - -func TestPullNoCollect(t *testing.T) { - puller := controller.New( - processor.New( - processortest.AggregatorSelector(), - export.CumulativeExportKindSelector(), - processor.WithMemory(true), - ), - controller.WithCollectPeriod(0), - ) - - ctx := context.Background() - meter := puller.MeterProvider().Meter("nocache") - counter := metric.Must(meter).NewInt64Counter("counter.sum") - - counter.Add(ctx, 10, label.String("A", "B")) - - require.NoError(t, puller.Collect(ctx)) - records := processortest.NewOutput(label.DefaultEncoder()) - require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) - - require.EqualValues(t, map[string]float64{ - "counter.sum/A=B/": 10, - }, records.Map()) - - counter.Add(ctx, 10, label.String("A", "B")) - - require.NoError(t, puller.Collect(ctx)) - records = processortest.NewOutput(label.DefaultEncoder()) - require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) - - require.EqualValues(t, map[string]float64{ - "counter.sum/A=B/": 20, - }, records.Map()) -} - -func TestPullWithCollect(t *testing.T) { - puller := controller.New( - processor.New( - processortest.AggregatorSelector(), - export.CumulativeExportKindSelector(), - processor.WithMemory(true), - ), - controller.WithCollectPeriod(time.Second), - ) - mock := controllertest.NewMockClock() - puller.SetClock(mock) - - ctx := context.Background() - meter := puller.MeterProvider().Meter("nocache") - counter := metric.Must(meter).NewInt64Counter("counter.sum") - - counter.Add(ctx, 10, label.String("A", "B")) - - require.NoError(t, puller.Collect(ctx)) - records := processortest.NewOutput(label.DefaultEncoder()) - require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) - - require.EqualValues(t, map[string]float64{ - "counter.sum/A=B/": 10, - }, records.Map()) - - counter.Add(ctx, 10, label.String("A", "B")) - - // Cached value! - require.NoError(t, puller.Collect(ctx)) - records = processortest.NewOutput(label.DefaultEncoder()) - require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) - - require.EqualValues(t, map[string]float64{ - "counter.sum/A=B/": 10, - }, records.Map()) - - mock.Add(time.Second) - runtime.Gosched() - - // Re-computed value! - require.NoError(t, puller.Collect(ctx)) - records = processortest.NewOutput(label.DefaultEncoder()) - require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) - - require.EqualValues(t, map[string]float64{ - "counter.sum/A=B/": 20, - }, records.Map()) - -} - func getMap(t *testing.T, cont *controller.Controller) map[string]float64 { out := processortest.NewOutput(label.DefaultEncoder()) diff --git a/sdk/metric/controller/basic/pull_test.go b/sdk/metric/controller/basic/pull_test.go new file mode 100644 index 00000000000..1e08323565d --- /dev/null +++ b/sdk/metric/controller/basic/pull_test.go @@ -0,0 +1,118 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package basic_test + +import ( + "context" + "runtime" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/otel/label" + "go.opentelemetry.io/otel/metric" + export "go.opentelemetry.io/otel/sdk/export/metric" + controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" + "go.opentelemetry.io/otel/sdk/metric/controller/controllertest" + processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" + "go.opentelemetry.io/otel/sdk/metric/processor/processortest" +) + +func TestPullNoCollect(t *testing.T) { + puller := controller.New( + processor.New( + processortest.AggregatorSelector(), + export.CumulativeExportKindSelector(), + processor.WithMemory(true), + ), + controller.WithCollectPeriod(0), + ) + + ctx := context.Background() + meter := puller.MeterProvider().Meter("nocache") + counter := metric.Must(meter).NewInt64Counter("counter.sum") + + counter.Add(ctx, 10, label.String("A", "B")) + + require.NoError(t, puller.Collect(ctx)) + records := processortest.NewOutput(label.DefaultEncoder()) + require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) + + require.EqualValues(t, map[string]float64{ + "counter.sum/A=B/": 10, + }, records.Map()) + + counter.Add(ctx, 10, label.String("A", "B")) + + require.NoError(t, puller.Collect(ctx)) + records = processortest.NewOutput(label.DefaultEncoder()) + require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) + + require.EqualValues(t, map[string]float64{ + "counter.sum/A=B/": 20, + }, records.Map()) +} + +func TestPullWithCollect(t *testing.T) { + puller := controller.New( + processor.New( + processortest.AggregatorSelector(), + export.CumulativeExportKindSelector(), + processor.WithMemory(true), + ), + controller.WithCollectPeriod(time.Second), + ) + mock := controllertest.NewMockClock() + puller.SetClock(mock) + + ctx := context.Background() + meter := puller.MeterProvider().Meter("nocache") + counter := metric.Must(meter).NewInt64Counter("counter.sum") + + counter.Add(ctx, 10, label.String("A", "B")) + + require.NoError(t, puller.Collect(ctx)) + records := processortest.NewOutput(label.DefaultEncoder()) + require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) + + require.EqualValues(t, map[string]float64{ + "counter.sum/A=B/": 10, + }, records.Map()) + + counter.Add(ctx, 10, label.String("A", "B")) + + // Cached value! + require.NoError(t, puller.Collect(ctx)) + records = processortest.NewOutput(label.DefaultEncoder()) + require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) + + require.EqualValues(t, map[string]float64{ + "counter.sum/A=B/": 10, + }, records.Map()) + + mock.Add(time.Second) + runtime.Gosched() + + // Re-computed value! + require.NoError(t, puller.Collect(ctx)) + records = processortest.NewOutput(label.DefaultEncoder()) + require.NoError(t, puller.ForEach(export.CumulativeExportKindSelector(), records.AddRecord)) + + require.EqualValues(t, map[string]float64{ + "counter.sum/A=B/": 20, + }, records.Map()) + +} diff --git a/sdk/metric/controller/basic/push_test.go b/sdk/metric/controller/basic/push_test.go new file mode 100644 index 00000000000..72e7772e837 --- /dev/null +++ b/sdk/metric/controller/basic/push_test.go @@ -0,0 +1,230 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package basic_test + +import ( + "context" + "errors" + "fmt" + "runtime" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/label" + "go.opentelemetry.io/otel/metric" + export "go.opentelemetry.io/otel/sdk/export/metric" + "go.opentelemetry.io/otel/sdk/export/metric/aggregation" + controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" + "go.opentelemetry.io/otel/sdk/metric/controller/controllertest" + processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" + "go.opentelemetry.io/otel/sdk/metric/processor/processortest" + "go.opentelemetry.io/otel/sdk/resource" +) + +var testResource = resource.NewWithAttributes(label.String("R", "V")) + +type handler struct { + sync.Mutex + err error +} + +func (h *handler) Handle(err error) { + h.Lock() + h.err = err + h.Unlock() +} + +func (h *handler) Flush() error { + h.Lock() + err := h.err + h.err = nil + h.Unlock() + return err +} + +var testHandler *handler + +func init() { + testHandler = new(handler) + otel.SetErrorHandler(testHandler) +} + +func newExporter() *processortest.Exporter { + return processortest.NewExporter( + export.StatelessExportKindSelector(), + label.DefaultEncoder(), + ) +} + +func newCheckpointer() export.Checkpointer { + return processortest.Checkpointer( + processortest.NewProcessor( + processortest.AggregatorSelector(), + label.DefaultEncoder(), + ), + ) +} + +func TestPushDoubleStop(t *testing.T) { + ctx := context.Background() + exporter := newExporter() + checkpointer := newCheckpointer() + p := controller.New(checkpointer, controller.WithExporter(exporter)) + require.NoError(t, p.Start(ctx)) + require.NoError(t, p.Stop(ctx)) + require.NoError(t, p.Stop(ctx)) +} + +func TestPushDoubleStart(t *testing.T) { + ctx := context.Background() + exporter := newExporter() + checkpointer := newCheckpointer() + p := controller.New(checkpointer, controller.WithExporter(exporter)) + require.NoError(t, p.Start(ctx)) + err := p.Start(ctx) + require.Error(t, err) + require.True(t, errors.Is(err, controller.ErrControllerStarted)) + require.NoError(t, p.Stop(ctx)) +} + +func TestPushTicker(t *testing.T) { + exporter := newExporter() + checkpointer := newCheckpointer() + p := controller.New( + checkpointer, + controller.WithExporter(exporter), + controller.WithCollectPeriod(time.Second), + controller.WithResource(testResource), + ) + meter := p.MeterProvider().Meter("name") + + mock := controllertest.NewMockClock() + p.SetClock(mock) + + ctx := context.Background() + + counter := metric.Must(meter).NewInt64Counter("counter.sum") + + require.NoError(t, p.Start(ctx)) + + counter.Add(ctx, 3) + + require.EqualValues(t, map[string]float64{}, exporter.Values()) + + mock.Add(time.Second) + runtime.Gosched() + + require.EqualValues(t, map[string]float64{ + "counter.sum//R=V": 3, + }, exporter.Values()) + + require.Equal(t, 1, exporter.ExportCount()) + exporter.Reset() + + counter.Add(ctx, 7) + + mock.Add(time.Second) + runtime.Gosched() + + require.EqualValues(t, map[string]float64{ + "counter.sum//R=V": 10, + }, exporter.Values()) + + require.Equal(t, 1, exporter.ExportCount()) + exporter.Reset() + + require.NoError(t, p.Stop(ctx)) +} + +func TestPushExportError(t *testing.T) { + injector := func(name string, e error) func(r export.Record) error { + return func(r export.Record) error { + if r.Descriptor().Name() == name { + return e + } + return nil + } + } + var errAggregator = fmt.Errorf("unexpected error") + var tests = []struct { + name string + injectedError error + expected map[string]float64 + expectedError error + }{ + {"errNone", nil, map[string]float64{ + "counter1.sum/X=Y/R=V": 3, + "counter2.sum//R=V": 5, + }, nil}, + {"errNoData", aggregation.ErrNoData, map[string]float64{ + "counter2.sum//R=V": 5, + }, nil}, + {"errUnexpected", errAggregator, map[string]float64{}, errAggregator}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + exporter := newExporter() + exporter.InjectErr = injector("counter1.sum", tt.injectedError) + + // This test validates the error handling + // behavior of the basic Processor is honored + // by the push processor. + checkpointer := processor.New(processortest.AggregatorSelector(), exporter) + p := controller.New( + checkpointer, + controller.WithExporter(exporter), + controller.WithCollectPeriod(time.Second), + controller.WithResource(testResource), + ) + + mock := controllertest.NewMockClock() + p.SetClock(mock) + + ctx := context.Background() + + meter := p.MeterProvider().Meter("name") + counter1 := metric.Must(meter).NewInt64Counter("counter1.sum") + counter2 := metric.Must(meter).NewInt64Counter("counter2.sum") + + require.NoError(t, p.Start(ctx)) + runtime.Gosched() + + counter1.Add(ctx, 3, label.String("X", "Y")) + counter2.Add(ctx, 5) + + require.Equal(t, 0, exporter.ExportCount()) + require.Nil(t, testHandler.Flush()) + + mock.Add(time.Second) + runtime.Gosched() + + require.Equal(t, 1, exporter.ExportCount()) + if tt.expectedError == nil { + require.EqualValues(t, tt.expected, exporter.Values()) + require.NoError(t, testHandler.Flush()) + } else { + err := testHandler.Flush() + require.Error(t, err) + require.Equal(t, tt.expectedError, err) + } + + require.NoError(t, p.Stop(ctx)) + }) + } +} From 7662f6e05631b1a182c05a60ccc02665049ed7e3 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Tue, 1 Dec 2020 01:32:25 -0800 Subject: [PATCH 20/35] Reduce diff size --- sdk/metric/controller/basic/controller.go | 34 +++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sdk/metric/controller/basic/controller.go b/sdk/metric/controller/basic/controller.go index e90348f2557..38f26748be4 100644 --- a/sdk/metric/controller/basic/controller.go +++ b/sdk/metric/controller/basic/controller.go @@ -61,12 +61,12 @@ type Controller struct { exporter export.Exporter wg sync.WaitGroup stopCh chan struct{} + period time.Duration + timeout time.Duration clock controllerTime.Clock ticker controllerTime.Ticker - collectPeriod time.Duration - collectTimeout time.Duration - exportTimeout time.Duration + exportTimeout time.Duration // collectedTime is used only in configurations with no // exporter, when ticker != nil. @@ -91,15 +91,15 @@ func New(checkpointer export.Checkpointer, opts ...Option) *Controller { c.Resource, ) return &Controller{ - provider: registry.NewMeterProvider(impl), - accumulator: impl, - checkpointer: checkpointer, - exporter: c.Exporter, - stopCh: make(chan struct{}), - collectPeriod: c.CollectPeriod, - collectTimeout: c.CollectTimeout, - exportTimeout: c.ExportTimeout, - clock: controllerTime.RealClock{}, + provider: registry.NewMeterProvider(impl), + accumulator: impl, + checkpointer: checkpointer, + exporter: c.Exporter, + stopCh: make(chan struct{}), + period: c.CollectPeriod, + timeout: c.CollectTimeout, + exportTimeout: c.ExportTimeout, + clock: controllerTime.RealClock{}, } } @@ -137,7 +137,7 @@ func (c *Controller) Start(ctx context.Context) error { } c.wg.Add(2) - c.ticker = c.clock.Ticker(c.collectPeriod) + c.ticker = c.clock.Ticker(c.period) go c.runTicker(ctx, c.stopCh) return nil } @@ -210,9 +210,9 @@ func (c *Controller) checkpoint(ctx context.Context, cond func() bool) error { } c.checkpointer.StartCollection() - if c.collectTimeout > 0 { + if c.timeout > 0 { var cancel context.CancelFunc - ctx, cancel = context.WithTimeout(ctx, c.collectTimeout) + ctx, cancel = context.WithTimeout(ctx, c.timeout) defer cancel() } @@ -287,11 +287,11 @@ func (c *Controller) Collect(ctx context.Context) error { return c.checkpoint(ctx, func() bool { // This is called with the CheckpointSet exclusive // lock held. - if c.collectPeriod == 0 { + if c.period == 0 { return true } now := c.clock.Now() - if now.Sub(c.collectedTime) < c.collectPeriod { + if now.Sub(c.collectedTime) < c.period { return false } c.collectedTime = now From c1ceb43c44e8e78eed94144c2009e328bd7a6fb9 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Tue, 1 Dec 2020 01:40:44 -0800 Subject: [PATCH 21/35] Changelog --- CHANGELOG.md | 7 +++++++ example/prom-collector/go.sum | 4 ++-- sdk/metric/controller/basic/controller.go | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1823333836..c715524ecba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Move the OpenCensus example into `example` directory. (#1359) - `NewExporter` and `Start` functions in `go.opentelemetry.io/otel/exporters/otlp` now receive `context.Context` as a first parameter. (#1357) +- Metric Push and Pull Controller components are combined into a single "basic" Controller: + - `WithExporter()` and `Start()` to configure Push behavior + - `Collect()` and `ForEach()` for Pull export methods. (#1378) + +### Added + +- Metric exporter example for Prometheus and OTLP dual export. (#1378) ## [0.14.0] - 2020-11-19 diff --git a/example/prom-collector/go.sum b/example/prom-collector/go.sum index 26245b13acc..cc028c4067d 100644 --- a/example/prom-collector/go.sum +++ b/example/prom-collector/go.sum @@ -49,8 +49,8 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= diff --git a/sdk/metric/controller/basic/controller.go b/sdk/metric/controller/basic/controller.go index 38f26748be4..78b903d88ab 100644 --- a/sdk/metric/controller/basic/controller.go +++ b/sdk/metric/controller/basic/controller.go @@ -122,7 +122,7 @@ func (c *Controller) MeterProvider() metric.MeterProvider { // when only pulling metric data. // // The passed context is passed to Collect() and subsequently to -// asychronous instrument callbacks. Returns an error when the +// asynchronous instrument callbacks. Returns an error when the // controller was already started. // // Note that it is not necessary to Start a controller when only From 06401cde3aa19b1b7b07504c37cc01af07dc9be8 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Tue, 1 Dec 2020 15:42:43 -0800 Subject: [PATCH 22/35] Remove extra Add/Done pair --- sdk/metric/controller/basic/controller.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdk/metric/controller/basic/controller.go b/sdk/metric/controller/basic/controller.go index 78b903d88ab..0f96e9ac9fe 100644 --- a/sdk/metric/controller/basic/controller.go +++ b/sdk/metric/controller/basic/controller.go @@ -136,7 +136,7 @@ func (c *Controller) Start(ctx context.Context) error { return ErrControllerStarted } - c.wg.Add(2) + c.wg.Add(1) c.ticker = c.clock.Ticker(c.period) go c.runTicker(ctx, c.stopCh) return nil @@ -156,7 +156,6 @@ func (c *Controller) Stop(ctx context.Context) error { close(c.stopCh) c.stopCh = nil - c.wg.Done() c.wg.Wait() c.ticker.Stop() From ea7d7a36774846e28e162188a79d4d17898dd7c6 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Tue, 1 Dec 2020 16:20:44 -0800 Subject: [PATCH 23/35] Remove unused stopCh param; document the Stop behavior --- sdk/metric/controller/basic/controller.go | 15 +++--- .../controller/basic/controller_test.go | 48 +++++++++++++++++++ 2 files changed, 57 insertions(+), 6 deletions(-) diff --git a/sdk/metric/controller/basic/controller.go b/sdk/metric/controller/basic/controller.go index 0f96e9ac9fe..62a76f5eb25 100644 --- a/sdk/metric/controller/basic/controller.go +++ b/sdk/metric/controller/basic/controller.go @@ -144,8 +144,10 @@ func (c *Controller) Start(ctx context.Context) error { // Stop waits for the background goroutine to return and then collects // and exports metrics one last time before returning. The passed -// context is passed to Collect() and subsequently to asynchronous -// instruments. +// context is passed to the final Collect() and subsequently to the +// final asynchronous instruments. +// +// Note that Stop() will not cancel an ongoing collection or export. func (c *Controller) Stop(ctx context.Context) error { c.lock.Lock() defer c.lock.Unlock() @@ -159,7 +161,7 @@ func (c *Controller) Stop(ctx context.Context) error { c.wg.Wait() c.ticker.Stop() - return c.collect(ctx, nil) + return c.collect(ctx) } // runTicker collection on ticker events until the stop channel is closed. @@ -170,7 +172,7 @@ func (c *Controller) runTicker(ctx context.Context, stopCh chan struct{}) { case <-stopCh: return case <-c.ticker.C(): - if err := c.collect(ctx, stopCh); err != nil { + if err := c.collect(ctx); err != nil { otel.Handle(err) } } @@ -178,7 +180,7 @@ func (c *Controller) runTicker(ctx context.Context, stopCh chan struct{}) { } // collect computes a checkpoint and optionally exports it. -func (c *Controller) collect(ctx context.Context, stopCh chan struct{}) error { +func (c *Controller) collect(ctx context.Context) error { if err := c.checkpoint(ctx, func() bool { return true }); err != nil { @@ -198,7 +200,8 @@ func (c *Controller) collect(ctx context.Context, stopCh chan struct{}) error { // checkpoint calls the Accumulator and Checkpointer interfaces to // compute the CheckpointSet. This applies the configured collection -// timeout. +// timeout. Note that this does not try to cancel a Collect or Export +// when Stop() is called. func (c *Controller) checkpoint(ctx context.Context, cond func() bool) error { ckpt := c.checkpointer.CheckpointSet() ckpt.Lock() diff --git a/sdk/metric/controller/basic/controller_test.go b/sdk/metric/controller/basic/controller_test.go index 55c98a81549..835a61cde79 100644 --- a/sdk/metric/controller/basic/controller_test.go +++ b/sdk/metric/controller/basic/controller_test.go @@ -270,3 +270,51 @@ func TestExportTimeout(t *testing.T) { err = testHandler.Flush() require.NoError(t, err) } + +func TestCollectAfterStop(t *testing.T) { + exp := processortest.NewExporter( + export.CumulativeExportKindSelector(), + label.DefaultEncoder(), + ) + cont := controller.New( + processor.New( + processortest.AggregatorSelector(), + exp, + ), + controller.WithCollectPeriod(time.Second), + controller.WithExporter(exp), + ) + mock := controllertest.NewMockClock() + cont.SetClock(mock) + + prov := cont.MeterProvider() + + calls := int64(0) + _ = metric.Must(prov.Meter("named")).NewInt64SumObserver("one.lastvalue", + func(ctx context.Context, result metric.Int64ObserverResult) { + calls++ + result.Observe(calls) + if calls > 1 { + panic("Too many observations") + } + }, + ) + + // No collections happen (because mock clock does not advance): + require.NoError(t, cont.Start(context.Background())) + + // There's one collection run by Stop(): + require.NoError(t, cont.Stop(context.Background())) + + mock.Add(time.Second) + expect := map[string]float64{ + "one.lastvalue//": 1, + } + require.EqualValues(t, expect, exp.Values()) + require.NoError(t, testHandler.Flush()) + + // Manual collect after Stop does not panic. + require.NoError(t, cont.Collect(context.Background())) + require.EqualValues(t, expect, exp.Values()) + require.NoError(t, testHandler.Flush()) +} From 793560e71fb8a34b7a4642f227a8d0043cf3c452 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Tue, 1 Dec 2020 16:44:42 -0800 Subject: [PATCH 24/35] Typo --- sdk/metric/controller/basic/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/metric/controller/basic/controller.go b/sdk/metric/controller/basic/controller.go index 62a76f5eb25..e85c8cfe563 100644 --- a/sdk/metric/controller/basic/controller.go +++ b/sdk/metric/controller/basic/controller.go @@ -74,7 +74,7 @@ type Controller struct { } // New constructs a Controller using the provided checkpointer and -// options (including an optional Exporter) to configure an metric +// options (including an optional Exporter) to configure a metric // export pipeline. func New(checkpointer export.Checkpointer, opts ...Option) *Controller { c := &Config{ From 8435dde60a0a755d60aad5ca2d5756aeca757fd8 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Thu, 3 Dec 2020 11:09:12 -0800 Subject: [PATCH 25/35] Use ctx --- exporters/otlp/otlp_integration_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exporters/otlp/otlp_integration_test.go b/exporters/otlp/otlp_integration_test.go index 0fd8f1d5a86..1a26e6a3b53 100644 --- a/exporters/otlp/otlp_integration_test.go +++ b/exporters/otlp/otlp_integration_test.go @@ -123,7 +123,7 @@ func newExporterEndToEndTest(t *testing.T, additionalOpts []otlp.ExporterOption) selector := simple.NewWithInexpensiveDistribution() processor := processor.New(selector, metricsdk.StatelessExportKindSelector()) pusher := controller.New(processor, controller.WithExporter(exp)) - require.NoError(t, pusher.Start(context.Background())) + require.NoError(t, pusher.Start(ctx)) meter := pusher.MeterProvider().Meter("test-meter") labels := []label.KeyValue{label.Bool("test", true)} @@ -184,7 +184,7 @@ func newExporterEndToEndTest(t *testing.T, additionalOpts []otlp.ExporterOption) } // Flush and close. - require.NoError(t, pusher.Stop(context.Background())) + require.NoError(t, pusher.Stop(ctx)) // Wait >2 cycles. <-time.After(40 * time.Millisecond) @@ -520,10 +520,10 @@ func TestNewExporter_withMultipleAttributeTypes(t *testing.T) { selector := simple.NewWithInexpensiveDistribution() processor := processor.New(selector, metricsdk.StatelessExportKindSelector()) pusher := controller.New(processor, controller.WithExporter(exp)) - require.NoError(t, pusher.Start(context.Background())) + require.NoError(t, pusher.Start(ctx)) // Flush and close. - require.NoError(t, pusher.Stop(context.Background())) + require.NoError(t, pusher.Stop(ctx)) // Wait >2 cycles. <-time.After(40 * time.Millisecond) From f6fba89903a101ce3725b5740f9141980303eaca Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Sat, 12 Dec 2020 02:24:36 -0800 Subject: [PATCH 26/35] Missed v0.15 --- example/prom-collector/go.mod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/prom-collector/go.mod b/example/prom-collector/go.mod index 9463fc27d67..99d98ceedee 100644 --- a/example/prom-collector/go.mod +++ b/example/prom-collector/go.mod @@ -10,9 +10,9 @@ replace ( ) require ( - go.opentelemetry.io/otel v0.14.0 + go.opentelemetry.io/otel v0.15.0 go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0 go.opentelemetry.io/otel/exporters/otlp v0.14.0 - go.opentelemetry.io/otel/sdk v0.14.0 + go.opentelemetry.io/otel/sdk v0.15.0 google.golang.org/grpc v1.32.0 ) From c4719c6b78cfdeaf3e84c5aeee93da7ffa88a1ad Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Tue, 22 Dec 2020 00:19:05 -0800 Subject: [PATCH 27/35] Apply PR feedback --- example/otel-collector/main.go | 8 +- sdk/metric/controller/basic/config.go | 35 +++---- sdk/metric/controller/basic/controller.go | 94 ++++++++++--------- .../controller/basic/controller_test.go | 62 +++++++++--- sdk/metric/controller/basic/push_test.go | 8 +- 5 files changed, 124 insertions(+), 83 deletions(-) diff --git a/example/otel-collector/main.go b/example/otel-collector/main.go index 21ae1b9cb0b..83de19593d8 100644 --- a/example/otel-collector/main.go +++ b/example/otel-collector/main.go @@ -72,7 +72,7 @@ func initProvider() func() { sdktrace.WithSpanProcessor(bsp), ) - controller := controller.New( + cont := controller.New( processor.New( simple.NewWithExactDistribution(), exp, @@ -84,13 +84,13 @@ func initProvider() func() { // set global propagator to tracecontext (the default is no-op). otel.SetTextMapPropagator(propagation.TraceContext{}) otel.SetTracerProvider(tracerProvider) - otel.SetMeterProvider(controller.MeterProvider()) - handleErr(controller.Start(context.Background()), "failed to start controller") + otel.SetMeterProvider(cont.MeterProvider()) + handleErr(cont.Start(context.Background()), "failed to start controller") return func() { handleErr(tracerProvider.Shutdown(ctx), "failed to shutdown provider") handleErr(exp.Shutdown(ctx), "failed to stop exporter") - handleErr(controller.Stop(context.Background()), "failed to stop controller") + handleErr(cont.Stop(context.Background()), "failed to stop controller") } } diff --git a/sdk/metric/controller/basic/config.go b/sdk/metric/controller/basic/config.go index 1312b1676d4..4ccd3a68c5f 100644 --- a/sdk/metric/controller/basic/config.go +++ b/sdk/metric/controller/basic/config.go @@ -46,13 +46,16 @@ type Config struct { // Default value is 10s. If zero, no Collect timeout is applied. CollectTimeout time.Duration - // Exporter is used for pushing metric data. - Exporter export.Exporter + // Pusher is used for exporting metric data. + // + // Note: Exporters such as Prometheus that pull data do not implement + // export.Exporter. These will directly call Collect() and ForEach(). + Pusher export.Exporter - // ExportTimeout is the timeout of the Context when an Exporter is configured. + // PushTimeout is the timeout of the Context when a Pusher is configured. // // Default value is 10s. If zero, no Export timeout is applied. - ExportTimeout time.Duration + PushTimeout time.Duration } // Option is the interface that applies the value to a configuration option. @@ -94,24 +97,24 @@ func (o collectTimeoutOption) Apply(config *Config) { config.CollectTimeout = time.Duration(o) } -// WithExporter sets the Exporter configuration option of a Config. -func WithExporter(exporter export.Exporter) Option { - return exporterOption{exporter} +// WithPusher sets the Pusher configuration option of a Config. +func WithPusher(pusher export.Exporter) Option { + return pusherOption{pusher} } -type exporterOption struct{ export.Exporter } +type pusherOption struct{ pusher export.Exporter } -func (o exporterOption) Apply(config *Config) { - config.Exporter = o.Exporter +func (o pusherOption) Apply(config *Config) { + config.Pusher = o.pusher } -// WithExportTimeout sets the ExportTimeout configuration option of a Config. -func WithExportTimeout(timeout time.Duration) Option { - return exportTimeoutOption(timeout) +// WithPushTimeout sets the PushTimeout configuration option of a Config. +func WithPushTimeout(timeout time.Duration) Option { + return pushTimeoutOption(timeout) } -type exportTimeoutOption time.Duration +type pushTimeoutOption time.Duration -func (o exportTimeoutOption) Apply(config *Config) { - config.ExportTimeout = time.Duration(o) +func (o pushTimeoutOption) Apply(config *Config) { + config.PushTimeout = time.Duration(o) } diff --git a/sdk/metric/controller/basic/controller.go b/sdk/metric/controller/basic/controller.go index e85c8cfe563..5227d9ba40e 100644 --- a/sdk/metric/controller/basic/controller.go +++ b/sdk/metric/controller/basic/controller.go @@ -43,7 +43,7 @@ var ErrControllerStarted = fmt.Errorf("controller already started") // both "pull" and "push" configurations. This supports two distinct // modes: // -// - Push and Pull: Start() must be called to begin calling the exporter; +// - Push and Pull: Start() must be called to begin calling the pusher; // Collect() is called periodically by a background thread after starting // the controller. // - Pull-Only: Start() is optional in this case, to call Collect periodically. @@ -58,29 +58,29 @@ type Controller struct { accumulator *sdk.Accumulator provider *registry.MeterProvider checkpointer export.Checkpointer - exporter export.Exporter + pusher export.Exporter wg sync.WaitGroup stopCh chan struct{} - period time.Duration - timeout time.Duration clock controllerTime.Clock ticker controllerTime.Ticker - exportTimeout time.Duration + collectPeriod time.Duration + collectTimeout time.Duration + pushTimeout time.Duration // collectedTime is used only in configurations with no - // exporter, when ticker != nil. + // pusher, when ticker != nil. collectedTime time.Time } // New constructs a Controller using the provided checkpointer and -// options (including an optional Exporter) to configure a metric +// options (including optional Pusher) to configure a metric // export pipeline. func New(checkpointer export.Checkpointer, opts ...Option) *Controller { c := &Config{ CollectPeriod: DefaultPeriod, CollectTimeout: DefaultPeriod, - ExportTimeout: DefaultPeriod, + PushTimeout: DefaultPeriod, } for _, opt := range opts { opt.Apply(c) @@ -91,15 +91,16 @@ func New(checkpointer export.Checkpointer, opts ...Option) *Controller { c.Resource, ) return &Controller{ - provider: registry.NewMeterProvider(impl), - accumulator: impl, - checkpointer: checkpointer, - exporter: c.Exporter, - stopCh: make(chan struct{}), - period: c.CollectPeriod, - timeout: c.CollectTimeout, - exportTimeout: c.ExportTimeout, - clock: controllerTime.RealClock{}, + provider: registry.NewMeterProvider(impl), + accumulator: impl, + checkpointer: checkpointer, + pusher: c.Pusher, + stopCh: nil, + clock: controllerTime.RealClock{}, + + collectPeriod: c.CollectPeriod, + collectTimeout: c.CollectTimeout, + pushTimeout: c.PushTimeout, } } @@ -132,12 +133,13 @@ func (c *Controller) Start(ctx context.Context) error { c.lock.Lock() defer c.lock.Unlock() - if c.ticker != nil { + if c.stopCh != nil { return ErrControllerStarted } c.wg.Add(1) - c.ticker = c.clock.Ticker(c.period) + c.stopCh = make(chan struct{}) + c.ticker = c.clock.Ticker(c.collectPeriod) go c.runTicker(ctx, c.stopCh) return nil } @@ -160,6 +162,7 @@ func (c *Controller) Stop(ctx context.Context) error { c.stopCh = nil c.wg.Wait() c.ticker.Stop() + c.ticker = nil return c.collect(ctx) } @@ -186,13 +189,12 @@ func (c *Controller) collect(ctx context.Context) error { }); err != nil { return err } - if c.exporter == nil { + if c.pusher == nil { return nil } - // This export has to complete before starting another - // collection since it will hold a read lock and - // checkpoint() must re-acquire a write lock. - if err := c.export(); err != nil { + // Note: this is not subject to collectTimeout. This blocks the next + // collection despite collectTimeout because it holds a lock. + if err := c.export(ctx); err != nil { return err } return nil @@ -212,9 +214,9 @@ func (c *Controller) checkpoint(ctx context.Context, cond func() bool) error { } c.checkpointer.StartCollection() - if c.timeout > 0 { + if c.collectTimeout > 0 { var cancel context.CancelFunc - ctx, cancel = context.WithTimeout(ctx, c.timeout) + ctx, cancel = context.WithTimeout(ctx, c.collectTimeout) defer cancel() } @@ -242,19 +244,18 @@ func (c *Controller) checkpoint(ctx context.Context, cond func() bool) error { // export calls the exporter with a read lock on the CheckpointSet, // applying the configured export timeout. -func (c *Controller) export() error { +func (c *Controller) export(ctx context.Context) error { ckpt := c.checkpointer.CheckpointSet() ckpt.RLock() defer ckpt.RUnlock() - ctx := context.Background() - if c.exportTimeout > 0 { + if c.pushTimeout > 0 { var cancel context.CancelFunc - ctx, cancel = context.WithTimeout(ctx, c.exportTimeout) + ctx, cancel = context.WithTimeout(ctx, c.pushTimeout) defer cancel() } - return c.exporter.Export(ctx, ckpt) + return c.pusher.Export(ctx, ckpt) } // Foreach gives the caller read-locked access to the current @@ -283,20 +284,25 @@ func (c *Controller) Collect(ctx context.Context) error { if c.IsRunning() { // When there's a non-nil ticker, there's a goroutine // computing checkpoints with the collection period. - return nil + return ErrControllerStarted } - return c.checkpoint(ctx, func() bool { - // This is called with the CheckpointSet exclusive - // lock held. - if c.period == 0 { - return true - } - now := c.clock.Now() - if now.Sub(c.collectedTime) < c.period { - return false - } - c.collectedTime = now + return c.checkpoint(ctx, c.shouldCollect) +} + +// shouldCollect returns true if the collector should collect now, +// based on the timestamp, the last collection time, and the +// configured period. +func (c *Controller) shouldCollect() bool { + // This is called with the CheckpointSet exclusive + // lock held. + if c.collectPeriod == 0 { return true - }) + } + now := c.clock.Now() + if now.Sub(c.collectedTime) < c.collectPeriod { + return false + } + c.collectedTime = now + return true } diff --git a/sdk/metric/controller/basic/controller_test.go b/sdk/metric/controller/basic/controller_test.go index 835a61cde79..a1b3a7640b5 100644 --- a/sdk/metric/controller/basic/controller_test.go +++ b/sdk/metric/controller/basic/controller_test.go @@ -226,8 +226,8 @@ func TestExportTimeout(t *testing.T) { export.CumulativeExportKindSelector(), ), controller.WithCollectPeriod(time.Second), - controller.WithExportTimeout(time.Millisecond), - controller.WithExporter(exporter), + controller.WithPushTimeout(time.Millisecond), + controller.WithPusher(exporter), ) mock := controllertest.NewMockClock() cont.SetClock(mock) @@ -271,7 +271,7 @@ func TestExportTimeout(t *testing.T) { require.NoError(t, err) } -func TestCollectAfterStop(t *testing.T) { +func TestCollectAfterStopThenStartAgain(t *testing.T) { exp := processortest.NewExporter( export.CumulativeExportKindSelector(), label.DefaultEncoder(), @@ -282,39 +282,71 @@ func TestCollectAfterStop(t *testing.T) { exp, ), controller.WithCollectPeriod(time.Second), - controller.WithExporter(exp), + controller.WithPusher(exp), ) mock := controllertest.NewMockClock() cont.SetClock(mock) prov := cont.MeterProvider() - calls := int64(0) + calls := 0 _ = metric.Must(prov.Meter("named")).NewInt64SumObserver("one.lastvalue", func(ctx context.Context, result metric.Int64ObserverResult) { calls++ - result.Observe(calls) - if calls > 1 { - panic("Too many observations") - } + result.Observe(int64(calls)) }, ) // No collections happen (because mock clock does not advance): require.NoError(t, cont.Start(context.Background())) + require.True(t, cont.IsRunning()) // There's one collection run by Stop(): require.NoError(t, cont.Stop(context.Background())) - mock.Add(time.Second) - expect := map[string]float64{ + require.EqualValues(t, map[string]float64{ "one.lastvalue//": 1, - } - require.EqualValues(t, expect, exp.Values()) + }, exp.Values()) require.NoError(t, testHandler.Flush()) - // Manual collect after Stop does not panic. + // Manual collect after Stop still works, subject to + // CollectPeriod. require.NoError(t, cont.Collect(context.Background())) - require.EqualValues(t, expect, exp.Values()) + require.EqualValues(t, map[string]float64{ + "one.lastvalue//": 2, + }, getMap(t, cont)) + require.NoError(t, testHandler.Flush()) + require.False(t, cont.IsRunning()) + + // Start again, see that collection proceeds. However, + // explicit collection should still fail. + require.NoError(t, cont.Start(context.Background())) + require.True(t, cont.IsRunning()) + err := cont.Collect(context.Background()) + require.Error(t, err) + require.Equal(t, controller.ErrControllerStarted, err) + + require.NoError(t, cont.Stop(context.Background())) + require.EqualValues(t, map[string]float64{ + "one.lastvalue//": 3, + }, exp.Values()) + require.False(t, cont.IsRunning()) + + // Time has not advanced yet. Now let the ticker perform + // collection: + require.NoError(t, cont.Start(context.Background())) + mock.Add(time.Second) + require.EqualValues(t, map[string]float64{ + "one.lastvalue//": 4, + }, exp.Values()) + + mock.Add(time.Second) + require.EqualValues(t, map[string]float64{ + "one.lastvalue//": 5, + }, exp.Values()) + require.NoError(t, cont.Stop(context.Background())) + require.EqualValues(t, map[string]float64{ + "one.lastvalue//": 6, + }, exp.Values()) } diff --git a/sdk/metric/controller/basic/push_test.go b/sdk/metric/controller/basic/push_test.go index 72e7772e837..4add5f3f523 100644 --- a/sdk/metric/controller/basic/push_test.go +++ b/sdk/metric/controller/basic/push_test.go @@ -85,7 +85,7 @@ func TestPushDoubleStop(t *testing.T) { ctx := context.Background() exporter := newExporter() checkpointer := newCheckpointer() - p := controller.New(checkpointer, controller.WithExporter(exporter)) + p := controller.New(checkpointer, controller.WithPusher(exporter)) require.NoError(t, p.Start(ctx)) require.NoError(t, p.Stop(ctx)) require.NoError(t, p.Stop(ctx)) @@ -95,7 +95,7 @@ func TestPushDoubleStart(t *testing.T) { ctx := context.Background() exporter := newExporter() checkpointer := newCheckpointer() - p := controller.New(checkpointer, controller.WithExporter(exporter)) + p := controller.New(checkpointer, controller.WithPusher(exporter)) require.NoError(t, p.Start(ctx)) err := p.Start(ctx) require.Error(t, err) @@ -108,7 +108,7 @@ func TestPushTicker(t *testing.T) { checkpointer := newCheckpointer() p := controller.New( checkpointer, - controller.WithExporter(exporter), + controller.WithPusher(exporter), controller.WithCollectPeriod(time.Second), controller.WithResource(testResource), ) @@ -188,7 +188,7 @@ func TestPushExportError(t *testing.T) { checkpointer := processor.New(processortest.AggregatorSelector(), exporter) p := controller.New( checkpointer, - controller.WithExporter(exporter), + controller.WithPusher(exporter), controller.WithCollectPeriod(time.Second), controller.WithResource(testResource), ) From 68ca202e74f0dbe6922bc107154361da39f04afd Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Tue, 22 Dec 2020 00:23:16 -0800 Subject: [PATCH 28/35] Precommit pass --- example/otel-collector/main.go | 2 +- example/prom-collector/main.go | 2 +- exporters/otlp/otlp_integration_test.go | 4 ++-- exporters/stdout/exporter.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/otel-collector/main.go b/example/otel-collector/main.go index 83de19593d8..40bebb43a88 100644 --- a/example/otel-collector/main.go +++ b/example/otel-collector/main.go @@ -77,7 +77,7 @@ func initProvider() func() { simple.NewWithExactDistribution(), exp, ), - controller.WithExporter(exp), + controller.WithPusher(exp), controller.WithCollectPeriod(2*time.Second), ) diff --git a/example/prom-collector/main.go b/example/prom-collector/main.go index 75b928f4fa3..9d24484c60f 100644 --- a/example/prom-collector/main.go +++ b/example/prom-collector/main.go @@ -65,7 +65,7 @@ func initMeter() { processor.WithMemory(true), ), controller.WithResource(res), - controller.WithExporter(otlpExporter), + controller.WithPusher(otlpExporter), ) if err := cont.Start(context.Background()); err != nil { diff --git a/exporters/otlp/otlp_integration_test.go b/exporters/otlp/otlp_integration_test.go index 7f1363eb8e5..b60160c34f7 100644 --- a/exporters/otlp/otlp_integration_test.go +++ b/exporters/otlp/otlp_integration_test.go @@ -154,7 +154,7 @@ func newExporterEndToEndTest(t *testing.T, additionalOpts []otlp.GRPCConnectionO selector := simple.NewWithInexpensiveDistribution() processor := processor.New(selector, metricsdk.StatelessExportKindSelector()) - pusher := controller.New(processor, controller.WithExporter(exp)) + pusher := controller.New(processor, controller.WithPusher(exp)) require.NoError(t, pusher.Start(ctx)) meter := pusher.MeterProvider().Meter("test-meter") @@ -527,7 +527,7 @@ func TestNewExporter_withMultipleAttributeTypes(t *testing.T) { selector := simple.NewWithInexpensiveDistribution() processor := processor.New(selector, metricsdk.StatelessExportKindSelector()) - pusher := controller.New(processor, controller.WithExporter(exp)) + pusher := controller.New(processor, controller.WithPusher(exp)) require.NoError(t, pusher.Start(ctx)) // Flush and close. diff --git a/exporters/stdout/exporter.go b/exporters/stdout/exporter.go index 2a80e9c890c..8b3b2c99690 100644 --- a/exporters/stdout/exporter.go +++ b/exporters/stdout/exporter.go @@ -66,7 +66,7 @@ func NewExportPipeline(exportOpts []Option, pushOpts []controller.Option) (trace ), append( pushOpts, - controller.WithExporter(exporter), + controller.WithPusher(exporter), )..., ) err = pusher.Start(context.Background()) From 89be714ecd9c3c9be033266b349beaaff343ae31 Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Tue, 22 Dec 2020 00:31:09 -0800 Subject: [PATCH 29/35] 0.14 -> 0.15 in new file --- example/prom-collector/go.mod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/prom-collector/go.mod b/example/prom-collector/go.mod index 01dac8560f6..ca7502039cd 100644 --- a/example/prom-collector/go.mod +++ b/example/prom-collector/go.mod @@ -11,8 +11,8 @@ replace ( require ( go.opentelemetry.io/otel v0.15.0 - go.opentelemetry.io/otel/exporters/metric/prometheus v0.14.0 - go.opentelemetry.io/otel/exporters/otlp v0.14.0 + go.opentelemetry.io/otel/exporters/metric/prometheus v0.15.0 + go.opentelemetry.io/otel/exporters/otlp v0.15.0 go.opentelemetry.io/otel/sdk v0.15.0 google.golang.org/grpc v1.34.0 ) From 44128e7c70bbe0d5d398935afe16bf4bffba280c Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Tue, 22 Dec 2020 00:48:52 -0800 Subject: [PATCH 30/35] Remove diff chunk markers --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd10266bdad..191775b40e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Changelog +u# Changelog All notable changes to this project will be documented in this file. @@ -20,15 +20,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Improve span duration accuracy. (#1360) - Migrated CI/CD from CircleCI to GitHub Actions (#1382) - Remove duplicate checkout from GitHub Actions workflow (#1407) -<<<<<<< HEAD - Metric Push and Pull Controller components are combined into a single "basic" Controller: - `WithExporter()` and `Start()` to configure Push behavior - `Start()` is optional; use `Collect()` and `ForEach()` for Pull behavior - `Start()` and `Stop()` accept Context. (#1378) -======= - `NewExporter` from `exporters/otlp` now takes a `ProtocolDriver` as a parameter. (#1369) - Many OTLP Exporter options became gRPC ProtocolDriver options. (#1369) ->>>>>>> origin ### Removed From 0e46354fa90c03b7f47d1d29b9e23864b64e51d4 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 29 Dec 2020 00:37:21 -0800 Subject: [PATCH 31/35] Fix OTLP example --- exporters/otlp/example_test.go | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/exporters/otlp/example_test.go b/exporters/otlp/example_test.go index 56ec757fe55..bc179ece718 100644 --- a/exporters/otlp/example_test.go +++ b/exporters/otlp/example_test.go @@ -25,8 +25,8 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/exporters/otlp" "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/sdk/metric/controller/push" - "go.opentelemetry.io/otel/sdk/metric/processor/basic" + controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" + processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" "go.opentelemetry.io/otel/sdk/metric/selector/simple" sdktrace "go.opentelemetry.io/otel/sdk/trace" ) @@ -178,24 +178,33 @@ func Example_withDifferentSignalCollectors() { }() otel.SetTracerProvider(tp) - pusher := push.New( - basic.New( + pusher := controller.New( + processor.New( simple.NewWithExactDistribution(), exp, ), - exp, - push.WithPeriod(2*time.Second), + controller.WithPusher(exp), + controller.WithCollectPeriod(2*time.Second), ) otel.SetMeterProvider(pusher.MeterProvider()) - pusher.Start() - defer pusher.Stop() // pushes any last exports to the receiver + if err := pusher.Start(ctx); err != nil { + log.Fatalf("could not start metric controoler: %v", err) + } + defer func() { + ctx, cancel := context.WithTimeout(ctx, time.Second) + defer cancel() + // pushes any last exports to the receiver + if err := pusher.Stop(ctx); err != nil { + otel.Handle(err) + } + }() tracer := otel.Tracer("test-tracer") meter := otel.Meter("test-meter") // Recorder metric example - valuerecorder := metric.Must(meter). + counter := metric.Must(meter). NewFloat64Counter( "an_important_metric", metric.WithDescription("Measures the cumulative epicness of the app"), @@ -209,7 +218,7 @@ func Example_withDifferentSignalCollectors() { for i := 0; i < 10; i++ { _, iSpan := tracer.Start(ctx, fmt.Sprintf("Sample-%d", i)) log.Printf("Doing really hard work (%d / 10)\n", i+1) - valuerecorder.Add(ctx, 1.0) + counter.Add(ctx, 1.0) <-time.After(time.Second) iSpan.End() From 689cb629ed476d2291ce1e172c89ad0651e48806 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 5 Jan 2021 23:36:58 -0800 Subject: [PATCH 32/35] Upstream --- example/prom-collector/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/prom-collector/main.go b/example/prom-collector/main.go index 9d24484c60f..973741cb18e 100644 --- a/example/prom-collector/main.go +++ b/example/prom-collector/main.go @@ -47,7 +47,7 @@ func initMeter() { driver := otlp.NewGRPCDriver( otlp.WithInsecure(), - otlp.WithAddress("localhost:30080"), + otlp.WithEndpoint("localhost:30080"), otlp.WithGRPCDialOption(grpc.WithBlock()), // useful for testing ) otlpExporter, err := otlp.NewExporter(ctx, driver) From a9e1e954724f8f46dbfbce1ceb683a533a167617 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 12 Jan 2021 01:00:12 -0800 Subject: [PATCH 33/35] dashpole comments --- CHANGELOG.md | 2 +- exporters/metric/prometheus/prometheus.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a36649c77d..5bf5d6cb3d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -u# Changelog +# Changelog All notable changes to this project will be documented in this file. diff --git a/exporters/metric/prometheus/prometheus.go b/exporters/metric/prometheus/prometheus.go index cdeb41b0028..25a41e36db3 100644 --- a/exporters/metric/prometheus/prometheus.go +++ b/exporters/metric/prometheus/prometheus.go @@ -85,7 +85,8 @@ type Config struct { DefaultHistogramBoundaries []float64 } -// NewExporter returns a new Prometheus +// NewExporter returns a new Prometheus exporter using the configured +// metric controller. See controller.New(). func NewExporter(config Config, controller *controller.Controller) (*Exporter, error) { if config.Registry == nil { config.Registry = prometheus.NewRegistry() From 7324ba08e6044bfcbd248342794a24bcaade63e2 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 12 Jan 2021 01:03:02 -0800 Subject: [PATCH 34/35] aneurysm9 feedback --- example/prom-collector/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/prom-collector/main.go b/example/prom-collector/main.go index 973741cb18e..6242e8aaafa 100644 --- a/example/prom-collector/main.go +++ b/example/prom-collector/main.go @@ -84,7 +84,7 @@ func initMeter() { otel.SetMeterProvider(cont.MeterProvider()) log.Println("Prometheus server running on :17000") - log.Println("Exporting OTLP to :17001") + log.Println("Exporting OTLP to :30080") } func main() { From 44eacc8df846437bb63aa291528ca01a0c5f3cc7 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 12 Jan 2021 15:06:35 -0800 Subject: [PATCH 35/35] Tidy go.sum --- example/prom-collector/go.sum | 4 ---- 1 file changed, 4 deletions(-) diff --git a/example/prom-collector/go.sum b/example/prom-collector/go.sum index ead11f79e65..df8bd344ddb 100644 --- a/example/prom-collector/go.sum +++ b/example/prom-collector/go.sum @@ -1,8 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= -github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -105,8 +103,6 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=