CREATETABLE IF NOTEXISTS zipkin_spans ( `trace_id_high` BIGINTNOTNULLDEFAULT0 COMMENT 'If non zero, this means the trace uses 128 bit traceIds instead of 64 bit', `trace_id` BIGINTNOTNULL, `id` BIGINTNOTNULL, `name` VARCHAR(255) NOTNULL, `parent_id` BIGINT, `debug` BIT(1), `start_ts` BIGINT COMMENT 'Span.timestamp(): epoch micros used for endTs query and to implement TTL', `duration` BIGINT COMMENT 'Span.duration(): micros used for minDuration and maxDuration query' ) ENGINE=InnoDB ROW_FORMAT=COMPRESSED CHARACTERSET=utf8 COLLATE utf8_general_ci;
CREATETABLE IF NOTEXISTS zipkin_annotations ( `trace_id_high` BIGINTNOTNULLDEFAULT0 COMMENT 'If non zero, this means the trace uses 128 bit traceIds instead of 64 bit', `trace_id` BIGINTNOTNULL COMMENT 'coincides with zipkin_spans.trace_id', `span_id` BIGINTNOTNULL COMMENT 'coincides with zipkin_spans.id', `a_key` VARCHAR(255) NOTNULL COMMENT 'BinaryAnnotation.key or Annotation.value if type == -1', `a_value` BLOB COMMENT 'BinaryAnnotation.value(), which must be smaller than 64KB', `a_type` INTNOTNULL COMMENT 'BinaryAnnotation.type() or -1 if Annotation', `a_timestamp` BIGINT COMMENT 'Used to implement TTL; Annotation.timestamp or zipkin_spans.timestamp', `endpoint_ipv4` INT COMMENT 'Null when Binary/Annotation.endpoint is null', `endpoint_ipv6` BINARY(16) COMMENT 'Null when Binary/Annotation.endpoint is null, or no IPv6 address', `endpoint_port` SMALLINT COMMENT 'Null when Binary/Annotation.endpoint is null', `endpoint_service_name` VARCHAR(255) COMMENT 'Null when Binary/Annotation.endpoint is null' ) ENGINE=InnoDB ROW_FORMAT=COMPRESSED CHARACTERSET=utf8 COLLATE utf8_general_ci;