Documentation ¶
Index ¶
- type LogProcess
- type Logger
- func (l *Logger) CallGRCPUpstream(uri string, ctx opentracing.SpanContext) (*LogProcess, context.Context)
- func (l *Logger) CallHTTPUpstream(parentRequest *http.Request, upstreamRequest *http.Request, ...) *LogProcess
- func (l *Logger) CallHealthHTTP() *LogProcess
- func (l *Logger) CallReadyHTTP() *LogProcess
- func (l *Logger) HandleGRCPRequest(ctx context.Context) *LogProcess
- func (l *Logger) HandleHTTPRequest(r *http.Request) *LogProcess
- func (l *Logger) Log() hclog.Logger
- func (l *Logger) ServiceStarted(name, upstreamURIs string, upstreamWorkers int, listenAddress string)
- func (l *Logger) SleepService(parentSpan opentracing.Span, d time.Duration) *LogProcess
- type Metrics
- type NullMetrics
- type StatsDMetrics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogProcess ¶
type LogProcess struct { Span opentracing.Span // contains filtered or unexported fields }
LogProcess is returned from a logging function
func (*LogProcess) SetError ¶
func (l *LogProcess) SetError(err error)
SetError for the current operation
func (*LogProcess) SetMetadata ¶
func (l *LogProcess) SetMetadata(key, value string)
SetMetadata for the process
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) CallGRCPUpstream ¶
func (l *Logger) CallGRCPUpstream(uri string, ctx opentracing.SpanContext) (*LogProcess, context.Context)
Logs data regarding upstream grpc requests returns a context containing span context for tracing
func (*Logger) CallHTTPUpstream ¶
func (l *Logger) CallHTTPUpstream(parentRequest *http.Request, upstreamRequest *http.Request, ctx opentracing.SpanContext) *LogProcess
Logs data regarding upstream http requests
func (*Logger) CallHealthHTTP ¶
func (l *Logger) CallHealthHTTP() *LogProcess
func (*Logger) CallReadyHTTP ¶
func (l *Logger) CallReadyHTTP() *LogProcess
func (*Logger) HandleGRCPRequest ¶
func (l *Logger) HandleGRCPRequest(ctx context.Context) *LogProcess
func (*Logger) HandleHTTPRequest ¶
func (l *Logger) HandleHTTPRequest(r *http.Request) *LogProcess
HandleHTTPRequest creates the request span and timing metrics for the handler
func (*Logger) ServiceStarted ¶
func (l *Logger) ServiceStarted(name, upstreamURIs string, upstreamWorkers int, listenAddress string)
LogServiceStarted logs information when the service starts
func (*Logger) SleepService ¶
func (l *Logger) SleepService(parentSpan opentracing.Span, d time.Duration) *LogProcess
Logs data about service duration simulation
type Metrics ¶
type Metrics interface { Timing(name string, duration time.Duration, tags []string) Increment(name string, tags []string) }
func NewStatsDMetrics ¶
type NullMetrics ¶
type NullMetrics struct { }
func (*NullMetrics) Increment ¶
func (s *NullMetrics) Increment(name string, tags []string)
type StatsDMetrics ¶
type StatsDMetrics struct {
// contains filtered or unexported fields
}
func (*StatsDMetrics) Increment ¶
func (s *StatsDMetrics) Increment(name string, tags []string)
Click to show internal directories.
Click to hide internal directories.