Documentation ¶
Overview ¶
Package opencensus provides helpers for OpenCensus instrumentation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSpan ¶
AddSpan starts OpenCensus trace span and returns updated context with callback to finish span.
Span is named by the parent function. Typically, span should be finished with deferred statement.
var err error ctx, finish := opencensus.AddSpan(ctx, trace.StringAttribute("key", "value"), ) defer finish(&err)
func Middleware ¶
Middleware instruments router with OpenCensus metrics.
Types ¶
type UseCaseMiddleware ¶
type UseCaseMiddleware struct {
WithInput bool
}
UseCaseMiddleware is a tracing usecase middleware.
func (UseCaseMiddleware) Wrap ¶
func (mw UseCaseMiddleware) Wrap(u usecase.Interactor) usecase.Interactor
Wrap makes an instrumented use case interactor.
Click to show internal directories.
Click to hide internal directories.