Sending a lot of events can increase the memory overhead of the agent. New Relic enforces an upper limit of 833 custom events every 5 seconds. Additionally, posts greater than 1MB (10^6 bytes) in size will not be recorded, regardless of the custom event limit.
To record a custom event, follow the procedures for your New Relic language agent. To add custom attributes to APM events, you must first enable them for your New Relic APM agent, and then make an API call to record the attribute. Follow the agent-specific custom attribute procedures.
When creating your own custom events and attributes, follow data requirements for:
You may not specify a timestamp on events that are collected and recorded via the agent. The agent will automatically assign a timestamp to events based on when they are recorded via the API.
See Custom event data requirements for size limits, data types, and naming syntax requirements.
Before creating custom attributes, review New Relic's list of reserved terms used by NRQL. Otherwise unexpected results may occur.