From 72853b8db03c402f3ed38ed0257d99fb079488d1 Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Mon, 22 Aug 2022 10:17:26 -0700 Subject: [PATCH] Remove usage of deprecated instrumentation.Library in favor of Scope Signed-off-by: Bogdan Drutu --- bridge/opencensus/exporter.go | 4 +-- bridge/opencensus/exporter_test.go | 2 +- exporters/jaeger/jaeger_benchmark_test.go | 2 +- exporters/jaeger/jaeger_test.go | 8 +++--- exporters/otlp/otlpmetric/exporter_test.go | 6 ++-- .../internal/metrictransform/metric.go | 2 +- .../internal/otlpmetrictest/data.go | 4 +-- .../otlptrace/internal/otlptracetest/data.go | 2 +- exporters/prometheus/prometheus.go | 4 +-- exporters/stdout/stdoutmetric/metric.go | 2 +- exporters/zipkin/model_test.go | 6 ++-- sdk/metric/controller/basic/controller.go | 14 +++++----- sdk/metric/controller/controllertest/test.go | 4 +-- sdk/metric/export/metric.go | 2 +- sdk/metric/metrictest/exporter.go | 2 +- sdk/metric/processor/basic/basic_test.go | 2 +- sdk/metric/processor/processortest/test.go | 28 +++++++++---------- .../processor/processortest/test_test.go | 2 +- sdk/metric/processor/reducer/reducer_test.go | 2 +- sdk/trace/snapshot.go | 2 +- sdk/trace/span.go | 6 ++-- sdk/trace/tracetest/span.go | 4 +-- 22 files changed, 55 insertions(+), 55 deletions(-) diff --git a/bridge/opencensus/exporter.go b/bridge/opencensus/exporter.go index 7e7e7960007..84aa499a60f 100644 --- a/bridge/opencensus/exporter.go +++ b/bridge/opencensus/exporter.go @@ -64,8 +64,8 @@ type censusLibraryReader struct { metrics []*metricdata.Metric } -func (r censusLibraryReader) ForEach(readerFunc func(instrumentation.Library, export.Reader) error) error { - return readerFunc(instrumentation.Library{ +func (r censusLibraryReader) ForEach(readerFunc func(instrumentation.Scope, export.Reader) error) error { + return readerFunc(instrumentation.Scope{ Name: "OpenCensus Bridge", }, &metricReader{metrics: r.metrics}) } diff --git a/bridge/opencensus/exporter_test.go b/bridge/opencensus/exporter_test.go index 2634f5334d5..c1ea8c95400 100644 --- a/bridge/opencensus/exporter_test.go +++ b/bridge/opencensus/exporter_test.go @@ -47,7 +47,7 @@ type fakeExporter struct { func (f *fakeExporter) Export(ctx context.Context, res *resource.Resource, ilr export.InstrumentationLibraryReader) error { return controllertest.ReadAll(ilr, aggregation.StatelessTemporalitySelector(), - func(_ instrumentation.Library, record export.Record) error { + func(_ instrumentation.Scope, record export.Record) error { f.resource = res f.records = append(f.records, record) return f.err diff --git a/exporters/jaeger/jaeger_benchmark_test.go b/exporters/jaeger/jaeger_benchmark_test.go index ab96ac8c9ed..2b0e54c90d6 100644 --- a/exporters/jaeger/jaeger_benchmark_test.go +++ b/exporters/jaeger/jaeger_benchmark_test.go @@ -61,7 +61,7 @@ func spans(n int) []tracesdk.ReadOnlySpan { StartTime: now, EndTime: now, SpanKind: trace.SpanKindClient, - InstrumentationLibrary: instrumentation.Library{ + InstrumentationLibrary: instrumentation.Scope{ Name: instrLibName, }, } diff --git a/exporters/jaeger/jaeger_test.go b/exporters/jaeger/jaeger_test.go index ffc8fe9c3b2..dac2b12a042 100644 --- a/exporters/jaeger/jaeger_test.go +++ b/exporters/jaeger/jaeger_test.go @@ -187,7 +187,7 @@ func TestSpanSnapshotToThrift(t *testing.T) { EndTime: now, Status: sdktrace.Status{Code: codes.Error}, SpanKind: trace.SpanKindClient, - InstrumentationLibrary: instrumentation.Library{ + InstrumentationLibrary: instrumentation.Scope{ Name: instrLibName, Version: instrLibVersion, }, @@ -245,7 +245,7 @@ func TestSpanSnapshotToThrift(t *testing.T) { Description: statusMessage, }, SpanKind: trace.SpanKindClient, - InstrumentationLibrary: instrumentation.Library{ + InstrumentationLibrary: instrumentation.Scope{ Name: instrLibName, Version: instrLibVersion, }, @@ -330,7 +330,7 @@ func TestSpanSnapshotToThrift(t *testing.T) { Description: statusMessage, }, SpanKind: trace.SpanKindInternal, - InstrumentationLibrary: instrumentation.Library{ + InstrumentationLibrary: instrumentation.Scope{ Name: instrLibName, Version: instrLibVersion, }, @@ -383,7 +383,7 @@ func TestSpanSnapshotToThrift(t *testing.T) { Description: statusMessage, }, SpanKind: trace.SpanKindInternal, - InstrumentationLibrary: instrumentation.Library{ + InstrumentationLibrary: instrumentation.Scope{ Name: instrLibName, Version: instrLibVersion, }, diff --git a/exporters/otlp/otlpmetric/exporter_test.go b/exporters/otlp/otlpmetric/exporter_test.go index d5208fc26d6..f4fe7774e9a 100644 --- a/exporters/otlp/otlpmetric/exporter_test.go +++ b/exporters/otlp/otlpmetric/exporter_test.go @@ -728,7 +728,7 @@ func TestStatelessAggregationTemporality(t *testing.T) { func runMetricExportTests(t *testing.T, opts []otlpmetric.Option, res *resource.Resource, records []testRecord, expected []*metricpb.ResourceMetrics) { exp, driver := newExporter(t, opts...) - libraryRecs := map[instrumentation.Library][]export.Record{} + libraryRecs := map[instrumentation.Scope][]export.Record{} for _, r := range records { lcopy := make([]attribute.KeyValue, len(r.attrs)) copy(lcopy, r.attrs) @@ -771,7 +771,7 @@ func runMetricExportTests(t *testing.T, opts []otlpmetric.Option, res *resource. require.NoError(t, agg.SynchronizedMove(ckpt, &desc)) meterCfg := metric.NewMeterConfig(r.meterOpts...) - lib := instrumentation.Library{ + lib := instrumentation.Scope{ Name: r.meterName, Version: meterCfg.InstrumentationVersion(), SchemaURL: meterCfg.SchemaURL(), @@ -838,7 +838,7 @@ func TestEmptyMetricExport(t *testing.T) { }, } { driver.Reset() - require.NoError(t, exp.Export(context.Background(), resource.Empty(), processortest.MultiInstrumentationLibraryReader(map[instrumentation.Library][]export.Record{ + require.NoError(t, exp.Export(context.Background(), resource.Empty(), processortest.MultiInstrumentationLibraryReader(map[instrumentation.Scope][]export.Record{ { Name: testLibName, }: test.records, diff --git a/exporters/otlp/otlpmetric/internal/metrictransform/metric.go b/exporters/otlp/otlpmetric/internal/metrictransform/metric.go index 2d7c9049905..a189b85bdad 100644 --- a/exporters/otlp/otlpmetric/internal/metrictransform/metric.go +++ b/exporters/otlp/otlpmetric/internal/metrictransform/metric.go @@ -74,7 +74,7 @@ func toNanos(t time.Time) uint64 { func InstrumentationLibraryReader(ctx context.Context, temporalitySelector aggregation.TemporalitySelector, res *resource.Resource, ilmr export.InstrumentationLibraryReader, numWorkers uint) (*metricpb.ResourceMetrics, error) { var sms []*metricpb.ScopeMetrics - err := ilmr.ForEach(func(lib instrumentation.Library, mr export.Reader) error { + err := ilmr.ForEach(func(lib instrumentation.Scope, mr export.Reader) error { records, errc := source(ctx, temporalitySelector, mr) // Start a fixed number of goroutines to transform records. diff --git a/exporters/otlp/otlpmetric/internal/otlpmetrictest/data.go b/exporters/otlp/otlpmetric/internal/otlpmetrictest/data.go index d8d9c03a31e..825a31d9189 100644 --- a/exporters/otlp/otlpmetric/internal/otlpmetrictest/data.go +++ b/exporters/otlp/otlpmetric/internal/otlpmetrictest/data.go @@ -48,7 +48,7 @@ func OneRecordReader() export.InstrumentationLibraryReader { rec := export.NewRecord(&desc, &attrs, agg[0].Aggregation(), start, end) return processortest.MultiInstrumentationLibraryReader( - map[instrumentation.Library][]export.Record{ + map[instrumentation.Scope][]export.Record{ { Name: "onelib", }: {rec}, @@ -66,6 +66,6 @@ type FailReader struct{} var _ export.InstrumentationLibraryReader = FailReader{} // ForEach implements export.Reader. It always fails. -func (FailReader) ForEach(readerFunc func(instrumentation.Library, export.Reader) error) error { +func (FailReader) ForEach(readerFunc func(instrumentation.Scope, export.Reader) error) error { return fmt.Errorf("fail") } diff --git a/exporters/otlp/otlptrace/internal/otlptracetest/data.go b/exporters/otlp/otlptrace/internal/otlptracetest/data.go index d039105cb29..4e51f317c84 100644 --- a/exporters/otlp/otlptrace/internal/otlptracetest/data.go +++ b/exporters/otlp/otlptrace/internal/otlptracetest/data.go @@ -54,7 +54,7 @@ func SingleReadOnlySpan() []tracesdk.ReadOnlySpan { DroppedLinks: 0, ChildSpanCount: 0, Resource: resource.NewSchemaless(attribute.String("a", "b")), - InstrumentationLibrary: instrumentation.Library{ + InstrumentationLibrary: instrumentation.Scope{ Name: "bar", Version: "0.0.0", }, diff --git a/exporters/prometheus/prometheus.go b/exporters/prometheus/prometheus.go index fb544d004fb..c7aa16d1257 100644 --- a/exporters/prometheus/prometheus.go +++ b/exporters/prometheus/prometheus.go @@ -151,7 +151,7 @@ func (c *collector) Describe(ch chan<- *prometheus.Desc) { c.exp.lock.RLock() defer c.exp.lock.RUnlock() - _ = c.exp.Controller().ForEach(func(_ instrumentation.Library, reader export.Reader) error { + _ = c.exp.Controller().ForEach(func(_ instrumentation.Scope, reader export.Reader) error { return reader.ForEach(c.exp, func(record export.Record) error { var attrKeys []string mergeAttrs(record, c.exp.controller.Resource(), &attrKeys, nil) @@ -174,7 +174,7 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) { otel.Handle(err) } - err := ctrl.ForEach(func(_ instrumentation.Library, reader export.Reader) error { + err := ctrl.ForEach(func(_ instrumentation.Scope, reader export.Reader) error { return reader.ForEach(c.exp, func(record export.Record) error { agg := record.Aggregation() numberKind := record.Descriptor().NumberKind() diff --git a/exporters/stdout/stdoutmetric/metric.go b/exporters/stdout/stdoutmetric/metric.go index 38289d281a7..0bdee8e9093 100644 --- a/exporters/stdout/stdoutmetric/metric.go +++ b/exporters/stdout/stdoutmetric/metric.go @@ -52,7 +52,7 @@ func (e *metricExporter) TemporalityFor(desc *sdkapi.Descriptor, kind aggregatio func (e *metricExporter) Export(_ context.Context, res *resource.Resource, reader export.InstrumentationLibraryReader) error { var aggError error var batch []line - aggError = reader.ForEach(func(lib instrumentation.Library, mr export.Reader) error { + aggError = reader.ForEach(func(lib instrumentation.Scope, mr export.Reader) error { var instAttrs []attribute.KeyValue if name := lib.Name; name != "" { instAttrs = append(instAttrs, attribute.String("instrumentation.name", name)) diff --git a/exporters/zipkin/model_test.go b/exporters/zipkin/model_test.go index 454d18c495b..b5cca12742c 100644 --- a/exporters/zipkin/model_test.go +++ b/exporters/zipkin/model_test.go @@ -829,7 +829,7 @@ func TestTagsTransformation(t *testing.T) { { name: "instrLib-empty", data: tracetest.SpanStub{ - InstrumentationLibrary: instrumentation.Library{}, + InstrumentationLibrary: instrumentation.Scope{}, }, want: nil, }, @@ -837,7 +837,7 @@ func TestTagsTransformation(t *testing.T) { name: "instrLib-noversion", data: tracetest.SpanStub{ Attributes: []attribute.KeyValue{}, - InstrumentationLibrary: instrumentation.Library{ + InstrumentationLibrary: instrumentation.Scope{ Name: instrLibName, }, }, @@ -849,7 +849,7 @@ func TestTagsTransformation(t *testing.T) { name: "instrLib-with-version", data: tracetest.SpanStub{ Attributes: []attribute.KeyValue{}, - InstrumentationLibrary: instrumentation.Library{ + InstrumentationLibrary: instrumentation.Scope{ Name: instrLibName, Version: instrLibVersion, }, diff --git a/sdk/metric/controller/basic/controller.go b/sdk/metric/controller/basic/controller.go index 2107b16cb3c..8f4cf505aa7 100644 --- a/sdk/metric/controller/basic/controller.go +++ b/sdk/metric/controller/basic/controller.go @@ -46,12 +46,12 @@ 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; -// 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 +// - 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.Reader RWLock interface. Collection will @@ -323,7 +323,7 @@ func (c *Controller) export(ctx context.Context) error { // nolint:revive // me } // ForEach implements export.InstrumentationLibraryReader. -func (c *Controller) ForEach(readerFunc func(l instrumentation.Library, r export.Reader) error) error { +func (c *Controller) ForEach(readerFunc func(l instrumentation.Scope, r export.Reader) error) error { for _, acPair := range c.accumulatorList() { reader := acPair.checkpointer.Reader() // TODO: We should not fail fast; instead accumulate errors. diff --git a/sdk/metric/controller/controllertest/test.go b/sdk/metric/controller/controllertest/test.go index 9c1a3421972..045159f39c2 100644 --- a/sdk/metric/controller/controllertest/test.go +++ b/sdk/metric/controller/controllertest/test.go @@ -75,9 +75,9 @@ func (t MockTicker) C() <-chan time.Time { func ReadAll( reader export.InstrumentationLibraryReader, kind aggregation.TemporalitySelector, - apply func(instrumentation.Library, export.Record) error, + apply func(instrumentation.Scope, export.Record) error, ) error { - return reader.ForEach(func(library instrumentation.Library, reader export.Reader) error { + return reader.ForEach(func(library instrumentation.Scope, reader export.Reader) error { return reader.ForEach(kind, func(record export.Record) error { return apply(library, record) }) diff --git a/sdk/metric/export/metric.go b/sdk/metric/export/metric.go index 6168ca445ba..e2cf1bf57af 100644 --- a/sdk/metric/export/metric.go +++ b/sdk/metric/export/metric.go @@ -155,7 +155,7 @@ type InstrumentationLibraryReader interface { // ForEach calls the passed function once per instrumentation library, // allowing the caller to emit metrics grouped by the library that // produced them. - ForEach(readerFunc func(instrumentation.Library, Reader) error) error + ForEach(readerFunc func(instrumentation.Scope, Reader) error) error } // Reader allows a controller to access a complete checkpoint of diff --git a/sdk/metric/metrictest/exporter.go b/sdk/metric/metrictest/exporter.go index c0926dd7cf6..f984fc7c79a 100644 --- a/sdk/metric/metrictest/exporter.go +++ b/sdk/metric/metrictest/exporter.go @@ -98,7 +98,7 @@ func (e *Exporter) Collect(ctx context.Context) error { return err } - return e.controller.ForEach(func(l instrumentation.Library, r export.Reader) error { + return e.controller.ForEach(func(l instrumentation.Scope, r export.Reader) error { lib := Library{ InstrumentationName: l.Name, InstrumentationVersion: l.Version, diff --git a/sdk/metric/processor/basic/basic_test.go b/sdk/metric/processor/basic/basic_test.go index 21d816b44a0..43d06109c25 100644 --- a/sdk/metric/processor/basic/basic_test.go +++ b/sdk/metric/processor/basic/basic_test.go @@ -471,7 +471,7 @@ func TestCounterObserverEndToEnd(t *testing.T) { exporter := processortest.New(eselector, attribute.DefaultEncoder()) require.NoError(t, exporter.Export(ctx, resource.Empty(), processortest.OneInstrumentationLibraryReader( - instrumentation.Library{ + instrumentation.Scope{ Name: "test", }, reader))) diff --git a/sdk/metric/processor/processortest/test.go b/sdk/metric/processor/processortest/test.go index fa0e902d255..c84295aad64 100644 --- a/sdk/metric/processor/processortest/test.go +++ b/sdk/metric/processor/processortest/test.go @@ -118,9 +118,9 @@ func (f testFactory) NewCheckpointer() export.Checkpointer { // NewProcessor returns a new testing Processor implementation. // Verify expected outputs using Values(), e.g.: // -// require.EqualValues(t, map[string]float64{ -// "counter.sum/A=1,B=2/R=V": 100, -// }, processor.Values()) +// require.EqualValues(t, map[string]float64{ +// "counter.sum/A=1,B=2/R=V": 100, +// }, processor.Values()) // // Where in the example A=1,B=2 is the encoded attributes and R=V is the // encoded resource value. @@ -243,7 +243,7 @@ func (o *Output) AddRecord(rec export.Record) error { } // AddRecordWithResource merges rec into this Output. -func (o *Output) AddInstrumentationLibraryRecord(_ instrumentation.Library, rec export.Record) error { +func (o *Output) AddInstrumentationLibraryRecord(_ instrumentation.Scope, rec export.Record) error { return o.AddRecordWithResource(rec, resource.Empty()) } @@ -322,9 +322,9 @@ func (o *Output) AddAccumulation(acc export.Accumulation) error { // New returns a new testing Exporter implementation. // Verify exporter outputs using Values(), e.g.,: // -// require.EqualValues(t, map[string]float64{ -// "counter.sum/A=1,B=2/R=V": 100, -// }, exporter.Values()) +// require.EqualValues(t, map[string]float64{ +// "counter.sum/A=1,B=2/R=V": 100, +// }, exporter.Values()) // // Where in the example A=1,B=2 is the encoded attributes and R=V is the // encoded resource value. @@ -340,7 +340,7 @@ func (e *Exporter) Export(_ context.Context, res *resource.Resource, ckpt export e.output.Lock() defer e.output.Unlock() e.exportCount++ - return ckpt.ForEach(func(library instrumentation.Library, mr export.Reader) error { + return ckpt.ForEach(func(library instrumentation.Scope, mr export.Reader) error { return mr.ForEach(e.TemporalitySelector, func(r export.Record) error { if e.InjectErr != nil { if err := e.InjectErr(r); err != nil { @@ -381,32 +381,32 @@ func (e *Exporter) Reset() { // OneInstrumentationLibraryReader returns an InstrumentationLibraryReader for // a single instrumentation library. -func OneInstrumentationLibraryReader(l instrumentation.Library, r export.Reader) export.InstrumentationLibraryReader { +func OneInstrumentationLibraryReader(l instrumentation.Scope, r export.Reader) export.InstrumentationLibraryReader { return oneLibraryReader{l, r} } type oneLibraryReader struct { - library instrumentation.Library + library instrumentation.Scope reader export.Reader } -func (o oneLibraryReader) ForEach(readerFunc func(instrumentation.Library, export.Reader) error) error { +func (o oneLibraryReader) ForEach(readerFunc func(instrumentation.Scope, export.Reader) error) error { return readerFunc(o.library, o.reader) } // MultiInstrumentationLibraryReader returns an InstrumentationLibraryReader // for a group of records that came from multiple instrumentation libraries. -func MultiInstrumentationLibraryReader(records map[instrumentation.Library][]export.Record) export.InstrumentationLibraryReader { +func MultiInstrumentationLibraryReader(records map[instrumentation.Scope][]export.Record) export.InstrumentationLibraryReader { return instrumentationLibraryReader{records: records} } type instrumentationLibraryReader struct { - records map[instrumentation.Library][]export.Record + records map[instrumentation.Scope][]export.Record } var _ export.InstrumentationLibraryReader = instrumentationLibraryReader{} -func (m instrumentationLibraryReader) ForEach(fn func(instrumentation.Library, export.Reader) error) error { +func (m instrumentationLibraryReader) ForEach(fn func(instrumentation.Scope, export.Reader) error) error { for library, records := range m.records { if err := fn(library, &metricReader{records: records}); err != nil { return err diff --git a/sdk/metric/processor/processortest/test_test.go b/sdk/metric/processor/processortest/test_test.go index 98c15f2f763..2ca854edb7a 100644 --- a/sdk/metric/processor/processortest/test_test.go +++ b/sdk/metric/processor/processortest/test_test.go @@ -80,7 +80,7 @@ func TestProcessorTesting(t *testing.T) { ) err := exporter.Export(context.Background(), res, processortest.OneInstrumentationLibraryReader( - instrumentation.Library{ + instrumentation.Scope{ Name: "test", }, checkpointer.Reader(), diff --git a/sdk/metric/processor/reducer/reducer_test.go b/sdk/metric/processor/reducer/reducer_test.go index 12fbb7f86e0..197cafe516f 100644 --- a/sdk/metric/processor/reducer/reducer_test.go +++ b/sdk/metric/processor/reducer/reducer_test.go @@ -106,7 +106,7 @@ func TestFilterBasicProcessor(t *testing.T) { } res := resource.NewSchemaless(attribute.String("R", "V")) - require.NoError(t, exporter.Export(context.Background(), res, processortest.OneInstrumentationLibraryReader(instrumentation.Library{ + require.NoError(t, exporter.Export(context.Background(), res, processortest.OneInstrumentationLibraryReader(instrumentation.Scope{ Name: "test", }, basicProc.Reader()))) diff --git a/sdk/trace/snapshot.go b/sdk/trace/snapshot.go index 0349b2f198e..1f0cad6e242 100644 --- a/sdk/trace/snapshot.go +++ b/sdk/trace/snapshot.go @@ -110,7 +110,7 @@ func (s snapshot) InstrumentationScope() instrumentation.Scope { // InstrumentationLibrary returns information about the instrumentation // library that created the span. -func (s snapshot) InstrumentationLibrary() instrumentation.Library { +func (s snapshot) InstrumentationLibrary() instrumentation.Scope { return s.instrumentationScope } diff --git a/sdk/trace/span.go b/sdk/trace/span.go index 14d0aabfe69..80ba2553f5f 100644 --- a/sdk/trace/span.go +++ b/sdk/trace/span.go @@ -69,7 +69,7 @@ type ReadOnlySpan interface { // InstrumentationLibrary returns information about the instrumentation // library that created the span. // Deprecated: please use InstrumentationScope instead. - InstrumentationLibrary() instrumentation.Library + InstrumentationLibrary() instrumentation.Scope // Resource returns information about the entity that produced the span. Resource() *resource.Resource // DroppedAttributes returns the number of attributes dropped by the span @@ -596,9 +596,9 @@ func (s *recordingSpan) InstrumentationScope() instrumentation.Scope { return s.tracer.instrumentationScope } -// InstrumentationLibrary returns the instrumentation.Library associated with +// InstrumentationLibrary returns the instrumentation.Scope associated with // the Tracer that created this span. -func (s *recordingSpan) InstrumentationLibrary() instrumentation.Library { +func (s *recordingSpan) InstrumentationLibrary() instrumentation.Scope { s.mu.Lock() defer s.mu.Unlock() return s.tracer.instrumentationScope diff --git a/sdk/trace/tracetest/span.go b/sdk/trace/tracetest/span.go index bfe73de9c41..b785dfe7381 100644 --- a/sdk/trace/tracetest/span.go +++ b/sdk/trace/tracetest/span.go @@ -71,7 +71,7 @@ type SpanStub struct { DroppedLinks int ChildSpanCount int Resource *resource.Resource - InstrumentationLibrary instrumentation.Library + InstrumentationLibrary instrumentation.Scope } // SpanStubFromReadOnlySpan returns a SpanStub populated from ro. @@ -162,6 +162,6 @@ func (s spanSnapshot) Resource() *resource.Resource { return s.resource } func (s spanSnapshot) InstrumentationScope() instrumentation.Scope { return s.instrumentationScope } -func (s spanSnapshot) InstrumentationLibrary() instrumentation.Library { +func (s spanSnapshot) InstrumentationLibrary() instrumentation.Scope { return s.instrumentationScope }