This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch remove-id in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
commit 96c657ed9bd64bcdb228f9831ce95fbdfa515e14 Author: Gao Hongtao <[email protected]> AuthorDate: Mon Jun 19 06:43:11 2023 +0000 Remove ID tag type Signed-off-by: Gao Hongtao <[email protected]> --- CHANGES.md | 1 + api/proto/banyandb/database/v1/schema.proto | 1 - api/proto/banyandb/model/v1/common.proto | 5 - banyand/measure/measure_topn.go | 6 +- banyand/measure/metadata.go | 2 +- banyand/metadata/schema/error.go | 4 - banyand/metadata/schema/measure.go | 115 +-------------------- banyand/query/processor_topn.go | 2 - bydbctl/internal/cmd/measure_test.go | 8 +- docs/api-reference.md | 18 ---- docs/concept/data-model.md | 2 +- docs/crud/measure/schema.md | 2 +- pkg/pb/v1/metadata.go | 2 - pkg/pb/v1/write.go | 2 - pkg/query/logical/expr_literal.go | 67 ------------ pkg/query/logical/index_filter.go | 9 -- pkg/query/logical/tag_filter.go | 2 - pkg/query/logical/testdata/measure_query_data.json | 6 +- .../logical/testdata/measure_search_data.json | 6 +- pkg/query/logical/testdata/measure_top_data.json | 12 +-- .../index_rule_bindings/service_cpm_day.json | 16 +++ .../index_rule_bindings/service_cpm_hour.json | 16 +++ .../index_rule_bindings/service_cpm_minute.json | 16 +++ .../service_instance_cpm_day.json | 16 +++ .../service_instance_cpm_hour.json | 16 +++ .../service_instance_cpm_minute.json | 16 +++ .../service_instance_endpoint_cpm_minute.json | 16 +++ pkg/test/measure/testdata/index_rules/id.json | 13 +++ .../measure/testdata/measures/service_cpm_day.json | 2 +- .../testdata/measures/service_cpm_hour.json | 2 +- .../testdata/measures/service_cpm_minute.json | 2 +- .../measures/service_instance_cpm_day.json | 2 +- .../measures/service_instance_cpm_hour.json | 2 +- .../measures/service_instance_cpm_minute.json | 2 +- .../service_instance_endpoint_cpm_minute.json | 2 +- .../measures/service_instance_traffic.json | 2 +- .../measure/testdata/measures/service_traffic.json | 2 +- test/cases/measure/data/input/linked_or.yaml | 6 +- .../data/testdata/service_cpm_minute_data.json | 12 +-- .../data/testdata/service_cpm_minute_data1.json | 12 +-- .../data/testdata/service_cpm_minute_data2.json | 4 +- .../testdata/service_instance_cpm_minute_data.json | 12 +-- .../service_instance_cpm_minute_data1.json | 12 +-- .../service_instance_cpm_minute_data2.json | 4 +- .../service_instance_endpoint_cpm_minute_data.json | 12 +-- ...service_instance_endpoint_cpm_minute_data1.json | 12 +-- ...service_instance_endpoint_cpm_minute_data2.json | 4 +- .../testdata/service_instance_traffic_data.json | 6 +- .../data/testdata/service_traffic_data.json | 6 +- test/cases/measure/data/want/all.yaml | 24 ++--- test/cases/measure/data/want/all_only_fields.yaml | 2 +- test/cases/measure/data/want/entity_in.yaml | 4 +- test/cases/measure/data/want/entity_service.yaml | 2 +- test/cases/measure/data/want/in.yaml | 4 +- test/cases/measure/data/want/linked_or.yaml | 4 +- test/cases/measure/data/want/no_field.yaml | 2 +- test/cases/measure/data/want/tag_filter.yaml | 2 +- test/cases/measure/data/want/update.yaml | 12 +-- test/integration/query/query_suite_test.go | 2 +- .../istio/testdata/measures/measure-default.yaml | 80 +++++++------- .../istio/testdata/measures/measure-minute.yaml | 40 +++---- ui/src/components/Read/index.vue | 2 +- ui/src/components/StreamEditor/tagEditor.vue | 2 +- 63 files changed, 302 insertions(+), 397 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7337f963..c510cb25 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,6 +22,7 @@ Release Notes. - Enhance the `liaison` module by implementing access logging. - Add the Istio scenario stress test based on the data generated by the integration access log. - Generalize the index's docID to uint64. +- Remove redundant ID tag type. ### Bugs diff --git a/api/proto/banyandb/database/v1/schema.proto b/api/proto/banyandb/database/v1/schema.proto index 604c7a0b..dc8812c6 100644 --- a/api/proto/banyandb/database/v1/schema.proto +++ b/api/proto/banyandb/database/v1/schema.proto @@ -34,7 +34,6 @@ enum TagType { TAG_TYPE_STRING_ARRAY = 3; TAG_TYPE_INT_ARRAY = 4; TAG_TYPE_DATA_BINARY = 5; - TAG_TYPE_ID = 6; } message TagFamilySpec { diff --git a/api/proto/banyandb/model/v1/common.proto b/api/proto/banyandb/model/v1/common.proto index 806eb0ac..f639c39b 100644 --- a/api/proto/banyandb/model/v1/common.proto +++ b/api/proto/banyandb/model/v1/common.proto @@ -24,10 +24,6 @@ import "google/protobuf/struct.proto"; option go_package = "github.com/apache/skywalking-banyandb/api/proto/banyandb/model/v1"; option java_package = "org.apache.skywalking.banyandb.model.v1"; -message ID { - string value = 1; -} - message Str { string value = 1; } @@ -56,7 +52,6 @@ message TagValue { Int int = 4; IntArray int_array = 5; bytes binary_data = 6; - ID id = 7; } } diff --git a/banyand/measure/measure_topn.go b/banyand/measure/measure_topn.go index 2fb5b00b..fe516512 100644 --- a/banyand/measure/measure_topn.go +++ b/banyand/measure/measure_topn.go @@ -190,8 +190,8 @@ func (t *topNStreamingProcessor) writeData(eventTime time.Time, timeBucket strin Tags: append([]*modelv1.TagValue{ // MeasureID { - Value: &modelv1.TagValue_Id{ - Id: &modelv1.ID{ + Value: &modelv1.TagValue_Str{ + Str: &modelv1.Str{ Value: measureID, }, }, @@ -484,8 +484,6 @@ func stringify(tagValue *modelv1.TagValue) string { switch v := tagValue.GetValue().(type) { case *modelv1.TagValue_Str: return v.Str.GetValue() - case *modelv1.TagValue_Id: - return v.Id.GetValue() case *modelv1.TagValue_Int: return strconv.FormatInt(v.Int.GetValue(), 10) case *modelv1.TagValue_BinaryData: diff --git a/banyand/measure/metadata.go b/banyand/measure/metadata.go index d12533e7..2a577b26 100644 --- a/banyand/measure/metadata.go +++ b/banyand/measure/metadata.go @@ -181,7 +181,7 @@ func createOrUpdateTopNMeasure(measureSchemaRegistry schema.Measure, topNSchema Tags: append([]*databasev1.TagSpec{ { Name: "measure_id", - Type: databasev1.TagType_TAG_TYPE_ID, + Type: databasev1.TagType_TAG_TYPE_STRING, }, }, seriesSpecs...), }, diff --git a/banyand/metadata/schema/error.go b/banyand/metadata/schema/error.go index f220c281..a5301de8 100644 --- a/banyand/metadata/schema/error.go +++ b/banyand/metadata/schema/error.go @@ -50,7 +50,3 @@ func BadRequest(field, desc string) error { st, _ := statusGRPCInvalidArgument.WithDetails(br) return st.Err() } - -func isNotFound(err error) bool { - return errors.Is(err, ErrGRPCResourceNotFound) -} diff --git a/banyand/metadata/schema/measure.go b/banyand/metadata/schema/measure.go index d545b11d..0f4e2f9f 100644 --- a/banyand/metadata/schema/measure.go +++ b/banyand/metadata/schema/measure.go @@ -19,7 +19,6 @@ package schema import ( "context" - "time" "github.com/pkg/errors" "google.golang.org/protobuf/proto" @@ -69,70 +68,14 @@ func (e *etcdSchemaRegistry) CreateMeasure(ctx context.Context, measure *databas return errors.Wrap(err, "interval is malformed") } } - if err := e.create(ctx, Metadata{ + return e.create(ctx, Metadata{ TypeMeta: TypeMeta{ Kind: KindMeasure, Group: measure.GetMetadata().GetGroup(), Name: measure.GetMetadata().GetName(), }, Spec: measure, - }); err != nil { - return err - } - - // Add an index rule for the ID type tag - idIndexRuleMetadata := &commonv1.Metadata{ - Name: tagTypeID, - Group: measure.Metadata.Group, - } - _, err := e.GetIndexRule(ctx, idIndexRuleMetadata) - if isNotFound(err) { - if errIndexRule := e.CreateIndexRule(ctx, &databasev1.IndexRule{ - Metadata: idIndexRuleMetadata, - Tags: []string{tagTypeID}, - Type: databasev1.IndexRule_TYPE_TREE, - Location: databasev1.IndexRule_LOCATION_SERIES, - UpdatedAt: timestamppb.Now(), - }); errIndexRule != nil { - return errIndexRule - } - } else if err != nil { - return err - } - for _, tfs := range measure.GetTagFamilies() { - for _, ts := range tfs.GetTags() { - if ts.Type == databasev1.TagType_TAG_TYPE_ID { - for _, e := range measure.GetEntity().GetTagNames() { - if ts.Name == e { - continue - } - } - irb := &databasev1.IndexRuleBinding{ - Metadata: &commonv1.Metadata{ - Name: tagTypeID + "_" + measure.Metadata.Name + "_" + ts.Name, - Group: measure.Metadata.Group, - }, - Rules: []string{tagTypeID}, - Subject: &databasev1.Subject{ - Catalog: commonv1.Catalog_CATALOG_MEASURE, - Name: measure.Metadata.Name, - }, - BeginAt: timestamppb.Now(), - ExpireAt: timestamppb.New(time.Now().AddDate(100, 0, 0)), - UpdatedAt: timestamppb.Now(), - } - _, innerErr := e.GetIndexRuleBinding(ctx, irb.GetMetadata()) - if innerErr == nil { - return e.UpdateIndexRuleBinding(ctx, irb) - } - if isNotFound(innerErr) { - return e.CreateIndexRuleBinding(ctx, irb) - } - return innerErr - } - } - } - return nil + }) } func (e *etcdSchemaRegistry) UpdateMeasure(ctx context.Context, measure *databasev1.Measure) error { @@ -141,64 +84,14 @@ func (e *etcdSchemaRegistry) UpdateMeasure(ctx context.Context, measure *databas return errors.Wrap(err, "interval is malformed") } } - if err := e.update(ctx, Metadata{ + return e.update(ctx, Metadata{ TypeMeta: TypeMeta{ Kind: KindMeasure, Group: measure.GetMetadata().GetGroup(), Name: measure.GetMetadata().GetName(), }, Spec: measure, - }); err != nil { - return err - } - - // Add an index rule for the ID type tag - idIndexRuleMetadata := &commonv1.Metadata{ - Name: tagTypeID, - Group: measure.Metadata.Group, - } - _, err := e.GetIndexRule(ctx, idIndexRuleMetadata) - if isNotFound(err) { - if errIndexRule := e.CreateIndexRule(ctx, &databasev1.IndexRule{ - Metadata: idIndexRuleMetadata, - Tags: []string{tagTypeID}, - Type: databasev1.IndexRule_TYPE_TREE, - Location: databasev1.IndexRule_LOCATION_SERIES, - UpdatedAt: timestamppb.Now(), - }); errIndexRule != nil { - return errIndexRule - } - } else if err != nil { - return err - } - for _, tfs := range measure.GetTagFamilies() { - for _, ts := range tfs.GetTags() { - if ts.Type == databasev1.TagType_TAG_TYPE_ID { - for _, e := range measure.Entity.TagNames { - if ts.Name == e { - continue - } - } - if errIndexRule := e.UpdateIndexRuleBinding(ctx, &databasev1.IndexRuleBinding{ - Metadata: &commonv1.Metadata{ - Name: tagTypeID + "_" + measure.Metadata.Name + "_" + ts.Name, - Group: measure.Metadata.Group, - }, - Rules: []string{tagTypeID}, - Subject: &databasev1.Subject{ - Catalog: commonv1.Catalog_CATALOG_MEASURE, - Name: measure.Metadata.Name, - }, - BeginAt: timestamppb.Now(), - ExpireAt: timestamppb.New(time.Now().AddDate(100, 0, 0)), - UpdatedAt: timestamppb.Now(), - }); errIndexRule != nil { - return errIndexRule - } - } - } - } - return nil + }) } func (e *etcdSchemaRegistry) DeleteMeasure(ctx context.Context, metadata *commonv1.Metadata) (bool, error) { diff --git a/banyand/query/processor_topn.go b/banyand/query/processor_topn.go index 336dc8e6..55939991 100644 --- a/banyand/query/processor_topn.go +++ b/banyand/query/processor_topn.go @@ -165,8 +165,6 @@ func locateEntity(topNSchema *databasev1.TopNAggregation, sortDirection modelv1. switch v := pairQuery.GetValue().GetValue().(type) { case *modelv1.TagValue_Str: entity[entityIdx] = []byte(v.Str.GetValue()) - case *modelv1.TagValue_Id: - entity[entityIdx] = []byte(v.Id.GetValue()) case *modelv1.TagValue_Int: entity[entityIdx] = convert.Int64ToBytes(v.Int.GetValue()) default: diff --git a/bydbctl/internal/cmd/measure_test.go b/bydbctl/internal/cmd/measure_test.go index fb24334e..d7fa44c9 100644 --- a/bydbctl/internal/cmd/measure_test.go +++ b/bydbctl/internal/cmd/measure_test.go @@ -85,9 +85,9 @@ tag_families: - name: default tags: - name: id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING entity: - tagNames: ["tag1"]`)) + tagNames: ["id"]`)) return capturer.CaptureStdout(func() { err := rootCmd.Execute() if err != nil { @@ -120,7 +120,7 @@ tag_families: - name: default tags: - name: id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING entity: tagNames: ["tag1"]`)) out := capturer.CaptureStdout(func() { @@ -165,7 +165,7 @@ tag_families: - name: default tags: - name: id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING entity: tagNames: ["tag1"]`)) out := capturer.CaptureStdout(func() { diff --git a/docs/api-reference.md b/docs/api-reference.md index 71ca74c4..e587be94 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -26,7 +26,6 @@ - [banyandb/model/v1/common.proto](#banyandb_model_v1_common-proto) - [FieldValue](#banyandb-model-v1-FieldValue) - [Float](#banyandb-model-v1-Float) - - [ID](#banyandb-model-v1-ID) - [Int](#banyandb-model-v1-Int) - [IntArray](#banyandb-model-v1-IntArray) - [Str](#banyandb-model-v1-Str) @@ -502,21 +501,6 @@ Metadata is for multi-tenant, multi-model use -<a name="banyandb-model-v1-ID"></a> - -### ID - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| value | [string](#string) | | | - - - - - - <a name="banyandb-model-v1-Int"></a> ### Int @@ -606,7 +590,6 @@ Metadata is for multi-tenant, multi-model use | int | [Int](#banyandb-model-v1-Int) | | | | int_array | [IntArray](#banyandb-model-v1-IntArray) | | | | binary_data | [bytes](#bytes) | | | -| id | [ID](#banyandb-model-v1-ID) | | | @@ -1147,7 +1130,6 @@ Type determine the index structure under the hood | TAG_TYPE_STRING_ARRAY | 3 | | | TAG_TYPE_INT_ARRAY | 4 | | | TAG_TYPE_DATA_BINARY | 5 | | -| TAG_TYPE_ID | 6 | | diff --git a/docs/concept/data-model.md b/docs/concept/data-model.md index f5652316..14481bc4 100644 --- a/docs/concept/data-model.md +++ b/docs/concept/data-model.md @@ -64,7 +64,7 @@ tag_families: - name: default tags: - name: id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - name: entity_id type: TAG_TYPE_STRING fields: diff --git a/docs/crud/measure/schema.md b/docs/crud/measure/schema.md index abefddf0..ec99547d 100644 --- a/docs/crud/measure/schema.md +++ b/docs/crud/measure/schema.md @@ -48,7 +48,7 @@ tag_families: - name: default tags: - name: id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - name: entity_id type: TAG_TYPE_STRING fields: diff --git a/pkg/pb/v1/metadata.go b/pkg/pb/v1/metadata.go index 8654d390..22382972 100644 --- a/pkg/pb/v1/metadata.go +++ b/pkg/pb/v1/metadata.go @@ -48,8 +48,6 @@ func tagValueTypeConv(tagValue *modelv1.TagValue) (tagType databasev1.TagType, i return databasev1.TagType_TAG_TYPE_STRING_ARRAY, false case *modelv1.TagValue_BinaryData: return databasev1.TagType_TAG_TYPE_DATA_BINARY, false - case *modelv1.TagValue_Id: - return databasev1.TagType_TAG_TYPE_ID, false case *modelv1.TagValue_Null: return databasev1.TagType_TAG_TYPE_UNSPECIFIED, true } diff --git a/pkg/pb/v1/write.go b/pkg/pb/v1/write.go index 5ff2bb09..97723650 100644 --- a/pkg/pb/v1/write.go +++ b/pkg/pb/v1/write.go @@ -149,8 +149,6 @@ func ParseTagValue(tagValue *modelv1.TagValue) (TagValue, error) { return *fv, nil case *modelv1.TagValue_BinaryData: return newValue(bytes.Clone(x.BinaryData)), nil - case *modelv1.TagValue_Id: - return newValue([]byte(x.Id.GetValue())), nil } return TagValue{}, errUnsupportedTagForIndexField } diff --git a/pkg/query/logical/expr_literal.go b/pkg/query/logical/expr_literal.go index b4ebb620..0a6b5fd9 100644 --- a/pkg/query/logical/expr_literal.go +++ b/pkg/query/logical/expr_literal.go @@ -296,73 +296,6 @@ func (s *strArrLiteral) String() string { return fmt.Sprintf("%v", s.arr) } -var _ LiteralExpr = (*idLiteral)(nil) - -type idLiteral struct { - string -} - -func (s *idLiteral) Bytes() [][]byte { - return [][]byte{[]byte(s.string)} -} - -func (s *idLiteral) Compare(other LiteralExpr) (int, bool) { - if o, ok := other.(*idLiteral); ok { - return strings.Compare(s.string, o.string), true - } - return 0, false -} - -func (s *idLiteral) Contains(other LiteralExpr) bool { - if o, ok := other.(*idLiteral); ok { - return s == o - } - if o, ok := other.(*strLiteral); ok { - return s.string == o.string - } - if o, ok := other.(*strArrLiteral); ok { - if len(o.arr) == 1 && o.arr[0] == s.string { - return true - } - } - return false -} - -func (s *idLiteral) BelongTo(other LiteralExpr) bool { - if o, ok := other.(*idLiteral); ok { - return s == o - } - if o, ok := other.(*strLiteral); ok { - return s.string == o.string - } - if o, ok := other.(*strArrLiteral); ok { - return slices.Contains(o.arr, s.string) - } - return false -} - -func (s *idLiteral) Equal(expr Expr) bool { - if other, ok := expr.(*idLiteral); ok { - return other.string == s.string - } - - return false -} - -func id(id string) LiteralExpr { - return &idLiteral{id} -} - -func (s *idLiteral) DataType() int32 { - return int32(databasev1.TagType_TAG_TYPE_ID) -} - -func (s *idLiteral) String() string { - return s.string -} - -var _ LiteralExpr = (*idLiteral)(nil) - type bytesLiteral struct { bb []byte } diff --git a/pkg/query/logical/index_filter.go b/pkg/query/logical/index_filter.go index cc83f7d8..85bf74ea 100644 --- a/pkg/query/logical/index_filter.go +++ b/pkg/query/logical/index_filter.go @@ -182,15 +182,6 @@ func parseExprOrEntity(entityDict map[string]int, entity tsdb.Entity, cond *mode return nil, []tsdb.Entity{parsedEntity}, nil } return str(v.Str.GetValue()), nil, nil - case *modelv1.TagValue_Id: - if ok { - parsedEntity := make(tsdb.Entity, len(entity)) - copy(parsedEntity, entity) - parsedEntity[entityIdx] = []byte(v.Id.GetValue()) - return nil, []tsdb.Entity{parsedEntity}, nil - } - return id(v.Id.GetValue()), nil, nil - case *modelv1.TagValue_StrArray: if ok && cond.Op == modelv1.Condition_BINARY_OP_IN { entities := make([]tsdb.Entity, len(v.StrArray.Value)) diff --git a/pkg/query/logical/tag_filter.go b/pkg/query/logical/tag_filter.go index 8e4fdce2..0936e110 100644 --- a/pkg/query/logical/tag_filter.go +++ b/pkg/query/logical/tag_filter.go @@ -166,8 +166,6 @@ func parseExpr(value *modelv1.TagValue) (ComparableExpr, error) { switch v := value.Value.(type) { case *modelv1.TagValue_Str: return &strLiteral{v.Str.GetValue()}, nil - case *modelv1.TagValue_Id: - return &idLiteral{v.Id.GetValue()}, nil case *modelv1.TagValue_StrArray: return &strArrLiteral{ arr: v.StrArray.GetValue(), diff --git a/pkg/query/logical/testdata/measure_query_data.json b/pkg/query/logical/testdata/measure_query_data.json index 2b40b25d..ee582d40 100644 --- a/pkg/query/logical/testdata/measure_query_data.json +++ b/pkg/query/logical/testdata/measure_query_data.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "1" } }, @@ -34,7 +34,7 @@ { "tags": [ { - "id": { + "str": { "value": "2" } }, @@ -64,7 +64,7 @@ { "tags": [ { - "id": { + "str": { "value": "3" } }, diff --git a/pkg/query/logical/testdata/measure_search_data.json b/pkg/query/logical/testdata/measure_search_data.json index 03fbafa0..bb3f98b3 100644 --- a/pkg/query/logical/testdata/measure_search_data.json +++ b/pkg/query/logical/testdata/measure_search_data.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "1" } }, @@ -37,7 +37,7 @@ { "tags": [ { - "id": { + "str": { "value": "2" } }, @@ -70,7 +70,7 @@ { "tags": [ { - "id": { + "str": { "value": "3" } }, diff --git a/pkg/query/logical/testdata/measure_top_data.json b/pkg/query/logical/testdata/measure_top_data.json index 877290c1..2af40a3f 100644 --- a/pkg/query/logical/testdata/measure_top_data.json +++ b/pkg/query/logical/testdata/measure_top_data.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "1" } }, @@ -34,7 +34,7 @@ { "tags": [ { - "id": { + "str": { "value": "4" } }, @@ -64,7 +64,7 @@ { "tags": [ { - "id": { + "str": { "value": "5" } }, @@ -94,7 +94,7 @@ { "tags": [ { - "id": { + "str": { "value": "6" } }, @@ -124,7 +124,7 @@ { "tags": [ { - "id": { + "str": { "value": "2" } }, @@ -154,7 +154,7 @@ { "tags": [ { - "id": { + "str": { "value": "3" } }, diff --git a/pkg/test/measure/testdata/index_rule_bindings/service_cpm_day.json b/pkg/test/measure/testdata/index_rule_bindings/service_cpm_day.json new file mode 100644 index 00000000..2115e3e1 --- /dev/null +++ b/pkg/test/measure/testdata/index_rule_bindings/service_cpm_day.json @@ -0,0 +1,16 @@ +{ + "metadata": { + "name": "service_cpm_day", + "group": "sw_metric" + }, + "rules": [ + "id" + ], + "subject":{ + "catalog": "CATALOG_MEASURE", + "name": "service_cpm_day" + }, + "begin_at": "2021-04-15T01:30:15.01Z", + "expire_at": "2121-04-15T01:30:15.01Z", + "updated_at": "2021-04-15T01:30:15.01Z" +} diff --git a/pkg/test/measure/testdata/index_rule_bindings/service_cpm_hour.json b/pkg/test/measure/testdata/index_rule_bindings/service_cpm_hour.json new file mode 100644 index 00000000..6c5ae362 --- /dev/null +++ b/pkg/test/measure/testdata/index_rule_bindings/service_cpm_hour.json @@ -0,0 +1,16 @@ +{ + "metadata": { + "name": "service_cpm_hour", + "group": "sw_metric" + }, + "rules": [ + "id" + ], + "subject":{ + "catalog": "CATALOG_MEASURE", + "name": "service_cpm_hour" + }, + "begin_at": "2021-04-15T01:30:15.01Z", + "expire_at": "2121-04-15T01:30:15.01Z", + "updated_at": "2021-04-15T01:30:15.01Z" +} diff --git a/pkg/test/measure/testdata/index_rule_bindings/service_cpm_minute.json b/pkg/test/measure/testdata/index_rule_bindings/service_cpm_minute.json new file mode 100644 index 00000000..ad560c86 --- /dev/null +++ b/pkg/test/measure/testdata/index_rule_bindings/service_cpm_minute.json @@ -0,0 +1,16 @@ +{ + "metadata": { + "name": "service_cpm_minute", + "group": "sw_metric" + }, + "rules": [ + "id" + ], + "subject":{ + "catalog": "CATALOG_MEASURE", + "name": "service_cpm_minute" + }, + "begin_at": "2021-04-15T01:30:15.01Z", + "expire_at": "2121-04-15T01:30:15.01Z", + "updated_at": "2021-04-15T01:30:15.01Z" +} diff --git a/pkg/test/measure/testdata/index_rule_bindings/service_instance_cpm_day.json b/pkg/test/measure/testdata/index_rule_bindings/service_instance_cpm_day.json new file mode 100644 index 00000000..4fb9123e --- /dev/null +++ b/pkg/test/measure/testdata/index_rule_bindings/service_instance_cpm_day.json @@ -0,0 +1,16 @@ +{ + "metadata": { + "name": "service_instance_cpm_day", + "group": "sw_metric" + }, + "rules": [ + "id" + ], + "subject":{ + "catalog": "CATALOG_MEASURE", + "name": "service_instance_cpm_day" + }, + "begin_at": "2021-04-15T01:30:15.01Z", + "expire_at": "2121-04-15T01:30:15.01Z", + "updated_at": "2021-04-15T01:30:15.01Z" +} diff --git a/pkg/test/measure/testdata/index_rule_bindings/service_instance_cpm_hour.json b/pkg/test/measure/testdata/index_rule_bindings/service_instance_cpm_hour.json new file mode 100644 index 00000000..b9b40c3f --- /dev/null +++ b/pkg/test/measure/testdata/index_rule_bindings/service_instance_cpm_hour.json @@ -0,0 +1,16 @@ +{ + "metadata": { + "name": "service_instance_cpm_hour", + "group": "sw_metric" + }, + "rules": [ + "id" + ], + "subject":{ + "catalog": "CATALOG_MEASURE", + "name": "service_instance_cpm_hour" + }, + "begin_at": "2021-04-15T01:30:15.01Z", + "expire_at": "2121-04-15T01:30:15.01Z", + "updated_at": "2021-04-15T01:30:15.01Z" +} diff --git a/pkg/test/measure/testdata/index_rule_bindings/service_instance_cpm_minute.json b/pkg/test/measure/testdata/index_rule_bindings/service_instance_cpm_minute.json new file mode 100644 index 00000000..8aa4f237 --- /dev/null +++ b/pkg/test/measure/testdata/index_rule_bindings/service_instance_cpm_minute.json @@ -0,0 +1,16 @@ +{ + "metadata": { + "name": "service_instance_cpm_minute", + "group": "sw_metric" + }, + "rules": [ + "id" + ], + "subject":{ + "catalog": "CATALOG_MEASURE", + "name": "service_instance_cpm_minute" + }, + "begin_at": "2021-04-15T01:30:15.01Z", + "expire_at": "2121-04-15T01:30:15.01Z", + "updated_at": "2021-04-15T01:30:15.01Z" +} diff --git a/pkg/test/measure/testdata/index_rule_bindings/service_instance_endpoint_cpm_minute.json b/pkg/test/measure/testdata/index_rule_bindings/service_instance_endpoint_cpm_minute.json new file mode 100644 index 00000000..54ff83e5 --- /dev/null +++ b/pkg/test/measure/testdata/index_rule_bindings/service_instance_endpoint_cpm_minute.json @@ -0,0 +1,16 @@ +{ + "metadata": { + "name": "service_instance_endpoint_cpm_minute", + "group": "sw_metric" + }, + "rules": [ + "id" + ], + "subject":{ + "catalog": "CATALOG_MEASURE", + "name": "service_instance_endpoint_cpm_minute" + }, + "begin_at": "2021-04-15T01:30:15.01Z", + "expire_at": "2121-04-15T01:30:15.01Z", + "updated_at": "2021-04-15T01:30:15.01Z" +} diff --git a/pkg/test/measure/testdata/index_rules/id.json b/pkg/test/measure/testdata/index_rules/id.json new file mode 100644 index 00000000..676b5aa1 --- /dev/null +++ b/pkg/test/measure/testdata/index_rules/id.json @@ -0,0 +1,13 @@ +{ + "metadata": { + "id": 4, + "name": "id", + "group": "sw_metric" + }, + "tags": [ + "id" + ], + "type": "TYPE_INVERTED", + "location": "LOCATION_SERIES", + "updated_at": "2021-04-15T01:30:15.01Z" +} diff --git a/pkg/test/measure/testdata/measures/service_cpm_day.json b/pkg/test/measure/testdata/measures/service_cpm_day.json index 859374ed..1f3f8209 100644 --- a/pkg/test/measure/testdata/measures/service_cpm_day.json +++ b/pkg/test/measure/testdata/measures/service_cpm_day.json @@ -9,7 +9,7 @@ "tags": [ { "name": "id", - "type": "TAG_TYPE_ID" + "type": "TAG_TYPE_STRING" }, { "name": "entity_id", diff --git a/pkg/test/measure/testdata/measures/service_cpm_hour.json b/pkg/test/measure/testdata/measures/service_cpm_hour.json index 44f4e312..5e506ddf 100644 --- a/pkg/test/measure/testdata/measures/service_cpm_hour.json +++ b/pkg/test/measure/testdata/measures/service_cpm_hour.json @@ -9,7 +9,7 @@ "tags": [ { "name": "id", - "type": "TAG_TYPE_ID" + "type": "TAG_TYPE_STRING" }, { "name": "entity_id", diff --git a/pkg/test/measure/testdata/measures/service_cpm_minute.json b/pkg/test/measure/testdata/measures/service_cpm_minute.json index 27752e32..9ca254a1 100644 --- a/pkg/test/measure/testdata/measures/service_cpm_minute.json +++ b/pkg/test/measure/testdata/measures/service_cpm_minute.json @@ -9,7 +9,7 @@ "tags": [ { "name": "id", - "type": "TAG_TYPE_ID" + "type": "TAG_TYPE_STRING" }, { "name": "entity_id", diff --git a/pkg/test/measure/testdata/measures/service_instance_cpm_day.json b/pkg/test/measure/testdata/measures/service_instance_cpm_day.json index 36d17cec..f93380a3 100644 --- a/pkg/test/measure/testdata/measures/service_instance_cpm_day.json +++ b/pkg/test/measure/testdata/measures/service_instance_cpm_day.json @@ -9,7 +9,7 @@ "tags": [ { "name": "id", - "type": "TAG_TYPE_ID" + "type": "TAG_TYPE_STRING" }, { "name": "entity_id", diff --git a/pkg/test/measure/testdata/measures/service_instance_cpm_hour.json b/pkg/test/measure/testdata/measures/service_instance_cpm_hour.json index eceacfdd..753d0a95 100644 --- a/pkg/test/measure/testdata/measures/service_instance_cpm_hour.json +++ b/pkg/test/measure/testdata/measures/service_instance_cpm_hour.json @@ -9,7 +9,7 @@ "tags": [ { "name": "id", - "type": "TAG_TYPE_ID" + "type": "TAG_TYPE_STRING" }, { "name": "entity_id", diff --git a/pkg/test/measure/testdata/measures/service_instance_cpm_minute.json b/pkg/test/measure/testdata/measures/service_instance_cpm_minute.json index c9ccf598..e1482f9e 100644 --- a/pkg/test/measure/testdata/measures/service_instance_cpm_minute.json +++ b/pkg/test/measure/testdata/measures/service_instance_cpm_minute.json @@ -9,7 +9,7 @@ "tags": [ { "name": "id", - "type": "TAG_TYPE_ID" + "type": "TAG_TYPE_STRING" }, { "name": "entity_id", diff --git a/pkg/test/measure/testdata/measures/service_instance_endpoint_cpm_minute.json b/pkg/test/measure/testdata/measures/service_instance_endpoint_cpm_minute.json index 47241abc..fa4a34f4 100644 --- a/pkg/test/measure/testdata/measures/service_instance_endpoint_cpm_minute.json +++ b/pkg/test/measure/testdata/measures/service_instance_endpoint_cpm_minute.json @@ -9,7 +9,7 @@ "tags": [ { "name": "id", - "type": "TAG_TYPE_ID" + "type": "TAG_TYPE_STRING" }, { "name": "entity_id", diff --git a/pkg/test/measure/testdata/measures/service_instance_traffic.json b/pkg/test/measure/testdata/measures/service_instance_traffic.json index 85fc4826..1b896117 100644 --- a/pkg/test/measure/testdata/measures/service_instance_traffic.json +++ b/pkg/test/measure/testdata/measures/service_instance_traffic.json @@ -9,7 +9,7 @@ "tags": [ { "name": "id", - "type": "TAG_TYPE_ID" + "type": "TAG_TYPE_STRING" }, { "name": "service_id", diff --git a/pkg/test/measure/testdata/measures/service_traffic.json b/pkg/test/measure/testdata/measures/service_traffic.json index 72b0fdbc..7edc682c 100644 --- a/pkg/test/measure/testdata/measures/service_traffic.json +++ b/pkg/test/measure/testdata/measures/service_traffic.json @@ -9,7 +9,7 @@ "tags": [ { "name": "id", - "type": "TAG_TYPE_ID" + "type": "TAG_TYPE_STRING" }, { "name": "service_id", diff --git a/test/cases/measure/data/input/linked_or.yaml b/test/cases/measure/data/input/linked_or.yaml index 5481bcfb..6d0b3b4e 100644 --- a/test/cases/measure/data/input/linked_or.yaml +++ b/test/cases/measure/data/input/linked_or.yaml @@ -32,7 +32,7 @@ criteria: name: "id" op: "BINARY_OP_EQ" value: - id: + str: value: "4" right: le: @@ -42,7 +42,7 @@ criteria: name: "id" op: "BINARY_OP_EQ" value: - id: + str: value: "5" right: le: @@ -52,5 +52,5 @@ criteria: name: "id" op: "BINARY_OP_EQ" value: - id: + str: value: "unknown" diff --git a/test/cases/measure/data/testdata/service_cpm_minute_data.json b/test/cases/measure/data/testdata/service_cpm_minute_data.json index c2dfa531..82d4203d 100644 --- a/test/cases/measure/data/testdata/service_cpm_minute_data.json +++ b/test/cases/measure/data/testdata/service_cpm_minute_data.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "1" } }, @@ -34,7 +34,7 @@ { "tags": [ { - "id": { + "str": { "value": "4" } }, @@ -64,7 +64,7 @@ { "tags": [ { - "id": { + "str": { "value": "5" } }, @@ -94,7 +94,7 @@ { "tags": [ { - "id": { + "str": { "value": "6" } }, @@ -124,7 +124,7 @@ { "tags": [ { - "id": { + "str": { "value": "2" } }, @@ -154,7 +154,7 @@ { "tags": [ { - "id": { + "str": { "value": "3" } }, diff --git a/test/cases/measure/data/testdata/service_cpm_minute_data1.json b/test/cases/measure/data/testdata/service_cpm_minute_data1.json index 2ee3ecff..7ba3cd2b 100644 --- a/test/cases/measure/data/testdata/service_cpm_minute_data1.json +++ b/test/cases/measure/data/testdata/service_cpm_minute_data1.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "7" } }, @@ -34,7 +34,7 @@ { "tags": [ { - "id": { + "str": { "value": "8" } }, @@ -64,7 +64,7 @@ { "tags": [ { - "id": { + "str": { "value": "9" } }, @@ -94,7 +94,7 @@ { "tags": [ { - "id": { + "str": { "value": "10" } }, @@ -124,7 +124,7 @@ { "tags": [ { - "id": { + "str": { "value": "11" } }, @@ -154,7 +154,7 @@ { "tags": [ { - "id": { + "str": { "value": "12" } }, diff --git a/test/cases/measure/data/testdata/service_cpm_minute_data2.json b/test/cases/measure/data/testdata/service_cpm_minute_data2.json index 7e36417a..94dcf8ec 100644 --- a/test/cases/measure/data/testdata/service_cpm_minute_data2.json +++ b/test/cases/measure/data/testdata/service_cpm_minute_data2.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "100" } }, @@ -34,7 +34,7 @@ { "tags": [ { - "id": { + "str": { "value": "110" } }, diff --git a/test/cases/measure/data/testdata/service_instance_cpm_minute_data.json b/test/cases/measure/data/testdata/service_instance_cpm_minute_data.json index b67eef16..c1d247f4 100644 --- a/test/cases/measure/data/testdata/service_instance_cpm_minute_data.json +++ b/test/cases/measure/data/testdata/service_instance_cpm_minute_data.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "1" } }, @@ -39,7 +39,7 @@ { "tags": [ { - "id": { + "str": { "value": "4" } }, @@ -74,7 +74,7 @@ { "tags": [ { - "id": { + "str": { "value": "5" } }, @@ -109,7 +109,7 @@ { "tags": [ { - "id": { + "str": { "value": "6" } }, @@ -144,7 +144,7 @@ { "tags": [ { - "id": { + "str": { "value": "2" } }, @@ -179,7 +179,7 @@ { "tags": [ { - "id": { + "str": { "value": "3" } }, diff --git a/test/cases/measure/data/testdata/service_instance_cpm_minute_data1.json b/test/cases/measure/data/testdata/service_instance_cpm_minute_data1.json index 93b8b834..0f28f871 100644 --- a/test/cases/measure/data/testdata/service_instance_cpm_minute_data1.json +++ b/test/cases/measure/data/testdata/service_instance_cpm_minute_data1.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "7" } }, @@ -39,7 +39,7 @@ { "tags": [ { - "id": { + "str": { "value": "8" } }, @@ -74,7 +74,7 @@ { "tags": [ { - "id": { + "str": { "value": "9" } }, @@ -109,7 +109,7 @@ { "tags": [ { - "id": { + "str": { "value": "10" } }, @@ -144,7 +144,7 @@ { "tags": [ { - "id": { + "str": { "value": "11" } }, @@ -179,7 +179,7 @@ { "tags": [ { - "id": { + "str": { "value": "12" } }, diff --git a/test/cases/measure/data/testdata/service_instance_cpm_minute_data2.json b/test/cases/measure/data/testdata/service_instance_cpm_minute_data2.json index e98f1412..bd64763d 100644 --- a/test/cases/measure/data/testdata/service_instance_cpm_minute_data2.json +++ b/test/cases/measure/data/testdata/service_instance_cpm_minute_data2.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "100" } }, @@ -39,7 +39,7 @@ { "tags": [ { - "id": { + "str": { "value": "110" } }, diff --git a/test/cases/measure/data/testdata/service_instance_endpoint_cpm_minute_data.json b/test/cases/measure/data/testdata/service_instance_endpoint_cpm_minute_data.json index c5817343..86b99575 100644 --- a/test/cases/measure/data/testdata/service_instance_endpoint_cpm_minute_data.json +++ b/test/cases/measure/data/testdata/service_instance_endpoint_cpm_minute_data.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "1" } }, @@ -44,7 +44,7 @@ { "tags": [ { - "id": { + "str": { "value": "4" } }, @@ -84,7 +84,7 @@ { "tags": [ { - "id": { + "str": { "value": "5" } }, @@ -119,7 +119,7 @@ { "tags": [ { - "id": { + "str": { "value": "6" } }, @@ -154,7 +154,7 @@ { "tags": [ { - "id": { + "str": { "value": "2" } }, @@ -192,7 +192,7 @@ { "tags": [ { - "id": { + "str": { "value": "3" } }, diff --git a/test/cases/measure/data/testdata/service_instance_endpoint_cpm_minute_data1.json b/test/cases/measure/data/testdata/service_instance_endpoint_cpm_minute_data1.json index d1313b86..f4f6a118 100644 --- a/test/cases/measure/data/testdata/service_instance_endpoint_cpm_minute_data1.json +++ b/test/cases/measure/data/testdata/service_instance_endpoint_cpm_minute_data1.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "7" } }, @@ -42,7 +42,7 @@ { "tags": [ { - "id": { + "str": { "value": "8" } }, @@ -82,7 +82,7 @@ { "tags": [ { - "id": { + "str": { "value": "9" } }, @@ -122,7 +122,7 @@ { "tags": [ { - "id": { + "str": { "value": "10" } }, @@ -157,7 +157,7 @@ { "tags": [ { - "id": { + "str": { "value": "11" } }, @@ -192,7 +192,7 @@ { "tags": [ { - "id": { + "str": { "value": "12" } }, diff --git a/test/cases/measure/data/testdata/service_instance_endpoint_cpm_minute_data2.json b/test/cases/measure/data/testdata/service_instance_endpoint_cpm_minute_data2.json index 170f45d6..59a94d56 100644 --- a/test/cases/measure/data/testdata/service_instance_endpoint_cpm_minute_data2.json +++ b/test/cases/measure/data/testdata/service_instance_endpoint_cpm_minute_data2.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "100" } }, @@ -44,7 +44,7 @@ { "tags": [ { - "id": { + "str": { "value": "110" } }, diff --git a/test/cases/measure/data/testdata/service_instance_traffic_data.json b/test/cases/measure/data/testdata/service_instance_traffic_data.json index 03fbafa0..bb3f98b3 100644 --- a/test/cases/measure/data/testdata/service_instance_traffic_data.json +++ b/test/cases/measure/data/testdata/service_instance_traffic_data.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "1" } }, @@ -37,7 +37,7 @@ { "tags": [ { - "id": { + "str": { "value": "2" } }, @@ -70,7 +70,7 @@ { "tags": [ { - "id": { + "str": { "value": "3" } }, diff --git a/test/cases/measure/data/testdata/service_traffic_data.json b/test/cases/measure/data/testdata/service_traffic_data.json index f9fee42e..e8c12fdc 100644 --- a/test/cases/measure/data/testdata/service_traffic_data.json +++ b/test/cases/measure/data/testdata/service_traffic_data.json @@ -4,7 +4,7 @@ { "tags": [ { - "id": { + "str": { "value": "1" } }, @@ -42,7 +42,7 @@ { "tags": [ { - "id": { + "str": { "value": "2" } }, @@ -80,7 +80,7 @@ { "tags": [ { - "id": { + "str": { "value": "3" } }, diff --git a/test/cases/measure/data/want/all.yaml b/test/cases/measure/data/want/all.yaml index 5d412132..1e9612e1 100644 --- a/test/cases/measure/data/want/all.yaml +++ b/test/cases/measure/data/want/all.yaml @@ -30,7 +30,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "1" - key: entity_id value: @@ -51,7 +51,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "7" - key: entity_id value: @@ -72,7 +72,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "4" - key: entity_id value: @@ -93,7 +93,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "8" - key: entity_id value: @@ -114,7 +114,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "5" - key: entity_id value: @@ -135,7 +135,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "9" - key: entity_id value: @@ -156,7 +156,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "6" - key: entity_id value: @@ -177,7 +177,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "10" - key: entity_id value: @@ -198,7 +198,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "2" - key: entity_id value: @@ -219,7 +219,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "11" - key: entity_id value: @@ -240,7 +240,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "3" - key: entity_id value: @@ -261,7 +261,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "12" - key: entity_id value: diff --git a/test/cases/measure/data/want/all_only_fields.yaml b/test/cases/measure/data/want/all_only_fields.yaml index 9e23c737..4c18f1ce 100644 --- a/test/cases/measure/data/want/all_only_fields.yaml +++ b/test/cases/measure/data/want/all_only_fields.yaml @@ -102,7 +102,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "2" - key: entity_id value: diff --git a/test/cases/measure/data/want/entity_in.yaml b/test/cases/measure/data/want/entity_in.yaml index 5719b1ea..6c269eb0 100644 --- a/test/cases/measure/data/want/entity_in.yaml +++ b/test/cases/measure/data/want/entity_in.yaml @@ -21,7 +21,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "1" - key: service_id value: @@ -32,7 +32,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "2" - key: service_id value: diff --git a/test/cases/measure/data/want/entity_service.yaml b/test/cases/measure/data/want/entity_service.yaml index 7876c406..58825ddc 100644 --- a/test/cases/measure/data/want/entity_service.yaml +++ b/test/cases/measure/data/want/entity_service.yaml @@ -21,7 +21,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "1" - key: service_id value: diff --git a/test/cases/measure/data/want/in.yaml b/test/cases/measure/data/want/in.yaml index 785dba9f..cc339b74 100644 --- a/test/cases/measure/data/want/in.yaml +++ b/test/cases/measure/data/want/in.yaml @@ -30,7 +30,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "4" - key: entity_id value: @@ -51,7 +51,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "5" - key: entity_id value: diff --git a/test/cases/measure/data/want/linked_or.yaml b/test/cases/measure/data/want/linked_or.yaml index 785dba9f..cc339b74 100644 --- a/test/cases/measure/data/want/linked_or.yaml +++ b/test/cases/measure/data/want/linked_or.yaml @@ -30,7 +30,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "4" - key: entity_id value: @@ -51,7 +51,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "5" - key: entity_id value: diff --git a/test/cases/measure/data/want/no_field.yaml b/test/cases/measure/data/want/no_field.yaml index 7876c406..58825ddc 100644 --- a/test/cases/measure/data/want/no_field.yaml +++ b/test/cases/measure/data/want/no_field.yaml @@ -21,7 +21,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "1" - key: service_id value: diff --git a/test/cases/measure/data/want/tag_filter.yaml b/test/cases/measure/data/want/tag_filter.yaml index 327a2f34..a588ad4a 100644 --- a/test/cases/measure/data/want/tag_filter.yaml +++ b/test/cases/measure/data/want/tag_filter.yaml @@ -30,5 +30,5 @@ dataPoints: tags: - key: id value: - id: + str: value: "1" \ No newline at end of file diff --git a/test/cases/measure/data/want/update.yaml b/test/cases/measure/data/want/update.yaml index ad8908da..ee0f55d1 100644 --- a/test/cases/measure/data/want/update.yaml +++ b/test/cases/measure/data/want/update.yaml @@ -30,7 +30,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "1" - key: entity_id value: @@ -50,7 +50,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "4" - key: entity_id value: @@ -70,7 +70,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "5" - key: entity_id value: @@ -90,7 +90,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "6" - key: entity_id value: @@ -110,7 +110,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "2" - key: entity_id value: @@ -130,7 +130,7 @@ dataPoints: tags: - key: id value: - id: + str: value: "3" - key: entity_id value: diff --git a/test/integration/query/query_suite_test.go b/test/integration/query/query_suite_test.go index 762b9889..d8521ccf 100644 --- a/test/integration/query/query_suite_test.go +++ b/test/integration/query/query_suite_test.go @@ -56,7 +56,7 @@ var _ = SynchronizedBeforeSuite(func() []byte { goods = gleak.Goroutines() Expect(logger.Init(logger.Logging{ Env: "dev", - Level: flags.LogLevel, + Level: "info", })).To(Succeed()) var addr string addr, _, deferFunc = setup.Common() diff --git a/test/stress/cases/istio/testdata/measures/measure-default.yaml b/test/stress/cases/istio/testdata/measures/measure-default.yaml index 61a280f6..7d8cf87d 100644 --- a/test/stress/cases/istio/testdata/measures/measure-default.yaml +++ b/test/stress/cases/istio/testdata/measures/measure-default.yaml @@ -5063,7 +5063,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -5121,7 +5121,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -5179,7 +5179,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -5237,7 +5237,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -5295,7 +5295,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -5353,7 +5353,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -5605,7 +5605,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -5663,7 +5663,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -5791,7 +5791,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -5849,7 +5849,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -5977,7 +5977,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -6035,7 +6035,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -6217,7 +6217,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -6275,7 +6275,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -6457,7 +6457,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -6515,7 +6515,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -6573,7 +6573,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -6631,7 +6631,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -6743,7 +6743,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -6801,7 +6801,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -6859,7 +6859,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -6917,7 +6917,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -6975,7 +6975,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -7033,7 +7033,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -7091,7 +7091,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -7149,7 +7149,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -7207,7 +7207,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -7265,7 +7265,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -11018,7 +11018,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -11074,7 +11074,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -11134,7 +11134,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -11194,7 +11194,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -11610,7 +11610,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -11670,7 +11670,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -11730,7 +11730,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -11790,7 +11790,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -11850,7 +11850,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -11910,7 +11910,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -11969,7 +11969,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -12028,7 +12028,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING diff --git a/test/stress/cases/istio/testdata/measures/measure-minute.yaml b/test/stress/cases/istio/testdata/measures/measure-minute.yaml index 52b59000..ff0f8ac1 100644 --- a/test/stress/cases/istio/testdata/measures/measure-minute.yaml +++ b/test/stress/cases/istio/testdata/measures/measure-minute.yaml @@ -2557,7 +2557,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -2615,7 +2615,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -2673,7 +2673,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -2828,7 +2828,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -2921,7 +2921,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -3014,7 +3014,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -3134,7 +3134,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -3254,7 +3254,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -3312,7 +3312,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -3397,7 +3397,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -3455,7 +3455,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -3513,7 +3513,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -3571,7 +3571,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -3629,7 +3629,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: entity_id type: TAG_TYPE_STRING @@ -5516,7 +5516,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -5576,7 +5576,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -5814,7 +5814,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -5874,7 +5874,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -5934,7 +5934,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING @@ -5993,7 +5993,7 @@ tags: - indexedOnly: false name: measure_id - type: TAG_TYPE_ID + type: TAG_TYPE_STRING - indexedOnly: false name: service_id type: TAG_TYPE_STRING diff --git a/ui/src/components/Read/index.vue b/ui/src/components/Read/index.vue index f63240e7..c9b2c6c5 100644 --- a/ui/src/components/Read/index.vue +++ b/ui/src/components/Read/index.vue @@ -44,7 +44,7 @@ const tagType = { 'TAG_TYPE_STRING_ARRAY': 'strArray', 'TAG_TYPE_INT_ARRAY': 'intArray', 'TAG_TYPE_DATA_BINARY': 'binaryData', - 'TAG_TYPE_ID': 'id' + 'TAG_TYPE_STRING': 'id' } const fieldTypes = { 'FIELD_TYPE_UNSPECIFIED': 'null', diff --git a/ui/src/components/StreamEditor/tagEditor.vue b/ui/src/components/StreamEditor/tagEditor.vue index e5eb9c07..2a65c8fc 100644 --- a/ui/src/components/StreamEditor/tagEditor.vue +++ b/ui/src/components/StreamEditor/tagEditor.vue @@ -74,7 +74,7 @@ const typeOptions = [ label: 'DATA_BINARY' }, { - value: 'TAG_TYPE_ID', + value: 'TAG_TYPE_STRING', label: 'ID' }, {
