New Relic · Schema

SpanBatch

A batch of spans with optional shared attributes

AnalysisAnalyticsAPMDevOpsInfrastructureMonitoringObservabilityPerformancePlatform

Properties

Name Type Description
common object Shared attributes applied to all spans in this batch
spans array Array of individual span objects
View JSON Schema on GitHub

JSON Schema

new-relic-trace-span-batch-schema.json Raw ↑
{
  "type": "object",
  "description": "A batch of spans with optional shared attributes",
  "properties": {
    "common": {
      "type": "object",
      "description": "Shared attributes applied to all spans in this batch",
      "properties": {
        "attributes": {
          "type": "object",
          "description": "Key-value attributes applied to every span in the batch",
          "example": {
            "customAttribute": "example_value"
          }
        }
      }
    },
    "spans": {
      "type": "array",
      "description": "Array of individual span objects",
      "example": [
        {
          "id": "500123",
          "trace.id": "500123",
          "timestamp": 1718153645993,
          "attributes": {
            "name": {},
            "parent.id": {},
            "duration.ms": {},
            "service.name": {},
            "error": {},
            "db.statement": {},
            "http.url": {},
            "http.method": {},
            "http.statusCode": {}
          }
        }
      ],
      "items": {
        "type": "object",
        "description": "A single distributed trace span in New Relic format",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for this span (16 hex characters)",
            "example": "500123"
          },
          "trace.id": {
            "type": "string",
            "description": "Trace ID that groups all spans in a distributed trace",
            "example": "500123"
          },
          "timestamp": {
            "type": "integer",
            "description": "Unix epoch timestamp in milliseconds when the span started",
            "example": 1718153645993
          },
          "attributes": {
            "type": "object",
            "description": "Span attributes",
            "example": {
              "name": "example-resource-01",
              "parent.id": "500123",
              "duration.ms": 0.42,
              "service.name": "myService",
              "error": true,
              "db.statement": "example_string",
              "http.url": "https://portal.example.com/path/abc123",
              "http.method": "example_string",
              "http.statusCode": 200
            },
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the operation represented by this span"
              },
              "parent.id": {
                "type": "string",
                "description": "The span ID of the parent span"
              },
              "duration.ms": {
                "type": "number",
                "description": "Duration of the span in milliseconds"
              },
              "service.name": {
                "type": "string",
                "description": "Name of the service that generated this span"
              },
              "error": {
                "type": "boolean",
                "description": "Whether the span represents an error"
              },
              "db.statement": {
                "type": "string",
                "description": "Database query statement if applicable"
              },
              "http.url": {
                "type": "string",
                "description": "HTTP URL for outbound calls"
              },
              "http.method": {
                "type": "string",
                "description": "HTTP method for outbound calls"
              },
              "http.statusCode": {
                "type": "integer",
                "description": "HTTP response status code"
              }
            }
          }
        },
        "required": [
          "id",
          "trace.id"
        ]
      }
    }
  },
  "required": [
    "spans"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "SpanBatch"
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/new-relic-trace-span-batch"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.