limits.go 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. package internal
  2. import "time"
  3. const (
  4. // app behavior
  5. // ConnectBackoff is the wait time between unsuccessful connect
  6. // attempts.
  7. ConnectBackoff = 20 * time.Second
  8. // HarvestPeriod is the period that collected data is sent to New Relic.
  9. HarvestPeriod = 60 * time.Second
  10. // CollectorTimeout is the timeout used in the client for communication
  11. // with New Relic's servers.
  12. CollectorTimeout = 20 * time.Second
  13. // AppDataChanSize is the size of the channel that contains data sent
  14. // the app processor.
  15. AppDataChanSize = 200
  16. failedMetricAttemptsLimit = 5
  17. failedEventsAttemptsLimit = 10
  18. // transaction behavior
  19. maxStackTraceFrames = 100
  20. // MaxTxnErrors is the maximum number of errors captured per
  21. // transaction.
  22. MaxTxnErrors = 5
  23. maxTxnSlowQueries = 10
  24. startingTxnTraceNodes = 16
  25. maxTxnTraceNodes = 256
  26. // harvest data
  27. maxMetrics = 2 * 1000
  28. maxCustomEvents = 10 * 1000
  29. maxTxnEvents = 10 * 1000
  30. maxRegularTraces = 1
  31. maxSyntheticsTraces = 20
  32. maxErrorEvents = 100
  33. maxHarvestErrors = 20
  34. maxHarvestSlowSQLs = 10
  35. maxSpanEvents = 1000
  36. // attributes
  37. attributeKeyLengthLimit = 255
  38. attributeValueLengthLimit = 255
  39. attributeUserLimit = 64
  40. // AttributeErrorLimit limits the number of extra attributes that can be
  41. // provided when noticing an error.
  42. AttributeErrorLimit = 32
  43. attributeAgentLimit = 255 - (attributeUserLimit + AttributeErrorLimit)
  44. customEventAttributeLimit = 64
  45. // Limits affecting Config validation are found in the config package.
  46. // RuntimeSamplerPeriod is the period of the runtime sampler. Runtime
  47. // metrics should not depend on the sampler period, but the period must
  48. // be the same across instances. For that reason, this value should not
  49. // be changed without notifying customers that they must update all
  50. // instance simultaneously for valid runtime metrics.
  51. RuntimeSamplerPeriod = 60 * time.Second
  52. )