diff --git a/v3/newrelic/config.go b/v3/newrelic/config.go index 7ff054af7..01c5815f1 100644 --- a/v3/newrelic/config.go +++ b/v3/newrelic/config.go @@ -383,7 +383,6 @@ func defaultConfig() Config { c.Enabled = true c.Labels = make(map[string]string) c.CustomInsightsEvents.Enabled = true - c.CustomInsightsEvents.MaxSamplesStored = internal.MaxCustomEvents c.TransactionEvents.Enabled = true c.TransactionEvents.Attributes.Enabled = true c.TransactionEvents.MaxSamplesStored = internal.MaxTxnEvents @@ -505,16 +504,6 @@ func (c Config) validateTraceObserverConfig() (*observerURL, error) { }, nil } -// maxCustomEvents returns the configured maximum number of Custom Events if it has been configured -// and is less than the default maximum; otherwise it returns the default max. -func (c Config) maxCustomEvents() int { - configured := c.CustomInsightsEvents.MaxSamplesStored - if configured < 0 || configured > internal.MaxCustomEvents { - return internal.MaxTxnEvents - } - return configured -} - // maxTxnEvents returns the configured maximum number of Transaction Events if it has been configured // and is less than the default maximum; otherwise it returns the default max. func (c Config) maxTxnEvents() int { @@ -679,7 +668,7 @@ func configConnectJSONInternal(c Config, pid int, util *utilization.Data, e envi Util: util, SecurityPolicies: securityPolicies, Metadata: metadata, - EventData: internal.DefaultEventHarvestConfigWithDT(c.maxTxnEvents(), c.DistributedTracer.Enabled, c.DistributedTracer.ReservoirLimit, c.maxCustomEvents()), + EventData: internal.DefaultEventHarvestConfigWithDT(c.maxTxnEvents(), c.DistributedTracer.Enabled, c.DistributedTracer.ReservoirLimit), }}) }