Documentation ¶
Index ¶
- Constants
- func Application() *newrelic.Application
- func Debug() bool
- func FromContext(ctx context.Context) *newrelic.Transaction
- func IsEnabled() bool
- func NewApplication(ctx context.Context) (*newrelic.Application, error)
- func NewLogger() newrelic.Logger
- type Logger
- func (l *Logger) Debug(msg string, context map[string]interface{})
- func (l *Logger) DebugEnabled() bool
- func (l *Logger) Error(msg string, context map[string]interface{})
- func (l *Logger) Info(msg string, context map[string]interface{})
- func (l *Logger) Warn(msg string, context map[string]interface{})
- type MessageMetricKey
Constants ¶
const NewRelicTransaction = "__newrelic_transaction__"
Variables ¶
This section is empty.
Functions ¶
func Application ¶
func Application() *newrelic.Application
Application initialize the new newrelic application singleton, if required, and/or return it.
func FromContext ¶
func FromContext(ctx context.Context) *newrelic.Transaction
FromContext returns the newrelic transaction from context.
func NewApplication ¶
func NewApplication(ctx context.Context) (*newrelic.Application, error)
NewApplication always initialize the new newrelic application singleton if enabled.
Types ¶
type Logger ¶
type Logger struct { }
Logger represents a newrelic logger.
func (*Logger) DebugEnabled ¶
DebugEnabled returns debug config value.
type MessageMetricKey ¶
type MessageMetricKey struct { Library string DestinationType string Consumer bool DestinationName string DestinationTemp bool }
MessageMetricKey is the key to use for message segments.
func (MessageMetricKey) Name ¶
func (key MessageMetricKey) Name() string
Name returns the metric name value for this MessageMetricKey to be used for scoped and unscoped metrics.
Producers MessageBroker/{Library}/{Destination Type}/{Action}/Named/{Destination Name} MessageBroker/{Library}/{Destination Type}/{Action}/Temp
Consumers OtherTransaction/Message/{Library}/{DestinationType}/Named/{Destination Name} OtherTransaction/Message/{Library}/{DestinationType}/Temp