@@ -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.
520509func (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