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 oldfritter package. That code is not exported, though, and we frequently need something similar for integration packages, so it is copied here.
Variables ¶
var BasicConfigFn = func(cfg *oldfritter.Config) { cfg.Enabled = false }
BasicConfigFn is a default config function to be used when no special settings are needed for a test app
var DTEnabledCfgFn = func(cfg *oldfritter.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.SetSampleEverything()
}
SampleEverythingReplyFn is a reusable ConnectReply function that samples everything
Functions ¶
func AddAgentAttribute ¶
func AddAgentAttribute(txn *oldfritter.Transaction, id string, stringVal string, otherVal interface{})
AddAgentAttribute allows instrumentation packages to add agent attributes.
func AddAgentSpanAttribute ¶
func AddAgentSpanAttribute(txn *oldfritter.Transaction, key string, val string)
AddAgentSpanAttribute allows instrumentation packages to add span attributes.
func ConfigFullTraces ¶
func ConfigFullTraces(cfg *oldfritter.Config)
ConfigFullTraces enables distributed tracing and sets transaction trace and transaction trace segment thresholds to zero for full traces.
Types ¶
type ExpectApp ¶
type ExpectApp struct { internal.Expect *oldfritter.Application }
ExpectApp combines Application and Expect, for use in validating data in test apps
func NewBasicTestApp ¶
func NewBasicTestApp() ExpectApp
NewBasicTestApp creates an ExpectApp with the standard testing connect reply function and config
func NewTestApp ¶
func NewTestApp(replyfn func(*internal.ConnectReply), cfgFn ...oldfritter.ConfigOption) ExpectApp
NewTestApp creates an ExpectApp with the given ConnectReply function and Config function