Documentation ¶
Index ¶
- func AddAttribute(ctx context.Context, key string, value interface{}) context.Context
- func EndTransaction(ctx context.Context)
- func Error(ctx context.Context, err error) error
- func GetMetadataFromContext(ctx context.Context) http.Header
- func Init(cfg Config) (err error)
- func StartGinTransactionWithName(c *gin.Context, name string) *gin.Context
- func StartNSQSegment(ctx context.Context, topicName string) *newrelic.MessageProducerSegment
- func StartPostgresSegment(ctx context.Context, query, collection, operation string, ...) *newrelic.DatastoreSegment
- func StartPostgresSegmentWithDBName(ctx context.Context, ...) *newrelic.DatastoreSegment
- func StartSegment(ctx context.Context, name string) *newrelic.Segment
- func StartTransactionWithName(ctx context.Context, name string) context.Context
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAttribute ¶
AddAttribute to add attribute to span
func EndTransaction ¶
EndTransaction to end NR transaction from context
func StartGinTransactionWithName ¶
StartGinTransactionWithName start gin request trx
func StartNSQSegment ¶
func StartNSQSegment(ctx context.Context, topicName string) *newrelic.MessageProducerSegment
StartNSQSegment starts a new relic segment for NSQ produce topic
func StartPostgresSegment ¶
func StartPostgresSegment(ctx context.Context, query, collection, operation string, params map[string]interface{}) *newrelic.DatastoreSegment
StartPostgresSegment to start a postgres segment
func StartPostgresSegmentWithDBName ¶
func StartPostgresSegmentWithDBName( ctx context.Context, dbName, dbHost, dbPort, query, collection, operation string, params map[string]interface{}, ) *newrelic.DatastoreSegment
StartPostgresSegmentWithDBName to start a postgres segment with DB name & the DB host
func StartSegment ¶
StartSegment start segment
Types ¶
Click to show internal directories.
Click to hide internal directories.