Documentation
¶
Index ¶
Constants ¶
View Source
const (
NewRelicContextKey = "newrelic_context"
)
Variables ¶
This section is empty.
Functions ¶
func RecordCount ¶
RecordCount records a count metric
func RecordDuration ¶
RecordDuration records a duration metric
Types ¶
type MethodTracer ¶
type MethodTracer struct {
// contains filtered or unexported fields
}
MethodTracer collects analytics for a given method call within an existing trace.
func TraceMethodCall ¶
func TraceMethodCall(ctx context.Context, structOrPackageName, methodName string) *MethodTracer
TraceMethodCall traces a method call with a given struct/package and method names
func (*MethodTracer) AddAttribute ¶
func (t *MethodTracer) AddAttribute(key string, value interface{})
AddAttribute adds a key-value pair metadata to the method trace
func (*MethodTracer) AddAttributes ¶
func (t *MethodTracer) AddAttributes(attributes map[string]interface{})
AddAttributes adds a set of key-value pair metadata to the method trace
func (*MethodTracer) End ¶
func (t *MethodTracer) End()
End completes the trace for the method call.
func (*MethodTracer) OnError ¶
func (t *MethodTracer) OnError(err error)
OnError observes an error within a method trace
Click to show internal directories.
Click to hide internal directories.