{
  "x402Version": 2,
  "id": 34027,
  "slug": "34027",
  "resource": "https://api.zfinia.com/x402/v1/telemetry-attribute-contract-audit",
  "description": "Audit telemetry attributes against a contract, and against the thing a schema cannot see: cardinality. Reports missing required attributes, undeclared attributes, an attribute appearing as two types across the batch, and an attribute whose distinct values exceed your limit - because in a metrics backend each distinct value is a separate series, and that is how an index or a bill explodes.",
  "type": "http",
  "serviceName": "Telemetry Attribute Audit",
  "resourceType": "Monitoring",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x25e8245f07d5e4873987293dad666afbe56a9608",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "120000",
      "amountUsd": 0.12,
      "maxTimeoutSeconds": 60
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "attribute_pointer": "/attributes",
            "cardinality_limit": 3,
            "contract": {
              "optional": [
                "region"
              ],
              "required": [
                "service",
                "environment"
              ],
              "types": {
                "environment": "string",
                "latency_ms": "number",
                "service": "string"
              }
            },
            "records": [
              {
                "attributes": {
                  "environment": "prod",
                  "latency_ms": 31.2,
                  "region": "ap-southeast-2",
                  "request_id": "r-1",
                  "service": "checkout"
                },
                "name": "http.request"
              },
              {
                "attributes": {
                  "environment": "prod",
                  "latency_ms": 44,
                  "region": "ap-southeast-2",
                  "request_id": "r-2",
                  "service": "checkout"
                },
                "name": "http.request"
              },
              {
                "attributes": {
                  "environment": "prod",
                  "latency_ms": "51",
                  "request_id": "r-3",
                  "service": "checkout"
                },
                "name": "http.request"
              },
              {
                "attributes": {
                  "environment": "prod",
                  "latency_ms": 28,
                  "request_id": "r-4",
                  "service": "checkout"
                },
                "name": "http.request"
              },
              {
                "name": "http.request"
              }
            ]
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "assumptions": [
              "Cardinality is counted within the batch supplied, and each distinct value of an attribute is one series in a metrics backend, which is why it is reported as a risk.",
              "An attribute that appears as two types across a batch cannot be indexed by a typed backend, whatever any single record looks like."
            ],
            "attributes": [
              {
                "attribute": "environment",
                "declared": true,
                "distinct_count": 1,
                "presence_rate": 0.8,
                "records": 4,
                "types": {
                  "string": 4
                }
              },
              {
                "attribute": "latency_ms",
                "declared": true,
                "distinct_count": 4,
                "presence_rate": 0.8,
                "records": 4,
                "types": {
                  "integer": 2,
                  "number": 1,
                  "string": 1
                }
              },
              {
                "attribute": "request_id",
                "declared": false,
                "distinct_count": 4,
                "presence_rate": 0.8,
                "records": 4,
                "types": {
                  "string": 4
                }
              }
            ],
            "cardinality_limit": 3,
            "complete": true,
            "conformant": false,
            "distinct_attribute_count": 5,
            "examined_record_count": 5,
            "finding_count": 9,
            "findings": [
              {
                "attribute": "request_id",
                "code": "UNDECLARED_ATTRIBUTE",
                "detail": "Record 0 carries request_id, which the contract does not declare.",
                "record": 0
              },
              {
                "attribute": "request_id",
                "code": "UNDECLARED_ATTRIBUTE",
                "detail": "Record 1 carries request_id, which the contract does not declare.",
                "record": 1
              },
              {
                "attribute": "request_id",
                "code": "UNDECLARED_ATTRIBUTE",
                "detail": "Record 2 carries request_id, which the contract does not declare.",
                "record": 2
              }
            ],
            "findings_by_code": {
              "ATTRIBUTES_MISSING": 1,
              "ATTRIBUTE_CARDINALITY_RISK": 2,
              "ATTRIBUTE_TYPE_INCONSISTENT": 1,
              "ATTRIBUTE_TYPE_MISMATCH": 1,
              "UNDECLARED_ATTRIBUTE": 4
            },
            "limitations": [
              "Attribute shape and cardinality over the batch supplied. Whether the batch represents real traffic is not knowable here, so a cardinality figure is a lower bound.",
              "conformant is true only when every record was examined, every required attribute was present, and no type or cardinality problem was found."
            ],
            "limits": {
              "cardinalityWarning": 100,
              "maxAttributes": 500,
              "maxEvents": 2000,
              "maxFindings": 500,
              "maxPartitions": 500,
              "maxSchemas": 100
            },
            "not_examined": [],
            "observed_at": "2026-10-02T00:00:00.000Z",
            "passed": false,
            "records_without_attributes": 1,
            "request_id": "example-request",
            "service_id": "telemetry_attribute_contract_audit",
            "service_version": "1.0.0",
            "supplied_record_count": 5
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "attribute_pointer": {
                    "maxLength": 512,
                    "type": "string"
                  },
                  "cardinality_limit": {
                    "minimum": 1,
                    "type": "integer"
                  },
                  "contract": {
                    "additionalProperties": false,
                    "properties": {
                      "allow_undeclared": {
                        "type": "boolean"
                      },
                      "optional": {
                        "items": {
                          "maxLength": 256,
                          "type": "string"
                        },
                        "maxItems": 500,
                        "minItems": 1,
                        "type": "array"
                      },
                      "required": {
                        "items": {
                          "maxLength": 256,
                          "type": "string"
                        },
                        "maxItems": 500,
                        "minItems": 1,
                        "type": "array"
                      },
                      "types": {
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "records": {
                    "items": {
                      "type": "object"
                    },
                    "maxItems": 2000,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "records",
                  "contract"
                ],
                "type": "object"
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "telemetry",
    "observability",
    "cardinality",
    "data contract",
    "cost control",
    "bazaar"
  ],
  "sourceHost": "api.zfinia.com",
  "lastUpdated": "2026-10-04T07:59:43.768Z",
  "quality": {
    "calls30d": 1,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-10-04T07:59:39.3Z"
  },
  "metadata": {
    "serviceName": "Telemetry Attribute Audit",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "body": {
              "attribute_pointer": "/attributes",
              "cardinality_limit": 3,
              "contract": {
                "optional": [
                  "region"
                ],
                "required": [
                  "service",
                  "environment"
                ],
                "types": {
                  "environment": "string",
                  "latency_ms": "number",
                  "service": "string"
                }
              },
              "records": [
                {
                  "attributes": {
                    "environment": "prod",
                    "latency_ms": 31.2,
                    "region": "ap-southeast-2",
                    "request_id": "r-1",
                    "service": "checkout"
                  },
                  "name": "http.request"
                },
                {
                  "attributes": {
                    "environment": "prod",
                    "latency_ms": 44,
                    "region": "ap-southeast-2",
                    "request_id": "r-2",
                    "service": "checkout"
                  },
                  "name": "http.request"
                },
                {
                  "attributes": {
                    "environment": "prod",
                    "latency_ms": "51",
                    "request_id": "r-3",
                    "service": "checkout"
                  },
                  "name": "http.request"
                },
                {
                  "attributes": {
                    "environment": "prod",
                    "latency_ms": 28,
                    "request_id": "r-4",
                    "service": "checkout"
                  },
                  "name": "http.request"
                },
                {
                  "name": "http.request"
                }
              ]
            },
            "bodyType": "json",
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "assumptions": [
                "Cardinality is counted within the batch supplied, and each distinct value of an attribute is one series in a metrics backend, which is why it is reported as a risk.",
                "An attribute that appears as two types across a batch cannot be indexed by a typed backend, whatever any single record looks like."
              ],
              "attributes": [
                {
                  "attribute": "environment",
                  "declared": true,
                  "distinct_count": 1,
                  "presence_rate": 0.8,
                  "records": 4,
                  "types": {
                    "string": 4
                  }
                },
                {
                  "attribute": "latency_ms",
                  "declared": true,
                  "distinct_count": 4,
                  "presence_rate": 0.8,
                  "records": 4,
                  "types": {
                    "integer": 2,
                    "number": 1,
                    "string": 1
                  }
                },
                {
                  "attribute": "request_id",
                  "declared": false,
                  "distinct_count": 4,
                  "presence_rate": 0.8,
                  "records": 4,
                  "types": {
                    "string": 4
                  }
                }
              ],
              "cardinality_limit": 3,
              "complete": true,
              "conformant": false,
              "distinct_attribute_count": 5,
              "examined_record_count": 5,
              "finding_count": 9,
              "findings": [
                {
                  "attribute": "request_id",
                  "code": "UNDECLARED_ATTRIBUTE",
                  "detail": "Record 0 carries request_id, which the contract does not declare.",
                  "record": 0
                },
                {
                  "attribute": "request_id",
                  "code": "UNDECLARED_ATTRIBUTE",
                  "detail": "Record 1 carries request_id, which the contract does not declare.",
                  "record": 1
                },
                {
                  "attribute": "request_id",
                  "code": "UNDECLARED_ATTRIBUTE",
                  "detail": "Record 2 carries request_id, which the contract does not declare.",
                  "record": 2
                }
              ],
              "findings_by_code": {
                "ATTRIBUTES_MISSING": 1,
                "ATTRIBUTE_CARDINALITY_RISK": 2,
                "ATTRIBUTE_TYPE_INCONSISTENT": 1,
                "ATTRIBUTE_TYPE_MISMATCH": 1,
                "UNDECLARED_ATTRIBUTE": 4
              },
              "limitations": [
                "Attribute shape and cardinality over the batch supplied. Whether the batch represents real traffic is not knowable here, so a cardinality figure is a lower bound.",
                "conformant is true only when every record was examined, every required attribute was present, and no type or cardinality problem was found."
              ],
              "limits": {
                "cardinalityWarning": 100,
                "maxAttributes": 500,
                "maxEvents": 2000,
                "maxFindings": 500,
                "maxPartitions": 500,
                "maxSchemas": 100
              },
              "not_examined": [],
              "observed_at": "2026-10-02T00:00:00.000Z",
              "passed": false,
              "records_without_attributes": 1,
              "request_id": "example-request",
              "service_id": "telemetry_attribute_contract_audit",
              "service_version": "1.0.0",
              "supplied_record_count": 5
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "attribute_pointer": {
                      "maxLength": 512,
                      "type": "string"
                    },
                    "cardinality_limit": {
                      "minimum": 1,
                      "type": "integer"
                    },
                    "contract": {
                      "additionalProperties": false,
                      "properties": {
                        "allow_undeclared": {
                          "type": "boolean"
                        },
                        "optional": {
                          "items": {
                            "maxLength": 256,
                            "type": "string"
                          },
                          "maxItems": 500,
                          "minItems": 1,
                          "type": "array"
                        },
                        "required": {
                          "items": {
                            "maxLength": 256,
                            "type": "string"
                          },
                          "maxItems": 500,
                          "minItems": 1,
                          "type": "array"
                        },
                        "types": {
                          "type": "object"
                        }
                      },
                      "type": "object"
                    },
                    "records": {
                      "items": {
                        "type": "object"
                      },
                      "maxItems": 2000,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "records",
                    "contract"
                  ],
                  "type": "object"
                },
                "bodyType": {
                  "enum": [
                    "json",
                    "form-data",
                    "text"
                  ],
                  "type": "string"
                },
                "method": {
                  "enum": [
                    "POST"
                  ],
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method",
                "bodyType",
                "body"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.zfinia.com",
    "manifest_name": "api.zfinia.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "assumptions": [
      "Cardinality is counted within the batch supplied, and each distinct value of an attribute is one series in a metrics backend, which is why it is reported as a risk.",
      "An attribute that appears as two types across a batch cannot be indexed by a typed backend, whatever any single record looks like."
    ],
    "attributes": [
      {
        "attribute": "environment",
        "declared": true,
        "distinct_count": 1,
        "presence_rate": 0.8,
        "records": 4,
        "types": {
          "string": 4
        }
      },
      {
        "attribute": "latency_ms",
        "declared": true,
        "distinct_count": 4,
        "presence_rate": 0.8,
        "records": 4,
        "types": {
          "integer": 2,
          "number": 1,
          "string": 1
        }
      },
      {
        "attribute": "request_id",
        "declared": false,
        "distinct_count": 4,
        "presence_rate": 0.8,
        "records": 4,
        "types": {
          "string": 4
        }
      }
    ],
    "cardinality_limit": 3,
    "complete": true,
    "conformant": false,
    "distinct_attribute_count": 5,
    "examined_record_count": 5,
    "finding_count": 9,
    "findings": [
      {
        "attribute": "request_id",
        "code": "UNDECLARED_ATTRIBUTE",
        "detail": "Record 0 carries request_id, which the contract does not declare.",
        "record": 0
      },
      {
        "attribute": "request_id",
        "code": "UNDECLARED_ATTRIBUTE",
        "detail": "Record 1 carries request_id, which the contract does not declare.",
        "record": 1
      },
      {
        "attribute": "request_id",
        "code": "UNDECLARED_ATTRIBUTE",
        "detail": "Record 2 carries request_id, which the contract does not declare.",
        "record": 2
      }
    ],
    "findings_by_code": {
      "ATTRIBUTES_MISSING": 1,
      "ATTRIBUTE_CARDINALITY_RISK": 2,
      "ATTRIBUTE_TYPE_INCONSISTENT": 1,
      "ATTRIBUTE_TYPE_MISMATCH": 1,
      "UNDECLARED_ATTRIBUTE": 4
    },
    "limitations": [
      "Attribute shape and cardinality over the batch supplied. Whether the batch represents real traffic is not knowable here, so a cardinality figure is a lower bound.",
      "conformant is true only when every record was examined, every required attribute was present, and no type or cardinality problem was found."
    ],
    "limits": {
      "cardinalityWarning": 100,
      "maxAttributes": 500,
      "maxEvents": 2000,
      "maxFindings": 500,
      "maxPartitions": 500,
      "maxSchemas": 100
    },
    "not_examined": [],
    "observed_at": "2026-10-02T00:00:00.000Z",
    "passed": false,
    "records_without_attributes": 1,
    "request_id": "example-request",
    "service_id": "telemetry_attribute_contract_audit",
    "service_version": "1.0.0",
    "supplied_record_count": 5
  }
}