Skip to content

Commit 78a3892

Browse files
authored
Set max samples for transaction events (#31)
1 parent 69251ef commit 78a3892

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

node/node.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,12 @@ func New(conf *Config) (*Node, error) {
114114
if os.Getenv("NEW_RELIC_APP_NAME") != "" {
115115
nrApp, err = newrelic.NewApplication(
116116
newrelic.ConfigFromEnvironment(),
117-
newrelic.ConfigEnabled(false),
117+
newrelic.ConfigEnabled(true),
118118
nrlogrus.ConfigStandardLogger(),
119119
newrelic.ConfigDistributedTracerEnabled(true),
120+
func(config *newrelic.Config) {
121+
config.TransactionEvents.MaxSamplesStored = 1000
122+
},
120123
)
121124
if err != nil {
122125
log.Error("Failed to initialise New Relic agent: ", err)

0 commit comments

Comments
 (0)