Skip to content

Upgrading go.opencensus.io 0.20 to 0.21

Breakingv0.20.2 → v0.21.0Breaking6New13Changed4Fixed5Other10

BreakingUpgrade verdict

6 breaking changes.

  • Three exporters no longer ship in the core module. They now live in a separate contrib module.
  • An old package that was already marked deprecated is gone.
  • Removes the Set method for cumulatives.
  • A metric label definition now carries an extra description text. Most users will not notice, but code that builds these labels may need updating.
Top 3 of 6 that need code or config changes

Drops github.com/apache/thrift, github.com/openzipkin/zipkin-go, github.com/prometheus/client_golang, google.golang.org/api.

Installs 6 packages in all (was null).

Also installs google.golang.org/genproto.

Breaking6
Removes the Prometheus, zipkin and jaeger exporters from go.opencensus.io, moving them to contrib.go.opencensus.io.
Removes the deprecated exemplar package.
Removes the Set method for cumulatives.
Set
Adds a description field to LabelKey in the metricdata package, a breaking change mainly affecting the stackdriver exporter.
LabelKey
Moves exporters out from the core module.
Adds a description field to LabelKey.
LabelKey

Generated by DepDelta from published Go source. Not mixed with prose notes.

  • added: field Options.MetricsLogFile: string
  • added: field Options.ReportingInterval: time.Duration
  • added: field Options.TracesLogFile: string
  • added: func NewLogExporter(Options) (*LogExporter, error)
  • added: method LogExporter.Close()
  • added: method LogExporter.ExportMetrics(context.Context, []*metricdata.Metric) error
  • added: method LogExporter.ExportSpan(*trace.SpanData)
  • added: method LogExporter.Start() error
  • added: method LogExporter.Stop()
  • added: type LogExporter: struct
  • added: type Options: struct
  • removed: const KeyPrefixTag
  • removed: const KeySpanID
  • removed: const KeyTraceID
  • removed: field Exemplar.Attachments: Attachments
  • removed: field Exemplar.Timestamp: time.Time
  • removed: field Exemplar.Value: float64
  • removed: func AttachmentsFromContext(context.Context) Attachments
  • removed: func RegisterAttachmentExtractor(AttachmentExtractor)
  • removed: type AttachmentExtractor: func(ctx context.Context, a Attachments) Attachments
  • removed: type Attachments: map[string]string
  • removed: type Exemplar: struct
  • removed: field Options.AgentEndpoint: string
  • removed: field Options.BufferMaxCount: int
  • removed: field Options.CollectorEndpoint: string
  • removed: field Options.Endpoint: string
  • removed: field Options.OnError: func(err error)
  • removed: field Options.Password: string
  • removed: field Options.Process: Process
  • removed: field Options.ServiceName: string
  • removed: field Options.Username: string
  • removed: field Process.ServiceName: string
  • removed: field Process.Tags: []Tag
  • removed: func BoolTag(string, bool) Tag
  • removed: func Int64Tag(string, int64) Tag
  • removed: func NewExporter(Options) (*Exporter, error)
  • removed: func StringTag(string, string) Tag
  • removed: method Exporter.ExportSpan(*trace.SpanData)
  • removed: method Exporter.Flush()
  • removed: type Exporter: struct
  • removed: type Options: struct
  • removed: type Process: struct
  • removed: type Tag: struct
  • removed: field Options.ConstLabels: prometheus.Labels
  • removed: field Options.Namespace: string
  • removed: field Options.OnError: func(err error)
  • removed: field Options.Registry: *prometheus.Registry
  • removed: func NewExporter(Options) (*Exporter, error)
  • removed: method Exporter.ExportView(*view.Data)
  • removed: method Exporter.ServeHTTP(http.ResponseWriter, *http.Request)
  • removed: type Exporter: struct
  • removed: type Options: struct
  • removed: func NewExporter(reporter.Reporter, *model.Endpoint) *Exporter
  • removed: method Exporter.ExportSpan(*trace.SpanData)
  • removed: type Exporter: struct
  • added: func WithConstLabel(map[metricdata.LabelKey]metricdata.LabelValue) Options
  • added: func WithLabelKeysAndDescription(...metricdata.LabelKey) Options
  • added: method Float64Cumulative.GetEntry(...metricdata.LabelValue) (*Float64CumulativeEntry, error)
  • added: method Float64CumulativeEntry.Inc(float64)
  • added: method Float64DerivedCumulative.UpsertEntry(func() float64, ...metricdata.LabelValue) error
  • added: method Int64Cumulative.GetEntry(...metricdata.LabelValue) (*Int64CumulativeEntry, error)
  • added: method Int64CumulativeEntry.Inc(int64)
  • added: method Int64DerivedCumulative.UpsertEntry(func() int64, ...metricdata.LabelValue) error
  • added: method Registry.AddFloat64Cumulative(string, ...Options) (*Float64Cumulative, error)
  • added: method Registry.AddFloat64DerivedCumulative(string, ...Options) (*Float64DerivedCumulative, error)
  • added: method Registry.AddInt64Cumulative(string, ...Options) (*Int64Cumulative, error)
  • added: method Registry.AddInt64DerivedCumulative(string, ...Options) (*Int64DerivedCumulative, error)
  • added: type Float64Cumulative: struct
  • added: type Float64CumulativeEntry: struct
  • added: type Float64DerivedCumulative: struct
  • added: type Int64Cumulative: struct
  • added: type Int64CumulativeEntry: struct
  • added: type Int64DerivedCumulative: struct
  • changed: field Descriptor.LabelKeys: []string → field Descriptor.LabelKeys: []LabelKey
  • added: const AttachmentKeySpanContext
  • added: field LabelKey.Description: string
  • added: field LabelKey.Key: string
  • added: type LabelKey: struct
  • added: func RecordWithOptions(context.Context, ...Options) error
  • added: func WithAttachments(metricdata.Attachments) Options
  • added: func WithMeasurements(...Measurement) Options
  • added: func WithTags(...tag.Mutator) Options
  • added: type Options: func(*recordOptions)
  • changed: func DecodeEach([]byte, func(key Key, val string)) error → func DecodeEach([]byte, func(key Key, val string, md metadatas)) error
  • changed: func Insert(Key, string) Mutator → func Insert(Key, string, ...Metadata) Mutator
  • changed: func Update(Key, string) Mutator → func Update(Key, string, ...Metadata) Mutator
  • changed: func Upsert(Key, string) Mutator → func Upsert(Key, string, ...Metadata) Mutator
  • added: func WithTTL(TTL) Metadata
  • added: type Metadata: func(*metadatas)
  • added: type TTL: struct
  • added: var TTLNoPropagation
  • added: var TTLUnlimitedPropagation