• English日本語한국어
  • Log inStart now

APM: Report custom events and attributes

If you have APM, you can report custom event data. You can then query and visualize your data in New Relic.

Data considerations

New Relic agents send event data to New Relic as part of the normal harvest cycle every five seconds for agent versions supporting real time streaming.

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.

You can also send custom events using the Event API (without need for APM). However, be aware that custom events sent with the agent APIs are not compatible with high-security mode.

Record custom events and attributes

You can add your own custom events and attributes, which you can then use for querying and charting. This is one of several ways to report custom data.

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 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:

Timestamps

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.

Limits and restricted characters

See Custom event data requirements for size limits, data types, and naming syntax requirements.

Reserved words

Before creating custom attributes, review New Relic's list of reserved terms used by NRQL. Otherwise unexpected results may occur.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.