Skip to content

Commit da36b6e

Browse files
committed
Comment clarification
2 parents 312f581 + d5919d5 commit da36b6e

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

v3/newrelic/config.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@ func defaultConfig() Config {
383383
c.Enabled = true
384384
c.Labels = make(map[string]string)
385385
c.CustomInsightsEvents.Enabled = true
386-
c.CustomInsightsEvents.MaxSamplesStored = internal.MaxCustomEvents
387386
c.TransactionEvents.Enabled = true
388387
c.TransactionEvents.Attributes.Enabled = true
389388
c.TransactionEvents.MaxSamplesStored = internal.MaxTxnEvents
@@ -505,16 +504,6 @@ func (c Config) validateTraceObserverConfig() (*observerURL, error) {
505504
}, nil
506505
}
507506

508-
// maxCustomEvents returns the configured maximum number of Custom Events if it has been configured
509-
// and is less than the default maximum; otherwise it returns the default max.
510-
func (c Config) maxCustomEvents() int {
511-
configured := c.CustomInsightsEvents.MaxSamplesStored
512-
if configured < 0 || configured > internal.MaxCustomEvents {
513-
return internal.MaxTxnEvents
514-
}
515-
return configured
516-
}
517-
518507
// maxTxnEvents returns the configured maximum number of Transaction Events if it has been configured
519508
// and is less than the default maximum; otherwise it returns the default max.
520509
func (c Config) maxTxnEvents() int {
@@ -679,7 +668,7 @@ func configConnectJSONInternal(c Config, pid int, util *utilization.Data, e envi
679668
Util: util,
680669
SecurityPolicies: securityPolicies,
681670
Metadata: metadata,
682-
EventData: internal.DefaultEventHarvestConfigWithDT(c.maxTxnEvents(), c.DistributedTracer.Enabled, c.DistributedTracer.ReservoirLimit, c.maxCustomEvents()),
671+
EventData: internal.DefaultEventHarvestConfigWithDT(c.maxTxnEvents(), c.DistributedTracer.Enabled, c.DistributedTracer.ReservoirLimit),
683672
}})
684673
}
685674

0 commit comments

Comments
 (0)