Documentation ¶
Overview ¶
Package integrationsupport exists to expose functionality to integration packages without adding noise to the public API.
Index ¶
Constants ¶
const (
SampleAppName = "my app"
)
This code below is used for testing and is based on the similar code in internal_test.go in the newrelic package. That code is not exported, though, and we frequently need something similar for integration packages, so it is copied here.
Variables ¶
BasicConfigFn is a default config function to be used when no special settings are needed for a test app
var DTEnabledCfgFn = func(cfg *newrelic.Config) { cfg.Enabled = false cfg.DistributedTracer.Enabled = true }
DTEnabledCfgFn is a reusable Config function that sets Distributed Tracing to enabled
var SampleEverythingReplyFn = func(reply *internal.ConnectReply) { reply.AdaptiveSampler = internal.SampleEverything{} }
SampleEverythingReplyFn is a reusable ConnectReply function that samples everything
Functions ¶
func AddAgentAttribute ¶
func AddAgentAttribute(txn newrelic.Transaction, id internal.AgentAttributeID, stringVal string, otherVal interface{})
AddAgentAttribute allows instrumentation packages to add agent attributes.
func AddAgentSpanAttribute ¶
func AddAgentSpanAttribute(txn newrelic.Transaction, key internal.SpanAttribute, val string)
AddAgentSpanAttribute allows instrumentation packages to add span attributes.
Types ¶
type ExpectApp ¶
type ExpectApp interface { internal.Expect newrelic.Application }
ExpectApp combines Application and Expect, for use in validating data in test apps