1
0

limits.go 2.2 KB

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