github.com/newrelic/go-agent@v3.26.0+incompatible/internal/limits.go (about) 1 // Copyright 2020 New Relic Corporation. All rights reserved. 2 // SPDX-License-Identifier: Apache-2.0 3 4 package internal 5 6 import "time" 7 8 const ( 9 // app behavior 10 11 // FixedHarvestPeriod is the period that fixed period data (metrics, 12 // traces, and span events) is sent to New Relic. 13 FixedHarvestPeriod = 60 * time.Second 14 // DefaultConfigurableEventHarvestMs is the period for custom, error, 15 // and transaction events if the connect response's 16 // "event_harvest_config.report_period_ms" is missing or invalid. 17 DefaultConfigurableEventHarvestMs = 60 * 1000 18 // CollectorTimeout is the timeout used in the client for communication 19 // with New Relic's servers. 20 CollectorTimeout = 20 * time.Second 21 // AppDataChanSize is the size of the channel that contains data sent 22 // the app processor. 23 AppDataChanSize = 200 24 failedMetricAttemptsLimit = 5 25 failedEventsAttemptsLimit = 10 26 // maxPayloadSizeInBytes specifies the maximum payload size in bytes that 27 // should be sent to any endpoint 28 maxPayloadSizeInBytes = 1000 * 1000 29 30 // transaction behavior 31 maxStackTraceFrames = 100 32 // MaxTxnErrors is the maximum number of errors captured per 33 // transaction. 34 MaxTxnErrors = 5 35 maxTxnSlowQueries = 10 36 37 startingTxnTraceNodes = 16 38 maxTxnTraceNodes = 256 39 40 // harvest data 41 maxMetrics = 2 * 1000 42 // MaxCustomEvents is the maximum number of Transaction Events that can be captured 43 // per 60-second harvest cycle 44 MaxCustomEvents = 10 * 1000 45 // MaxTxnEvents is the maximum number of Transaction Events that can be captured 46 // per 60-second harvest cycle 47 MaxTxnEvents = 10 * 1000 48 maxRegularTraces = 1 49 maxSyntheticsTraces = 20 50 // MaxErrorEvents is the maximum number of Error Events that can be captured 51 // per 60-second harvest cycle 52 MaxErrorEvents = 100 53 maxHarvestErrors = 20 54 maxHarvestSlowSQLs = 10 55 // MaxSpanEvents is the maximum number of Span Events that can be captured 56 // per 60-second harvest cycle 57 MaxSpanEvents = 1000 58 59 // attributes 60 attributeKeyLengthLimit = 255 61 attributeValueLengthLimit = 255 62 attributeUserLimit = 64 63 // AttributeErrorLimit limits the number of extra attributes that can be 64 // provided when noticing an error. 65 AttributeErrorLimit = 32 66 customEventAttributeLimit = 64 67 68 // Limits affecting Config validation are found in the config package. 69 70 // RuntimeSamplerPeriod is the period of the runtime sampler. Runtime 71 // metrics should not depend on the sampler period, but the period must 72 // be the same across instances. For that reason, this value should not 73 // be changed without notifying customers that they must update all 74 // instance simultaneously for valid runtime metrics. 75 RuntimeSamplerPeriod = 60 * time.Second 76 77 txnNameCacheLimit = 40 78 )