Const
📋 Constant representing an empty JSON array.
Use this when you need to represent an empty array in OpenTelemetry data structures that should serialize to [] in JSON.
[]
const metric: Metric = { name: "test_metric", description: "A test metric", unit: "count", metadata: emptyJsonArray, // Will serialize as [] gauge: { dataPoints: [ { // ... exemplars: emptyJsonArray // Will serialize as [] } ] }}; Copy
const metric: Metric = { name: "test_metric", description: "A test metric", unit: "count", metadata: emptyJsonArray, // Will serialize as [] gauge: { dataPoints: [ { // ... exemplars: emptyJsonArray // Will serialize as [] } ] }};
📋 Constant representing an empty JSON array.
Use this when you need to represent an empty array in OpenTelemetry data structures that should serialize to
[]
in JSON.