This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch trace/liaison in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
commit 8dbbc8f94205c55248def09d290fa44ec5da33d4 Author: Gao Hongtao <hanahm...@gmail.com> AuthorDate: Thu Aug 28 12:23:30 2025 +0800 Add test data for trace service - Introduced JSON files for trace service configuration, including group, index rule bindings, and trace definitions. - Added metadata and resource options for trace management, enhancing the testing framework for the trace service. --- pkg/test/trace/testdata/group.json | 21 +++++++++++ .../trace/testdata/index_rule_bindings/sw.json | 17 +++++++++ pkg/test/trace/testdata/index_rules/duration.json | 14 +++++++ pkg/test/trace/testdata/index_rules/timestamp.json | 14 +++++++ pkg/test/trace/testdata/traces/sw.json | 43 ++++++++++++++++++++++ 5 files changed, 109 insertions(+) diff --git a/pkg/test/trace/testdata/group.json b/pkg/test/trace/testdata/group.json new file mode 100644 index 00000000..d99a4ee5 --- /dev/null +++ b/pkg/test/trace/testdata/group.json @@ -0,0 +1,21 @@ +[ + { + "metadata": { + "name": "default" + }, + "catalog": "CATALOG_TRACE", + "resource_opts": { + "shard_num": 2, + "replicas": 1, + "segment_interval": { + "unit": "UNIT_DAY", + "num": 1 + }, + "ttl": { + "unit": "UNIT_DAY", + "num": 3 + } + }, + "updated_at": "2021-04-15T01:30:15.01Z" + } +] \ No newline at end of file diff --git a/pkg/test/trace/testdata/index_rule_bindings/sw.json b/pkg/test/trace/testdata/index_rule_bindings/sw.json new file mode 100644 index 00000000..35fa8321 --- /dev/null +++ b/pkg/test/trace/testdata/index_rule_bindings/sw.json @@ -0,0 +1,17 @@ +{ + "metadata": { + "name": "sw-index-rule-binding", + "group": "default" + }, + "rules": [ + "duration", + "timestamp" + ], + "subject": { + "catalog": "CATALOG_TRACE", + "name": "sw" + }, + "begin_at": "2021-04-15T01:30:15.01Z", + "expire_at": "2121-04-15T01:30:15.01Z", + "updated_at": "2021-04-15T01:30:15.01Z" +} \ No newline at end of file diff --git a/pkg/test/trace/testdata/index_rules/duration.json b/pkg/test/trace/testdata/index_rules/duration.json new file mode 100644 index 00000000..8826ac83 --- /dev/null +++ b/pkg/test/trace/testdata/index_rules/duration.json @@ -0,0 +1,14 @@ +{ + "metadata": { + "name": "duration", + "group": "default" + }, + "tags": [ + "service_id", + "service_instance_id", + "state", + "duration" + ], + "type": "TYPE_TREE", + "updated_at": "2021-04-15T01:30:15.01Z" +} \ No newline at end of file diff --git a/pkg/test/trace/testdata/index_rules/timestamp.json b/pkg/test/trace/testdata/index_rules/timestamp.json new file mode 100644 index 00000000..c0c3f53c --- /dev/null +++ b/pkg/test/trace/testdata/index_rules/timestamp.json @@ -0,0 +1,14 @@ +{ + "metadata": { + "name": "timestamp", + "group": "default" + }, + "tags": [ + "service_id", + "service_instance_id", + "state", + "timestamp" + ], + "type": "TYPE_TREE", + "updated_at": "2021-04-15T01:30:15.01Z" +} \ No newline at end of file diff --git a/pkg/test/trace/testdata/traces/sw.json b/pkg/test/trace/testdata/traces/sw.json new file mode 100644 index 00000000..4848ee5d --- /dev/null +++ b/pkg/test/trace/testdata/traces/sw.json @@ -0,0 +1,43 @@ +{ + "metadata": { + "name": "sw", + "group": "default" + }, + "tags": [ + { + "name": "trace_id", + "type": "TAG_TYPE_STRING" + }, + { + "name": "state", + "type": "TAG_TYPE_INT" + }, + { + "name": "service_id", + "type": "TAG_TYPE_STRING" + }, + { + "name": "service_instance_id", + "type": "TAG_TYPE_STRING" + }, + { + "name": "endpoint_id", + "type": "TAG_TYPE_STRING" + }, + { + "name": "duration", + "type": "TAG_TYPE_INT" + }, + { + "name": "timestamp", + "type": "TAG_TYPE_TIMESTAMP" + }, + { + "name": "data_binary", + "type": "TAG_TYPE_DATA_BINARY" + } + ], + "trace_id_tag_name": "trace_id", + "timestamp_tag_name": "timestamp", + "updated_at": "2021-04-15T01:30:15.01Z" +} \ No newline at end of file