New Relic · JSON Structure

Trace Api Zipkin Span Structure

A single span in Zipkin JSON v2 format

Type: object Properties: 11 Required: 2
AnalysisAnalyticsAPMDevOpsInfrastructureMonitoringObservabilityPerformancePlatform

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

Properties

id traceId parentId name timestamp duration kind localEndpoint remoteEndpoint tags annotations

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/trace-api-zipkin-span-structure.json",
  "name": "ZipkinSpan",
  "description": "A single span in Zipkin JSON v2 format",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Span ID (16 hex characters)",
      "example": "500123"
    },
    "traceId": {
      "type": "string",
      "description": "Trace ID (32 hex characters)",
      "example": "500123"
    },
    "parentId": {
      "type": "string",
      "description": "Parent span ID",
      "example": "500123"
    },
    "name": {
      "type": "string",
      "description": "Span name / operation name",
      "example": "example-resource-01"
    },
    "timestamp": {
      "type": "int32",
      "description": "Span start time in microseconds since epoch",
      "example": 1718153645993
    },
    "duration": {
      "type": "int32",
      "description": "Span duration in microseconds",
      "example": 100
    },
    "kind": {
      "type": "string",
      "enum": [
        "CLIENT",
        "SERVER",
        "PRODUCER",
        "CONSUMER"
      ],
      "example": "CLIENT"
    },
    "localEndpoint": {
      "type": "object",
      "properties": {
        "serviceName": {
          "type": "string"
        },
        "ipv4": {
          "type": "string"
        },
        "port": {
          "type": "int32"
        }
      },
      "example": {
        "serviceName": "myService",
        "ipv4": "example_string",
        "port": 8080
      }
    },
    "remoteEndpoint": {
      "type": "object",
      "properties": {
        "serviceName": {
          "type": "string"
        },
        "ipv4": {
          "type": "string"
        },
        "port": {
          "type": "int32"
        }
      },
      "example": {
        "serviceName": "myService",
        "ipv4": "example_string",
        "port": 8080
      }
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "example": {
        "customAttribute": "example_value"
      }
    },
    "annotations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "int32"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "example": [
        {
          "timestamp": 1718153645993,
          "value": "example_string"
        }
      ]
    }
  },
  "required": [
    "id",
    "traceId"
  ]
}