New Relic · JSON Structure

Event Api Custom Event Structure

A custom event to record. Must include eventType. All other attributes are user-defined key-value pairs. Attribute names must not start with nr. (reserved). Values can be strings, numbers, or booleans.

Type: object Properties: 2 Required: 1
AnalysisAnalyticsAPMDevOpsInfrastructureMonitoringObservabilityPerformancePlatform

CustomEvent is a JSON Structure definition published by New Relic, describing 2 properties, of which 1 is required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

eventType timestamp

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-structure/event-api-custom-event-structure.json",
  "name": "CustomEvent",
  "description": "A custom event to record. Must include eventType. All other attributes are user-defined key-value pairs. Attribute names must not start with nr. (reserved). Values can be strings, numbers, or booleans.",
  "type": "object",
  "properties": {
    "eventType": {
      "type": "string",
      "description": "The type of event. Used as the NRDB event table name. Must match the pattern [a-zA-Z0-9:_ ]+, max 255 characters.",
      "maxLength": 255,
      "example": "standard"
    },
    "timestamp": {
      "type": "int32",
      "description": "Unix epoch timestamp in seconds. If omitted, the current time is used. Cannot be more than 48 hours in the past or 24 hours in the future.",
      "example": 1718153645993
    }
  },
  "required": [
    "eventType"
  ],
  "additionalProperties": {
    "description": "Additional user-defined event attributes",
    "oneOf": [
      {
        "type": "string",
        "maxLength": 4096
      },
      {
        "type": "double"
      },
      {
        "type": "boolean"
      }
    ]
  }
}