Skip to content

Upgrading go.opencensus.io 0.4 to 0.5

Breakingv0.4.0 → v0.5.0Breaking9New6Changed9Fixed5Other10

BreakingUpgrade verdict

9 breaking changes.

  • Code that called SetAttributes must now call AddAttributes.
  • Removes NoTrace from achttp and ocgrpc integrations.
  • Cleans up ocgrpc by removing NewXXXStatsHandler methods.
  • Removes deprecated trace.StartSpanWithXXX convenience methods.
Top 3 of 9 that need code or config changes
Breaking9
Renames SetAttributes to AddAttributes.
SetAttributesAddAttributes
Removes NoTrace from achttp and ocgrpc integrations.
NoTrace
Cleans up ocgrpc by removing NewXXXStatsHandler methods.
NewXXXStatsHandler
Removes deprecated trace.StartSpanWithXXX convenience methods.
trace.StartSpanWithXXX
Removes vestigial ocgrpc client and server Stats and Trace handlers.
ocgrpc.clientStatsHandlerocgrpc.serverStatsHandlerocgrpc.clientTraceHandlerocgrpc.serverTraceHandler
Converts Attribute to a struct.
Attribute
Makes Sampler a function.
Sampler
Hides Measure fields.
Measure
Changes DistributionAggregation([]float64{...}) to DistributionAggregation{}.
DistributionAggregation

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

  • added: field Options.Registry: *prometheus.Registry
  • added: field Options.MetricPrefix: string
  • added: method HTTPFormat.SpanContextFromRequest(*http.Request) (trace.SpanContext, bool)
  • added: method HTTPFormat.SpanContextToRequest(trace.SpanContext, *http.Request)
  • added: type HTTPFormat: struct
  • removed: field ClientHandler.NoTrace: bool
  • removed: field ServerHandler.NoTrace: bool
  • removed: func NewClientStatsHandler() stats.Handler
  • removed: func NewServerStatsHandler() stats.Handler
  • added: field ClientHandler.StartOptions: trace.StartOptions
  • added: field ServerHandler.IsPublicEndpoint: bool
  • added: field ServerHandler.StartOptions: trace.StartOptions
  • removed: field Handler.NoTrace: bool
  • removed: field Transport.NoTrace: bool
  • removed: field Transport.Sampler: trace.Sampler
  • removed: var DefaultViews
  • added: field Handler.IsPublicEndpoint: bool
  • added: field Handler.StartOptions: trace.StartOptions
  • added: field Transport.StartOptions: trace.StartOptions
  • added: var DefaultClientViews
  • added: var DefaultServerViews
  • added: var ServerLatency
  • added: var ServerLatencyView
  • added: var ServerRequestBytes
  • added: var ServerRequestBytesView
  • added: var ServerRequestCount
  • added: var ServerRequestCountByMethod
  • added: var ServerRequestCountView
  • added: var ServerResponseBytes
  • added: var ServerResponseBytesView
  • added: var ServerResponseCountByStatusCode
  • removed: field Measurement.Measure: Measure
  • removed: field Measurement.Value: float64
  • added: method Measurement.Measure() Measure
  • added: method Measurement.Value() float64
  • removed: field BoolAttribute.Key: string
  • removed: field BoolAttribute.Value: bool
  • removed: field Int64Attribute.Key: string
  • removed: field Int64Attribute.Value: int64
  • removed: field StringAttribute.Key: string
  • removed: field StringAttribute.Value: string
  • removed: func StartSpanWithOptions(context.Context, string, StartOptions) (context.Context, *Span)
  • removed: func StartSpanWithRemoteParent(context.Context, string, SpanContext, StartOptions) (context.Context, *Span)
  • removed: method Sampler.Sample(SamplingParameters) SamplingDecision
  • removed: method Span.SetAttributes(...Attribute)
  • removed: type BoolAttribute: struct
  • removed: type Int64Attribute: struct
  • removed: type StringAttribute: struct
  • changed: type Attribute: interface → type Attribute: struct
  • changed: type Sampler: interface → type Sampler: func(SamplingParameters) SamplingDecision
  • added: func BoolAttribute(string, bool) Attribute
  • added: func Int64Attribute(string, int64) Attribute
  • added: func StringAttribute(string, string) Attribute
  • added: method Span.AddAttributes(...Attribute)