diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a143c64f7e..81a3306c646 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## main / unreleased +* [FEATURE] TraceQL metrics queries [#3227](https://github.com/grafana/tempo/pull/3227) (@mdisibio @zalegrala) * [FEATURE] Add support for multi-tenant queries. [#3087](https://github.com/grafana/tempo/pull/3087) (@electron0zero) * [BUGFIX] Change exit code if config is successfully verified [#3174](https://github.com/grafana/tempo/pull/3174) (@am3o @agrib-01) * [BUGFIX] The tempo-cli analyse blocks command no longer fails on compacted blocks [#3183](https://github.com/grafana/tempo/pull/3183) (@stoewer) diff --git a/cmd/tempo-serverless/cloud-run/go.mod b/cmd/tempo-serverless/cloud-run/go.mod index 48f17eaec88..0e522ea54e8 100644 --- a/cmd/tempo-serverless/cloud-run/go.mod +++ b/cmd/tempo-serverless/cloud-run/go.mod @@ -64,6 +64,7 @@ require ( github.com/gorilla/mux v1.8.1 // indirect github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f // indirect github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 // indirect + github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -75,7 +76,7 @@ require ( github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/magiconair/properties v1.8.7 // indirect - github.com/mattn/go-ieproxy v0.0.9 // indirect + github.com/mattn/go-ieproxy v0.0.11 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/miekg/dns v1.1.55 // indirect @@ -103,7 +104,7 @@ require ( github.com/prometheus/common v0.45.0 // indirect github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3 // indirect + github.com/prometheus/prometheus v0.47.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rs/xid v1.5.0 // indirect github.com/segmentio/encoding v0.3.6 // indirect @@ -133,6 +134,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/crypto v0.15.0 // indirect + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.18.0 // indirect golang.org/x/oauth2 v0.14.0 // indirect diff --git a/cmd/tempo-serverless/cloud-run/go.sum b/cmd/tempo-serverless/cloud-run/go.sum index eefcc119386..4b200b51743 100644 --- a/cmd/tempo-serverless/cloud-run/go.sum +++ b/cmd/tempo-serverless/cloud-run/go.sum @@ -270,6 +270,8 @@ github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f h1:gyojr97YeWZ70pKNa github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f/go.mod h1:8dsy5tQOkeNQyjXpm5mQsbCu3H5uzeBD35MzRQFznKU= github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 h1:/of8Z8taCPftShATouOrBVy6GaTTjgQd/VfNiZp/VXQ= github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586/go.mod h1:PGk3RjYHpxMM8HFPhKKo+vve3DdlPUELZLSDEFehPuU= +github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db h1:7aN5cccjIqCLTzedH7MZzRZt5/lsAHch6Z3L2ZGn5FA= +github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= @@ -325,8 +327,8 @@ github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3v github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= -github.com/mattn/go-ieproxy v0.0.9 h1:RvVbLiMv/Hbjf1gRaC2AQyzwbdVhdId7D2vPnXIml4k= -github.com/mattn/go-ieproxy v0.0.9/go.mod h1:eF30/rfdQUO9EnzNIZQr0r9HiLMlZNCpJkHbmMuOAE0= +github.com/mattn/go-ieproxy v0.0.11 h1:MQ/5BuGSgDAHZOJe6YY80IF2UVCfGkwfo6AeD7HtHYo= +github.com/mattn/go-ieproxy v0.0.11/go.mod h1:/NsJd+kxZBmjMc5hrJCKMbP57B84rvq9BiDRbtO9AS0= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -402,8 +404,8 @@ github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 h1: github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97/go.mod h1:LoBCZeRh+5hX+fSULNyFnagYlQG/gBsyA/deNzROkq8= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3 h1:etRZv4bJf9YAuyPWbyFufjkijfeoPSmyA5xNcd4DoyI= -github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3/go.mod h1:plwr4+63Q1xL8oIdBDeU854um7Cct0Av8dhP44lutMw= +github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= +github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= @@ -528,6 +530,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -591,7 +595,6 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220630215102-69896b714898/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= @@ -661,7 +664,6 @@ golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/cmd/tempo-serverless/lambda/go.mod b/cmd/tempo-serverless/lambda/go.mod index ded77001e69..523c2f5b2fd 100644 --- a/cmd/tempo-serverless/lambda/go.mod +++ b/cmd/tempo-serverless/lambda/go.mod @@ -67,6 +67,7 @@ require ( github.com/gorilla/mux v1.8.1 // indirect github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f // indirect github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 // indirect + github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -78,7 +79,7 @@ require ( github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/magiconair/properties v1.8.7 // indirect - github.com/mattn/go-ieproxy v0.0.9 // indirect + github.com/mattn/go-ieproxy v0.0.11 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/miekg/dns v1.1.55 // indirect @@ -107,7 +108,7 @@ require ( github.com/prometheus/common v0.45.0 // indirect github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3 // indirect + github.com/prometheus/prometheus v0.47.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rs/xid v1.5.0 // indirect github.com/segmentio/encoding v0.3.6 // indirect @@ -137,6 +138,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/crypto v0.15.0 // indirect + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.18.0 // indirect golang.org/x/oauth2 v0.14.0 // indirect diff --git a/cmd/tempo-serverless/lambda/go.sum b/cmd/tempo-serverless/lambda/go.sum index f128ee32f95..33e8097d0d8 100644 --- a/cmd/tempo-serverless/lambda/go.sum +++ b/cmd/tempo-serverless/lambda/go.sum @@ -274,6 +274,8 @@ github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f h1:gyojr97YeWZ70pKNa github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f/go.mod h1:8dsy5tQOkeNQyjXpm5mQsbCu3H5uzeBD35MzRQFznKU= github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 h1:/of8Z8taCPftShATouOrBVy6GaTTjgQd/VfNiZp/VXQ= github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586/go.mod h1:PGk3RjYHpxMM8HFPhKKo+vve3DdlPUELZLSDEFehPuU= +github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db h1:7aN5cccjIqCLTzedH7MZzRZt5/lsAHch6Z3L2ZGn5FA= +github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= @@ -329,8 +331,8 @@ github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3v github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= -github.com/mattn/go-ieproxy v0.0.9 h1:RvVbLiMv/Hbjf1gRaC2AQyzwbdVhdId7D2vPnXIml4k= -github.com/mattn/go-ieproxy v0.0.9/go.mod h1:eF30/rfdQUO9EnzNIZQr0r9HiLMlZNCpJkHbmMuOAE0= +github.com/mattn/go-ieproxy v0.0.11 h1:MQ/5BuGSgDAHZOJe6YY80IF2UVCfGkwfo6AeD7HtHYo= +github.com/mattn/go-ieproxy v0.0.11/go.mod h1:/NsJd+kxZBmjMc5hrJCKMbP57B84rvq9BiDRbtO9AS0= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -406,8 +408,8 @@ github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 h1: github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97/go.mod h1:LoBCZeRh+5hX+fSULNyFnagYlQG/gBsyA/deNzROkq8= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3 h1:etRZv4bJf9YAuyPWbyFufjkijfeoPSmyA5xNcd4DoyI= -github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3/go.mod h1:plwr4+63Q1xL8oIdBDeU854um7Cct0Av8dhP44lutMw= +github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= +github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= @@ -536,6 +538,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -599,7 +603,6 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220630215102-69896b714898/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= @@ -669,7 +672,6 @@ golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/go.mod b/go.mod index f7a1e9d9cb6..cd42357f46b 100644 --- a/go.mod +++ b/go.mod @@ -222,7 +222,7 @@ require ( github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-ieproxy v0.0.9 // indirect + github.com/mattn/go-ieproxy v0.0.11 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect diff --git a/go.sum b/go.sum index e1673c3e0c4..1fdd6373ad5 100644 --- a/go.sum +++ b/go.sum @@ -707,8 +707,8 @@ github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= -github.com/mattn/go-ieproxy v0.0.9 h1:RvVbLiMv/Hbjf1gRaC2AQyzwbdVhdId7D2vPnXIml4k= -github.com/mattn/go-ieproxy v0.0.9/go.mod h1:eF30/rfdQUO9EnzNIZQr0r9HiLMlZNCpJkHbmMuOAE0= +github.com/mattn/go-ieproxy v0.0.11 h1:MQ/5BuGSgDAHZOJe6YY80IF2UVCfGkwfo6AeD7HtHYo= +github.com/mattn/go-ieproxy v0.0.11/go.mod h1:/NsJd+kxZBmjMc5hrJCKMbP57B84rvq9BiDRbtO9AS0= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= @@ -1338,7 +1338,6 @@ golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/pkg/tempopb/tempo.pb.go b/pkg/tempopb/tempo.pb.go index fb84a680070..af42f5dee2f 100644 --- a/pkg/tempopb/tempo.pb.go +++ b/pkg/tempopb/tempo.pb.go @@ -368,8 +368,8 @@ func (m *SearchRequest) GetSpansPerSpanSet() uint32 { return 0 } -// SearchBlockRequest takes SearchRequest parameters as well as all information necessary -// to search a block in the backend. +// SearchBlockRequest takes SearchRequest parameters as well as all information +// necessary to search a block in the backend. type SearchBlockRequest struct { SearchReq *SearchRequest `protobuf:"bytes,1,opt,name=searchReq,proto3" json:"searchReq,omitempty"` BlockID string `protobuf:"bytes,2,opt,name=blockID,proto3" json:"blockID,omitempty"` @@ -1392,7 +1392,8 @@ func (m *PushResponse) GetErrorsByTrace() []PushErrorReason { return nil } -// PushBytesRequest pushes slices of traces, ids and searchdata. Traces are encoded using the +// PushBytesRequest pushes slices of traces, ids and searchdata. Traces are +// encoded using the // current BatchDecoder in ./pkg/model type PushBytesRequest struct { // pre-marshalled Traces. length must match ids @@ -1526,9 +1527,10 @@ func (m *TraceBytes) GetTraces() [][]byte { return nil } -// this message exists for marshalling/unmarshalling convenience to/from parquet. in parquet we proto encode -// links to a column. unfortunately you can't encode a slice directly so we use this wrapper to generate -// the required marshalling/unmarshalling functions. +// this message exists for marshalling/unmarshalling convenience to/from +// parquet. in parquet we proto encode links to a column. unfortunately you +// can't encode a slice directly so we use this wrapper to generate the required +// marshalling/unmarshalling functions. type LinkSlice struct { Links []*v11.Span_Link `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"` } @@ -2193,1463 +2195,1362 @@ func (m *TraceQLStatic) GetKind() int32 { return 0 } -func init() { - proto.RegisterEnum("tempopb.PushErrorReason", PushErrorReason_name, PushErrorReason_value) - proto.RegisterEnum("tempopb.DedicatedColumn_Scope", DedicatedColumn_Scope_name, DedicatedColumn_Scope_value) - proto.RegisterEnum("tempopb.DedicatedColumn_Type", DedicatedColumn_Type_name, DedicatedColumn_Type_value) - proto.RegisterType((*TraceByIDRequest)(nil), "tempopb.TraceByIDRequest") - proto.RegisterType((*TraceByIDResponse)(nil), "tempopb.TraceByIDResponse") - proto.RegisterType((*TraceByIDMetrics)(nil), "tempopb.TraceByIDMetrics") - proto.RegisterType((*SearchRequest)(nil), "tempopb.SearchRequest") - proto.RegisterMapType((map[string]string)(nil), "tempopb.SearchRequest.TagsEntry") - proto.RegisterType((*SearchBlockRequest)(nil), "tempopb.SearchBlockRequest") - proto.RegisterType((*DedicatedColumn)(nil), "tempopb.DedicatedColumn") - proto.RegisterType((*SearchResponse)(nil), "tempopb.SearchResponse") - proto.RegisterType((*TraceSearchMetadata)(nil), "tempopb.TraceSearchMetadata") - proto.RegisterType((*SpanSet)(nil), "tempopb.SpanSet") - proto.RegisterType((*Span)(nil), "tempopb.Span") - proto.RegisterType((*SearchMetrics)(nil), "tempopb.SearchMetrics") - proto.RegisterType((*SearchTagsRequest)(nil), "tempopb.SearchTagsRequest") - proto.RegisterType((*SearchTagsResponse)(nil), "tempopb.SearchTagsResponse") - proto.RegisterType((*SearchTagsV2Response)(nil), "tempopb.SearchTagsV2Response") - proto.RegisterType((*SearchTagsV2Scope)(nil), "tempopb.SearchTagsV2Scope") - proto.RegisterType((*SearchTagValuesRequest)(nil), "tempopb.SearchTagValuesRequest") - proto.RegisterType((*SearchTagValuesResponse)(nil), "tempopb.SearchTagValuesResponse") - proto.RegisterType((*TagValue)(nil), "tempopb.TagValue") - proto.RegisterType((*SearchTagValuesV2Response)(nil), "tempopb.SearchTagValuesV2Response") - proto.RegisterType((*Trace)(nil), "tempopb.Trace") - proto.RegisterType((*PushResponse)(nil), "tempopb.PushResponse") - proto.RegisterType((*PushBytesRequest)(nil), "tempopb.PushBytesRequest") - proto.RegisterType((*PushSpansRequest)(nil), "tempopb.PushSpansRequest") - proto.RegisterType((*TraceBytes)(nil), "tempopb.TraceBytes") - proto.RegisterType((*LinkSlice)(nil), "tempopb.LinkSlice") - proto.RegisterType((*SpanMetricsRequest)(nil), "tempopb.SpanMetricsRequest") - proto.RegisterType((*SpanMetricsSummaryRequest)(nil), "tempopb.SpanMetricsSummaryRequest") - proto.RegisterType((*SpanMetricsResponse)(nil), "tempopb.SpanMetricsResponse") - proto.RegisterType((*RawHistogram)(nil), "tempopb.RawHistogram") - proto.RegisterType((*KeyValue)(nil), "tempopb.KeyValue") - proto.RegisterType((*SpanMetrics)(nil), "tempopb.SpanMetrics") - proto.RegisterType((*SpanMetricsSummary)(nil), "tempopb.SpanMetricsSummary") - proto.RegisterType((*SpanMetricsSummaryResponse)(nil), "tempopb.SpanMetricsSummaryResponse") - proto.RegisterType((*TraceQLStatic)(nil), "tempopb.TraceQLStatic") +type SpanMetricsData struct { + ResultType string `protobuf:"bytes,1,opt,name=resultType,proto3" json:"resultType,omitempty"` + Result []*SpanMetricsResult `protobuf:"bytes,2,rep,name=result,proto3" json:"result,omitempty"` } -func init() { proto.RegisterFile("pkg/tempopb/tempo.proto", fileDescriptor_f22805646f4f62b6) } - -var fileDescriptor_f22805646f4f62b6 = []byte{ - // 2089 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4b, 0x6f, 0x1b, 0xc9, - 0x11, 0xd6, 0x88, 0x0f, 0x89, 0xa5, 0x17, 0xd5, 0x7e, 0xd1, 0xb4, 0x57, 0x16, 0x66, 0x8d, 0x44, - 0xbb, 0xf0, 0x52, 0x32, 0xd7, 0xc6, 0xc6, 0xeb, 0x60, 0x03, 0xd3, 0x62, 0x6c, 0xd9, 0x7a, 0xd8, - 0x4d, 0xda, 0x1b, 0x04, 0x01, 0x84, 0xe1, 0xb0, 0x4d, 0x4f, 0x44, 0xce, 0x70, 0x67, 0x9a, 0x8a, - 0x99, 0x63, 0x80, 0x04, 0x08, 0x90, 0x43, 0x0e, 0xc9, 0x35, 0x40, 0x4e, 0x8b, 0xfc, 0x8e, 0x00, - 0xc1, 0x5e, 0x12, 0xec, 0x31, 0xc8, 0x61, 0x11, 0xd8, 0xbf, 0x20, 0xff, 0x20, 0xa8, 0xea, 0xee, - 0x79, 0x90, 0x94, 0x8d, 0x4d, 0x0e, 0x7b, 0x62, 0xd7, 0xd7, 0x5f, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x15, 0x07, 0x2e, 0x0d, 0x4f, 0x7a, 0xdb, 0x52, 0x0c, 0x86, 0xc1, 0xb0, 0xa3, 0x7e, 0x6b, 0xc3, - 0x30, 0x90, 0x01, 0x5b, 0xd0, 0x60, 0xf5, 0xbc, 0x0c, 0x1d, 0x57, 0x6c, 0x9f, 0xde, 0xdc, 0xa6, - 0x81, 0x9a, 0xae, 0x5e, 0x74, 0x83, 0xc1, 0x20, 0xf0, 0x11, 0x56, 0x23, 0x8d, 0x7f, 0xd4, 0xf3, - 0xe4, 0xcb, 0x51, 0xa7, 0xe6, 0x06, 0x83, 0xed, 0x5e, 0xd0, 0x0b, 0xb6, 0x09, 0xee, 0x8c, 0x5e, - 0x90, 0x44, 0x02, 0x8d, 0x14, 0xdd, 0xfe, 0x8d, 0x05, 0xe5, 0x36, 0xaa, 0x6d, 0x8c, 0xf7, 0x76, - 0xb9, 0xf8, 0x62, 0x24, 0x22, 0xc9, 0x2a, 0xb0, 0x40, 0x5b, 0xed, 0xed, 0x56, 0xac, 0x4d, 0x6b, - 0x6b, 0x99, 0x1b, 0x91, 0x6d, 0x00, 0x74, 0xfa, 0x81, 0x7b, 0xd2, 0x92, 0x4e, 0x28, 0x2b, 0xf3, - 0x9b, 0xd6, 0x56, 0x89, 0xa7, 0x10, 0x56, 0x85, 0x45, 0x92, 0x9a, 0x7e, 0xb7, 0x92, 0xa3, 0xd9, - 0x58, 0x66, 0x57, 0xa1, 0xf4, 0xc5, 0x48, 0x84, 0xe3, 0x83, 0xa0, 0x2b, 0x2a, 0x05, 0x9a, 0x4c, - 0x00, 0xdb, 0x87, 0xf5, 0x94, 0x1d, 0xd1, 0x30, 0xf0, 0x23, 0xc1, 0xae, 0x43, 0x81, 0x76, 0x26, - 0x33, 0x96, 0xea, 0xab, 0x35, 0xed, 0x93, 0x1a, 0x51, 0xb9, 0x9a, 0x64, 0x1f, 0xc3, 0xc2, 0x40, - 0xc8, 0xd0, 0x73, 0x23, 0xb2, 0x68, 0xa9, 0x7e, 0x39, 0xcb, 0x43, 0x95, 0x07, 0x8a, 0xc0, 0x0d, - 0xd3, 0x66, 0xa9, 0x73, 0xeb, 0x49, 0xfb, 0x1f, 0xf3, 0xb0, 0xd2, 0x12, 0x4e, 0xe8, 0xbe, 0x34, - 0x9e, 0xf8, 0x14, 0xf2, 0x6d, 0xa7, 0x17, 0x55, 0xac, 0xcd, 0xdc, 0xd6, 0x52, 0x7d, 0x33, 0xd6, - 0x9b, 0x61, 0xd5, 0x90, 0xd2, 0xf4, 0x65, 0x38, 0x6e, 0xe4, 0xbf, 0xfa, 0xe6, 0xda, 0x1c, 0xa7, - 0x35, 0xec, 0x3a, 0xac, 0x1c, 0x78, 0xfe, 0xee, 0x28, 0x74, 0xa4, 0x17, 0xf8, 0x07, 0xca, 0xb8, - 0x15, 0x9e, 0x05, 0x89, 0xe5, 0xbc, 0x4a, 0xb1, 0x72, 0x9a, 0x95, 0x06, 0xd9, 0x79, 0x28, 0xec, - 0x7b, 0x03, 0x4f, 0x56, 0xf2, 0x34, 0xab, 0x04, 0x44, 0x23, 0xba, 0x88, 0x82, 0x42, 0x49, 0x60, - 0x65, 0xc8, 0x09, 0xbf, 0x5b, 0x29, 0x12, 0x86, 0x43, 0xe4, 0x3d, 0x45, 0x47, 0x57, 0x16, 0xc9, - 0xeb, 0x4a, 0x60, 0x5b, 0xb0, 0xd6, 0x1a, 0x3a, 0x7e, 0xf4, 0x44, 0x84, 0xf8, 0xdb, 0x12, 0xb2, - 0x52, 0xa2, 0x35, 0x93, 0x70, 0xf5, 0x13, 0x28, 0xc5, 0x47, 0x44, 0xf5, 0x27, 0x62, 0x4c, 0x37, - 0x52, 0xe2, 0x38, 0x44, 0xf5, 0xa7, 0x4e, 0x7f, 0x24, 0x74, 0x3c, 0x28, 0xe1, 0xd3, 0xf9, 0x1f, - 0x58, 0xf6, 0xdf, 0x72, 0xc0, 0x94, 0xab, 0x1a, 0x18, 0x05, 0xc6, 0xab, 0xb7, 0xa0, 0x14, 0x19, - 0x07, 0xea, 0xab, 0xbd, 0x38, 0xdb, 0xb5, 0x3c, 0x21, 0x62, 0x54, 0x52, 0x2c, 0xed, 0xed, 0xea, - 0x8d, 0x8c, 0x88, 0x91, 0x45, 0x47, 0x7f, 0xe2, 0xf4, 0x84, 0xf6, 0x5f, 0x02, 0xa0, 0x87, 0x87, - 0x4e, 0x4f, 0x44, 0xed, 0x40, 0xa9, 0xd6, 0x3e, 0xcc, 0x82, 0x18, 0xb9, 0xc2, 0x77, 0x83, 0xae, - 0xe7, 0xf7, 0x74, 0x70, 0xc6, 0x32, 0x6a, 0xf0, 0xfc, 0xae, 0x78, 0x85, 0xea, 0x5a, 0xde, 0x2f, - 0x85, 0xf6, 0x6d, 0x16, 0x64, 0x36, 0x2c, 0xcb, 0x40, 0x3a, 0x7d, 0x2e, 0xdc, 0x20, 0xec, 0x46, - 0x95, 0x05, 0x22, 0x65, 0x30, 0xe4, 0x74, 0x1d, 0xe9, 0x34, 0xcd, 0x4e, 0xea, 0x42, 0x32, 0x18, - 0x9e, 0xf3, 0x54, 0x84, 0x91, 0x17, 0xf8, 0x74, 0x1f, 0x25, 0x6e, 0x44, 0xc6, 0x20, 0x1f, 0xe1, - 0xf6, 0xb0, 0x69, 0x6d, 0xe5, 0x39, 0x8d, 0xf1, 0x45, 0xbe, 0x08, 0x02, 0x29, 0x42, 0x32, 0x6c, - 0x89, 0xf6, 0x4c, 0x21, 0x6c, 0x17, 0xca, 0x5d, 0xd1, 0xf5, 0x5c, 0x47, 0x8a, 0xee, 0xfd, 0xa0, - 0x3f, 0x1a, 0xf8, 0x51, 0x65, 0x99, 0xa2, 0xb9, 0x12, 0xbb, 0x7c, 0x37, 0x4b, 0xe0, 0x53, 0x2b, - 0xec, 0xbf, 0x5a, 0xb0, 0x36, 0xc1, 0x62, 0xb7, 0xa0, 0x10, 0xb9, 0xc1, 0x50, 0x79, 0x7c, 0xb5, - 0xbe, 0x71, 0x96, 0xba, 0x5a, 0x0b, 0x59, 0x5c, 0x91, 0xf1, 0x0c, 0xbe, 0x33, 0x30, 0xb1, 0x42, - 0x63, 0x76, 0x13, 0xf2, 0x72, 0x3c, 0x54, 0xaf, 0x7c, 0xb5, 0xfe, 0xde, 0x99, 0x8a, 0xda, 0xe3, - 0xa1, 0xe0, 0x44, 0xb5, 0xaf, 0x41, 0x81, 0xd4, 0xb2, 0x45, 0xc8, 0xb7, 0x9e, 0xdc, 0x3b, 0x2c, - 0xcf, 0xb1, 0x65, 0x58, 0xe4, 0xcd, 0xd6, 0xd1, 0x33, 0x7e, 0xbf, 0x59, 0xb6, 0x6c, 0x06, 0x79, - 0xa4, 0x33, 0x80, 0x62, 0xab, 0xcd, 0xf7, 0x0e, 0x1f, 0x94, 0xe7, 0xec, 0x57, 0xb0, 0x6a, 0xa2, - 0x4b, 0x27, 0x98, 0x5b, 0x50, 0xa4, 0x1c, 0x62, 0x5e, 0xf8, 0xd5, 0x6c, 0xe6, 0x50, 0xec, 0x03, - 0x21, 0x1d, 0xbc, 0x21, 0xae, 0xb9, 0x6c, 0x67, 0x32, 0xe1, 0x4c, 0x46, 0xef, 0x54, 0xb6, 0xf9, - 0x72, 0x1e, 0xce, 0xcd, 0xd0, 0x38, 0x99, 0x69, 0x4b, 0x49, 0xa6, 0xdd, 0x82, 0xb5, 0x30, 0x08, - 0x64, 0x4b, 0x84, 0xa7, 0x9e, 0x2b, 0x0e, 0x13, 0x97, 0x4d, 0xc2, 0x18, 0x9d, 0x08, 0x91, 0x7a, - 0xe2, 0xa9, 0xc4, 0x9b, 0x05, 0xd9, 0x0d, 0x58, 0xa7, 0x27, 0xd1, 0xf6, 0x06, 0xe2, 0x99, 0xef, - 0xbd, 0x3a, 0x74, 0xfc, 0x80, 0x5e, 0x42, 0x9e, 0x4f, 0x4f, 0x60, 0x54, 0x75, 0x93, 0x94, 0xa4, - 0xd2, 0x4b, 0x0a, 0x61, 0x1f, 0xc2, 0x42, 0xa4, 0x73, 0x46, 0x91, 0x3c, 0x50, 0x4e, 0x3c, 0xa0, - 0x70, 0x6e, 0x08, 0xec, 0x06, 0x2c, 0xea, 0x21, 0xbe, 0x89, 0xdc, 0x4c, 0x72, 0xcc, 0xb0, 0x7f, - 0x6d, 0xc1, 0x82, 0x46, 0xd9, 0xfb, 0x50, 0x40, 0xdc, 0x5c, 0xce, 0x4a, 0x66, 0x19, 0x57, 0x73, - 0xe8, 0xc2, 0x81, 0x23, 0xdd, 0x97, 0xa2, 0xab, 0x13, 0xac, 0x11, 0xd9, 0x5d, 0x00, 0x47, 0xca, - 0xd0, 0xeb, 0x8c, 0xa4, 0xc0, 0xbc, 0x8a, 0x3a, 0xae, 0xc4, 0x3a, 0x74, 0xd5, 0x3c, 0xbd, 0x59, - 0x7b, 0x2c, 0xc6, 0xcf, 0x31, 0x65, 0xf1, 0x14, 0x1d, 0x23, 0x3e, 0x8f, 0xdb, 0xb0, 0x8b, 0x50, - 0xc4, 0x8d, 0xe2, 0x1b, 0xd2, 0xd2, 0xcc, 0x40, 0x9e, 0xe9, 0xe4, 0xdc, 0x59, 0x4e, 0xbe, 0x0e, - 0x2b, 0xc6, 0xa5, 0x28, 0x47, 0xfa, 0x3a, 0xb2, 0xe0, 0xc4, 0x29, 0x0a, 0xdf, 0xee, 0x14, 0xff, - 0xb1, 0x4c, 0x45, 0xd3, 0x21, 0x89, 0x71, 0xe5, 0xf9, 0xd1, 0x50, 0xb8, 0x52, 0x74, 0xdb, 0x26, - 0xf4, 0x29, 0xeb, 0x4f, 0xc0, 0xec, 0x7b, 0xb0, 0x1a, 0x43, 0x8d, 0x31, 0x6e, 0x3e, 0x4f, 0xf6, - 0x4d, 0xa0, 0x6c, 0x13, 0x96, 0x28, 0xc7, 0x51, 0x8a, 0x37, 0xf5, 0x2b, 0x0d, 0xe1, 0x41, 0xdd, - 0x60, 0x30, 0xec, 0x0b, 0x29, 0xba, 0x8f, 0x82, 0x4e, 0x64, 0x32, 0x70, 0x06, 0xc4, 0x2c, 0x4e, - 0x8b, 0x88, 0xa1, 0x42, 0x2e, 0x01, 0xd0, 0xee, 0x44, 0xa5, 0x32, 0xa7, 0x48, 0xe6, 0x4c, 0xc2, - 0xf6, 0x07, 0xb0, 0xae, 0x8e, 0x8c, 0x35, 0xcb, 0x94, 0x9c, 0xf3, 0x26, 0x59, 0xa9, 0x4b, 0x54, - 0x82, 0xbd, 0x63, 0xca, 0x93, 0xa2, 0xea, 0xa4, 0x50, 0x85, 0x45, 0xe9, 0xf4, 0xf0, 0xd5, 0xa8, - 0xc8, 0x2b, 0xf1, 0x58, 0xb6, 0x1f, 0xc1, 0xf9, 0x64, 0xc5, 0xf3, 0x7a, 0xbc, 0xa6, 0x0e, 0x45, - 0x52, 0x69, 0x62, 0xb5, 0x3a, 0x91, 0x11, 0x14, 0x5d, 0x65, 0x42, 0xcd, 0xb4, 0xef, 0xa6, 0x0d, - 0xd5, 0x93, 0x71, 0x58, 0x59, 0xa9, 0xb0, 0x62, 0x90, 0x97, 0xd8, 0x85, 0xcc, 0x93, 0x31, 0x34, - 0xb6, 0x1f, 0xc2, 0xc5, 0x78, 0x31, 0xdd, 0x7b, 0x94, 0xee, 0xde, 0x94, 0xb9, 0x71, 0x4e, 0x51, - 0x22, 0x3a, 0x81, 0x1a, 0x2e, 0x53, 0xa8, 0x49, 0xb0, 0x3f, 0x81, 0x4b, 0x53, 0x9a, 0xf4, 0xa9, - 0xf0, 0x4a, 0x0c, 0xa8, 0x5d, 0x91, 0x00, 0xf6, 0x2d, 0x58, 0x34, 0x4b, 0xc8, 0xc4, 0x71, 0xec, - 0x5e, 0x1a, 0xcf, 0xee, 0x0b, 0xec, 0x7d, 0xb8, 0x3c, 0xb1, 0x5d, 0xca, 0x8d, 0xdb, 0x93, 0x1b, - 0x2e, 0xd5, 0xd7, 0x93, 0x94, 0xac, 0x67, 0xd2, 0x36, 0x34, 0xa0, 0x40, 0xe1, 0xca, 0xee, 0xc0, - 0x42, 0x87, 0xde, 0xbd, 0x59, 0x77, 0x2d, 0x5e, 0xa7, 0xda, 0xe6, 0xd3, 0x9b, 0x35, 0x2e, 0xa2, - 0x60, 0x14, 0xba, 0x82, 0xfa, 0x1b, 0x6e, 0xf8, 0xf6, 0x21, 0x2c, 0x3f, 0x19, 0x45, 0x49, 0x51, - 0xf8, 0x0c, 0x56, 0x44, 0x18, 0x06, 0x61, 0xd4, 0x18, 0xb7, 0x75, 0xf7, 0x99, 0xdb, 0x5a, 0x4d, - 0xd5, 0x4b, 0x64, 0x37, 0x91, 0xc1, 0x85, 0x13, 0x05, 0x3e, 0xcf, 0xd2, 0xed, 0x3f, 0x5b, 0x50, - 0x46, 0x0a, 0x85, 0xa3, 0xb9, 0x95, 0x8f, 0xe2, 0x4a, 0x83, 0xb7, 0xb8, 0xdc, 0xb8, 0x80, 0x9d, - 0xe2, 0xbf, 0xbe, 0xb9, 0xb6, 0xf2, 0x24, 0x14, 0x4e, 0xbf, 0x1f, 0xb8, 0x8a, 0x6d, 0x4a, 0xcc, - 0xf7, 0x21, 0xe7, 0x75, 0x55, 0xd2, 0x3a, 0x93, 0x8b, 0x0c, 0x76, 0x1b, 0x40, 0xb5, 0x48, 0xbb, - 0x8e, 0x74, 0x2a, 0xf9, 0xb7, 0xf1, 0x53, 0x44, 0xfb, 0x40, 0x99, 0xa8, 0x3c, 0xa1, 0x4d, 0xfc, - 0x3f, 0x5c, 0x78, 0x1d, 0x40, 0x77, 0xd3, 0x98, 0x11, 0x2e, 0x66, 0xaa, 0xea, 0xb2, 0x39, 0x94, - 0xfd, 0x19, 0x94, 0xf6, 0x3d, 0xff, 0xa4, 0xd5, 0xf7, 0x5c, 0x2c, 0xfa, 0x85, 0xbe, 0xe7, 0x9f, - 0x98, 0xbd, 0xae, 0x4c, 0xef, 0x85, 0x7b, 0xd4, 0x70, 0x01, 0x57, 0x4c, 0xfb, 0x57, 0x16, 0x30, - 0x04, 0x4d, 0x79, 0x4d, 0xde, 0xb6, 0x0a, 0x6b, 0x2b, 0x15, 0xd6, 0xf8, 0x0c, 0x7a, 0x61, 0x30, - 0x1a, 0x36, 0x4c, 0xb8, 0x1b, 0x11, 0xf9, 0x7d, 0x6a, 0xa6, 0x55, 0x66, 0x56, 0x42, 0xd2, 0x4c, - 0xe7, 0x67, 0x34, 0xd3, 0x85, 0xb8, 0x99, 0xb6, 0x7f, 0x6b, 0xc1, 0xe5, 0x94, 0x11, 0xad, 0xd1, - 0x60, 0xe0, 0x84, 0xe3, 0xef, 0xc6, 0x96, 0xbf, 0x58, 0x70, 0x2e, 0xe3, 0x90, 0xe4, 0xdd, 0x8a, - 0x48, 0x7a, 0x03, 0xec, 0x9d, 0xc8, 0x92, 0x45, 0x9e, 0x00, 0xd4, 0x2e, 0x0f, 0x1d, 0xff, 0x7e, - 0x30, 0xf2, 0xa5, 0xce, 0xe9, 0x09, 0x80, 0x69, 0x9f, 0xc2, 0xb9, 0x15, 0x53, 0x94, 0x69, 0x13, - 0x28, 0xab, 0x25, 0x4d, 0x50, 0x9e, 0x6e, 0xf0, 0x7c, 0xa6, 0x3c, 0x4f, 0xb5, 0x40, 0x3f, 0x84, - 0x65, 0xee, 0xfc, 0xe2, 0xa1, 0x17, 0xc9, 0xa0, 0x17, 0x3a, 0x03, 0x0c, 0x92, 0xce, 0xc8, 0x3d, - 0x11, 0x92, 0x0c, 0xcc, 0x73, 0x2d, 0xe1, 0xd9, 0xdd, 0x94, 0x65, 0x4a, 0xb0, 0x1f, 0xc1, 0xa2, - 0x29, 0x70, 0x33, 0xfe, 0x81, 0xdc, 0x48, 0x67, 0x9a, 0x74, 0x3b, 0x46, 0x41, 0xf9, 0x74, 0xbf, - 0x25, 0x1d, 0xe9, 0xb9, 0x26, 0x03, 0xfd, 0xc1, 0x82, 0xa5, 0x94, 0x89, 0xac, 0x01, 0xeb, 0x7d, - 0x47, 0x0a, 0xdf, 0x1d, 0x1f, 0xbf, 0x34, 0xe6, 0xe9, 0xa8, 0xbc, 0x10, 0x6b, 0x4a, 0xdb, 0xce, - 0xcb, 0x9a, 0x9f, 0x9c, 0xe6, 0x03, 0x28, 0x46, 0x22, 0xf4, 0xf4, 0xf3, 0x4e, 0x67, 0xad, 0xb8, - 0x2e, 0x6b, 0x02, 0x1e, 0x5c, 0xe5, 0x0b, 0xed, 0x58, 0x2d, 0xd9, 0x7f, 0xcf, 0x46, 0xb7, 0x0e, - 0xac, 0xec, 0x6d, 0x59, 0xef, 0xbe, 0xad, 0xf9, 0x99, 0xb7, 0x95, 0xd8, 0x97, 0x7b, 0x97, 0x7d, - 0x65, 0xc8, 0x0d, 0xef, 0xdc, 0xd1, 0xcd, 0x08, 0x0e, 0x15, 0x72, 0x9b, 0x02, 0x8f, 0x90, 0xdb, - 0x0a, 0xd9, 0xd1, 0x15, 0x18, 0x87, 0x84, 0xdc, 0xde, 0xa1, 0x3f, 0x3d, 0x88, 0xdc, 0xde, 0xb1, - 0x3f, 0x87, 0xea, 0xac, 0x77, 0xa2, 0x43, 0xf4, 0x0e, 0x94, 0x22, 0x82, 0x3c, 0x31, 0x9d, 0x02, - 0x66, 0xac, 0x4b, 0xd8, 0xf6, 0x1f, 0x2d, 0x58, 0xc9, 0x5c, 0x6c, 0xa6, 0xfa, 0x14, 0x74, 0xf5, - 0x59, 0x06, 0xcb, 0x27, 0x67, 0xe4, 0xb8, 0xe5, 0xa3, 0xf4, 0x82, 0xfc, 0x6d, 0x71, 0xeb, 0x05, - 0x4a, 0xaa, 0x09, 0x29, 0x71, 0x2b, 0x42, 0xa9, 0x43, 0x87, 0x5b, 0xe4, 0x56, 0x07, 0xa5, 0xae, - 0x3e, 0x98, 0xd5, 0xa5, 0xee, 0x4f, 0x3a, 0x72, 0xa4, 0xfe, 0xce, 0x15, 0xb8, 0x96, 0x70, 0xc7, - 0x13, 0xcf, 0xef, 0xd2, 0x1f, 0xb8, 0x02, 0xa7, 0xf1, 0x87, 0x3f, 0x83, 0xb5, 0x89, 0xca, 0x80, - 0xff, 0x49, 0x0e, 0x8f, 0x8e, 0x9b, 0x9c, 0x1f, 0xf1, 0xf2, 0x1c, 0x3b, 0x07, 0x6b, 0x07, 0xf7, - 0x7e, 0x72, 0xbc, 0xbf, 0xf7, 0xbc, 0x79, 0xdc, 0xe6, 0xf7, 0xee, 0x37, 0x5b, 0x65, 0x0b, 0x41, - 0x1a, 0x1f, 0xb7, 0x8f, 0x8e, 0x8e, 0xf7, 0xef, 0xf1, 0x07, 0xcd, 0xf2, 0x3c, 0x5b, 0x87, 0x95, - 0x67, 0x87, 0x8f, 0x0f, 0x8f, 0x3e, 0x3f, 0xd4, 0x8b, 0x73, 0xf5, 0xdf, 0x59, 0x50, 0x44, 0xf5, - 0x22, 0x64, 0x3f, 0x82, 0x52, 0x5c, 0x5f, 0xd8, 0xe5, 0x4c, 0x59, 0x4a, 0xd7, 0x9c, 0xea, 0x85, - 0xcc, 0x94, 0x71, 0xbd, 0x3d, 0xc7, 0xee, 0xc1, 0x52, 0x4c, 0x7e, 0x5e, 0xff, 0x5f, 0x54, 0xd4, - 0xff, 0x64, 0x41, 0x59, 0x5f, 0xd1, 0x03, 0xe1, 0x8b, 0xd0, 0x91, 0x41, 0x6c, 0x18, 0x15, 0x87, - 0x09, 0xad, 0xe9, 0x4a, 0x73, 0xb6, 0x61, 0x7b, 0x00, 0x0f, 0x84, 0x34, 0x0f, 0x73, 0x66, 0x40, - 0x18, 0x1d, 0x57, 0x67, 0x4f, 0xc6, 0x06, 0x7e, 0x99, 0x87, 0x85, 0xa7, 0x23, 0x0c, 0xe9, 0x90, - 0x3d, 0x84, 0x95, 0x1f, 0x7b, 0x7e, 0x37, 0xfe, 0xe0, 0xc3, 0x66, 0x7c, 0x21, 0x32, 0x7a, 0xab, - 0xb3, 0xa6, 0x52, 0x9e, 0x5b, 0x36, 0x7f, 0x21, 0x5d, 0xe1, 0x4b, 0x76, 0xc6, 0x77, 0x8b, 0xea, - 0xa5, 0x29, 0x3c, 0x56, 0xd1, 0x84, 0xa5, 0xd4, 0x37, 0x91, 0xf4, 0x21, 0xa7, 0xbe, 0x94, 0xbc, - 0x4d, 0xcd, 0x03, 0x80, 0xa4, 0x7b, 0x64, 0xb3, 0xfa, 0x4d, 0xa3, 0xe4, 0xca, 0xcc, 0xb9, 0x58, - 0xd1, 0x63, 0x73, 0x24, 0xd5, 0x86, 0xbe, 0x55, 0xd5, 0x7b, 0x33, 0xdb, 0xda, 0x94, 0xb2, 0xe7, - 0xb0, 0x36, 0xd1, 0xdd, 0xb1, 0x6b, 0xd3, 0x6b, 0x32, 0x0d, 0x6b, 0x75, 0xf3, 0x6c, 0x42, 0xac, - 0xf7, 0xa7, 0xa9, 0x5e, 0xd9, 0x74, 0x8d, 0xef, 0xd6, 0x6c, 0x9f, 0x45, 0x48, 0xdb, 0x5c, 0x3f, - 0x82, 0x72, 0x4b, 0x86, 0xc2, 0x19, 0x78, 0x7e, 0xcf, 0x44, 0xcc, 0x5d, 0x28, 0xea, 0x0f, 0x43, - 0xdf, 0xf6, 0x86, 0x77, 0xac, 0xfa, 0xcf, 0x61, 0xc1, 0x84, 0xf0, 0xf1, 0xcc, 0x9c, 0x6e, 0xbf, - 0x2d, 0xd3, 0x69, 0xfd, 0xef, 0xbf, 0x95, 0x63, 0x8c, 0x6f, 0x54, 0xbe, 0x7a, 0xbd, 0x61, 0x7d, - 0xfd, 0x7a, 0xc3, 0xfa, 0xf7, 0xeb, 0x0d, 0xeb, 0xf7, 0x6f, 0x36, 0xe6, 0xbe, 0x7e, 0xb3, 0x31, - 0xf7, 0xcf, 0x37, 0x1b, 0x73, 0x9d, 0x22, 0x7d, 0xe1, 0xfd, 0xf8, 0xbf, 0x01, 0x00, 0x00, 0xff, - 0xff, 0x17, 0x51, 0x57, 0x33, 0x62, 0x16, 0x00, 0x00, +func (m *SpanMetricsData) Reset() { *m = SpanMetricsData{} } +func (m *SpanMetricsData) String() string { return proto.CompactTextString(m) } +func (*SpanMetricsData) ProtoMessage() {} +func (*SpanMetricsData) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{34} } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// PusherClient is the client API for Pusher service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type PusherClient interface { - // different versions of PushBytes expect the trace data to be pushed in different formats - PushBytes(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) - PushBytesV2(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) +func (m *SpanMetricsData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -type pusherClient struct { - cc *grpc.ClientConn +func (m *SpanMetricsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpanMetricsData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } - -func NewPusherClient(cc *grpc.ClientConn) PusherClient { - return &pusherClient{cc} +func (m *SpanMetricsData) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpanMetricsData.Merge(m, src) +} +func (m *SpanMetricsData) XXX_Size() int { + return m.Size() +} +func (m *SpanMetricsData) XXX_DiscardUnknown() { + xxx_messageInfo_SpanMetricsData.DiscardUnknown(m) } -func (c *pusherClient) PushBytes(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) { - out := new(PushResponse) - err := c.cc.Invoke(ctx, "/tempopb.Pusher/PushBytes", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_SpanMetricsData proto.InternalMessageInfo + +func (m *SpanMetricsData) GetResultType() string { + if m != nil { + return m.ResultType } - return out, nil + return "" } -func (c *pusherClient) PushBytesV2(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) { - out := new(PushResponse) - err := c.cc.Invoke(ctx, "/tempopb.Pusher/PushBytesV2", in, out, opts...) - if err != nil { - return nil, err +func (m *SpanMetricsData) GetResult() []*SpanMetricsResult { + if m != nil { + return m.Result } - return out, nil + return nil } -// PusherServer is the server API for Pusher service. -type PusherServer interface { - // different versions of PushBytes expect the trace data to be pushed in different formats - PushBytes(context.Context, *PushBytesRequest) (*PushResponse, error) - PushBytesV2(context.Context, *PushBytesRequest) (*PushResponse, error) +type SpanMetricsResult struct { + LabelName string `protobuf:"bytes,1,opt,name=labelName,proto3" json:"labelName,omitempty"` + LabelValue string `protobuf:"bytes,2,opt,name=labelValue,proto3" json:"labelValue,omitempty"` + Ts []*SpanMetricsResultPoint `protobuf:"bytes,3,rep,name=ts,proto3" json:"ts,omitempty"` } -// UnimplementedPusherServer can be embedded to have forward compatible implementations. -type UnimplementedPusherServer struct { +func (m *SpanMetricsResult) Reset() { *m = SpanMetricsResult{} } +func (m *SpanMetricsResult) String() string { return proto.CompactTextString(m) } +func (*SpanMetricsResult) ProtoMessage() {} +func (*SpanMetricsResult) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{35} } - -func (*UnimplementedPusherServer) PushBytes(ctx context.Context, req *PushBytesRequest) (*PushResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PushBytes not implemented") +func (m *SpanMetricsResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedPusherServer) PushBytesV2(ctx context.Context, req *PushBytesRequest) (*PushResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PushBytesV2 not implemented") +func (m *SpanMetricsResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpanMetricsResult.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } - -func RegisterPusherServer(s *grpc.Server, srv PusherServer) { - s.RegisterService(&_Pusher_serviceDesc, srv) +func (m *SpanMetricsResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpanMetricsResult.Merge(m, src) +} +func (m *SpanMetricsResult) XXX_Size() int { + return m.Size() +} +func (m *SpanMetricsResult) XXX_DiscardUnknown() { + xxx_messageInfo_SpanMetricsResult.DiscardUnknown(m) } -func _Pusher_PushBytes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PushBytesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PusherServer).PushBytes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.Pusher/PushBytes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PusherServer).PushBytes(ctx, req.(*PushBytesRequest)) +var xxx_messageInfo_SpanMetricsResult proto.InternalMessageInfo + +func (m *SpanMetricsResult) GetLabelName() string { + if m != nil { + return m.LabelName } - return interceptor(ctx, in, info, handler) + return "" } -func _Pusher_PushBytesV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PushBytesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PusherServer).PushBytesV2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.Pusher/PushBytesV2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PusherServer).PushBytesV2(ctx, req.(*PushBytesRequest)) +func (m *SpanMetricsResult) GetLabelValue() string { + if m != nil { + return m.LabelValue } - return interceptor(ctx, in, info, handler) + return "" } -var _Pusher_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tempopb.Pusher", - HandlerType: (*PusherServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "PushBytes", - Handler: _Pusher_PushBytes_Handler, - }, - { - MethodName: "PushBytesV2", - Handler: _Pusher_PushBytesV2_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "pkg/tempopb/tempo.proto", +func (m *SpanMetricsResult) GetTs() []*SpanMetricsResultPoint { + if m != nil { + return m.Ts + } + return nil } -// MetricsGeneratorClient is the client API for MetricsGenerator service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MetricsGeneratorClient interface { - PushSpans(ctx context.Context, in *PushSpansRequest, opts ...grpc.CallOption) (*PushResponse, error) - GetMetrics(ctx context.Context, in *SpanMetricsRequest, opts ...grpc.CallOption) (*SpanMetricsResponse, error) +type SpanMetricsResultPoint struct { + Time uint32 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` + Val float64 `protobuf:"fixed64,2,opt,name=val,proto3" json:"val,omitempty"` + ExemplarTraceID []byte `protobuf:"bytes,3,opt,name=exemplarTraceID,proto3" json:"exemplarTraceID,omitempty"` + ExemplarDuration uint64 `protobuf:"varint,4,opt,name=exemplarDuration,proto3" json:"exemplarDuration,omitempty"` } -type metricsGeneratorClient struct { - cc *grpc.ClientConn +func (m *SpanMetricsResultPoint) Reset() { *m = SpanMetricsResultPoint{} } +func (m *SpanMetricsResultPoint) String() string { return proto.CompactTextString(m) } +func (*SpanMetricsResultPoint) ProtoMessage() {} +func (*SpanMetricsResultPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{36} +} +func (m *SpanMetricsResultPoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpanMetricsResultPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpanMetricsResultPoint.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpanMetricsResultPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpanMetricsResultPoint.Merge(m, src) +} +func (m *SpanMetricsResultPoint) XXX_Size() int { + return m.Size() +} +func (m *SpanMetricsResultPoint) XXX_DiscardUnknown() { + xxx_messageInfo_SpanMetricsResultPoint.DiscardUnknown(m) } -func NewMetricsGeneratorClient(cc *grpc.ClientConn) MetricsGeneratorClient { - return &metricsGeneratorClient{cc} +var xxx_messageInfo_SpanMetricsResultPoint proto.InternalMessageInfo + +func (m *SpanMetricsResultPoint) GetTime() uint32 { + if m != nil { + return m.Time + } + return 0 } -func (c *metricsGeneratorClient) PushSpans(ctx context.Context, in *PushSpansRequest, opts ...grpc.CallOption) (*PushResponse, error) { - out := new(PushResponse) - err := c.cc.Invoke(ctx, "/tempopb.MetricsGenerator/PushSpans", in, out, opts...) - if err != nil { - return nil, err +func (m *SpanMetricsResultPoint) GetVal() float64 { + if m != nil { + return m.Val } - return out, nil + return 0 } -func (c *metricsGeneratorClient) GetMetrics(ctx context.Context, in *SpanMetricsRequest, opts ...grpc.CallOption) (*SpanMetricsResponse, error) { - out := new(SpanMetricsResponse) - err := c.cc.Invoke(ctx, "/tempopb.MetricsGenerator/GetMetrics", in, out, opts...) - if err != nil { - return nil, err +func (m *SpanMetricsResultPoint) GetExemplarTraceID() []byte { + if m != nil { + return m.ExemplarTraceID } - return out, nil + return nil } -// MetricsGeneratorServer is the server API for MetricsGenerator service. -type MetricsGeneratorServer interface { - PushSpans(context.Context, *PushSpansRequest) (*PushResponse, error) - GetMetrics(context.Context, *SpanMetricsRequest) (*SpanMetricsResponse, error) +func (m *SpanMetricsResultPoint) GetExemplarDuration() uint64 { + if m != nil { + return m.ExemplarDuration + } + return 0 } -// UnimplementedMetricsGeneratorServer can be embedded to have forward compatible implementations. -type UnimplementedMetricsGeneratorServer struct { +type QueryRangeRequest struct { + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + Start uint64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` + End uint64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` + Step uint64 `protobuf:"varint,4,opt,name=step,proto3" json:"step,omitempty"` + ShardID uint32 `protobuf:"varint,5,opt,name=shardID,proto3" json:"shardID,omitempty"` + ShardCount uint32 `protobuf:"varint,6,opt,name=shardCount,proto3" json:"shardCount,omitempty"` } -func (*UnimplementedMetricsGeneratorServer) PushSpans(ctx context.Context, req *PushSpansRequest) (*PushResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PushSpans not implemented") +func (m *QueryRangeRequest) Reset() { *m = QueryRangeRequest{} } +func (m *QueryRangeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRangeRequest) ProtoMessage() {} +func (*QueryRangeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{37} } -func (*UnimplementedMetricsGeneratorServer) GetMetrics(ctx context.Context, req *SpanMetricsRequest) (*SpanMetricsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMetrics not implemented") +func (m *QueryRangeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func RegisterMetricsGeneratorServer(s *grpc.Server, srv MetricsGeneratorServer) { - s.RegisterService(&_MetricsGenerator_serviceDesc, srv) +func (m *QueryRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRangeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryRangeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRangeRequest.Merge(m, src) +} +func (m *QueryRangeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryRangeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRangeRequest.DiscardUnknown(m) } -func _MetricsGenerator_PushSpans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PushSpansRequest) - if err := dec(in); err != nil { - return nil, err +var xxx_messageInfo_QueryRangeRequest proto.InternalMessageInfo + +func (m *QueryRangeRequest) GetQuery() string { + if m != nil { + return m.Query } - if interceptor == nil { - return srv.(MetricsGeneratorServer).PushSpans(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.MetricsGenerator/PushSpans", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsGeneratorServer).PushSpans(ctx, req.(*PushSpansRequest)) - } - return interceptor(ctx, in, info, handler) + return "" } -func _MetricsGenerator_GetMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SpanMetricsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsGeneratorServer).GetMetrics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.MetricsGenerator/GetMetrics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsGeneratorServer).GetMetrics(ctx, req.(*SpanMetricsRequest)) +func (m *QueryRangeRequest) GetStart() uint64 { + if m != nil { + return m.Start } - return interceptor(ctx, in, info, handler) -} - -var _MetricsGenerator_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tempopb.MetricsGenerator", - HandlerType: (*MetricsGeneratorServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "PushSpans", - Handler: _MetricsGenerator_PushSpans_Handler, - }, - { - MethodName: "GetMetrics", - Handler: _MetricsGenerator_GetMetrics_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "pkg/tempopb/tempo.proto", + return 0 } -// QuerierClient is the client API for Querier service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QuerierClient interface { - FindTraceByID(ctx context.Context, in *TraceByIDRequest, opts ...grpc.CallOption) (*TraceByIDResponse, error) - SearchRecent(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) - SearchBlock(ctx context.Context, in *SearchBlockRequest, opts ...grpc.CallOption) (*SearchResponse, error) - SearchTags(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsResponse, error) - SearchTagsV2(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsV2Response, error) - SearchTagValues(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesResponse, error) - SearchTagValuesV2(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesV2Response, error) +func (m *QueryRangeRequest) GetEnd() uint64 { + if m != nil { + return m.End + } + return 0 } -type querierClient struct { - cc *grpc.ClientConn +func (m *QueryRangeRequest) GetStep() uint64 { + if m != nil { + return m.Step + } + return 0 } -func NewQuerierClient(cc *grpc.ClientConn) QuerierClient { - return &querierClient{cc} +func (m *QueryRangeRequest) GetShardID() uint32 { + if m != nil { + return m.ShardID + } + return 0 } -func (c *querierClient) FindTraceByID(ctx context.Context, in *TraceByIDRequest, opts ...grpc.CallOption) (*TraceByIDResponse, error) { - out := new(TraceByIDResponse) - err := c.cc.Invoke(ctx, "/tempopb.Querier/FindTraceByID", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryRangeRequest) GetShardCount() uint32 { + if m != nil { + return m.ShardCount } - return out, nil + return 0 } -func (c *querierClient) SearchRecent(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) { - out := new(SearchResponse) - err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchRecent", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type QueryRangeResponse struct { + Series []*TimeSeries `protobuf:"bytes,1,rep,name=series,proto3" json:"series,omitempty"` } -func (c *querierClient) SearchBlock(ctx context.Context, in *SearchBlockRequest, opts ...grpc.CallOption) (*SearchResponse, error) { - out := new(SearchResponse) - err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchBlock", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryRangeResponse) Reset() { *m = QueryRangeResponse{} } +func (m *QueryRangeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRangeResponse) ProtoMessage() {} +func (*QueryRangeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{38} +} +func (m *QueryRangeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRangeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryRangeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRangeResponse.Merge(m, src) +} +func (m *QueryRangeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryRangeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRangeResponse.DiscardUnknown(m) } -func (c *querierClient) SearchTags(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsResponse, error) { - out := new(SearchTagsResponse) - err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTags", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QueryRangeResponse proto.InternalMessageInfo + +func (m *QueryRangeResponse) GetSeries() []*TimeSeries { + if m != nil { + return m.Series } - return out, nil + return nil } -func (c *querierClient) SearchTagsV2(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsV2Response, error) { - out := new(SearchTagsV2Response) - err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTagsV2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type Sample struct { + // Fields order MUST match promql.FPoint so that we can cast types between them. + TimestampMs int64 `protobuf:"varint,2,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"` + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` } -func (c *querierClient) SearchTagValues(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesResponse, error) { - out := new(SearchTagValuesResponse) - err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTagValues", in, out, opts...) - if err != nil { - return nil, err +func (m *Sample) Reset() { *m = Sample{} } +func (m *Sample) String() string { return proto.CompactTextString(m) } +func (*Sample) ProtoMessage() {} +func (*Sample) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{39} +} +func (m *Sample) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Sample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Sample.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *Sample) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sample.Merge(m, src) +} +func (m *Sample) XXX_Size() int { + return m.Size() +} +func (m *Sample) XXX_DiscardUnknown() { + xxx_messageInfo_Sample.DiscardUnknown(m) } -func (c *querierClient) SearchTagValuesV2(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesV2Response, error) { - out := new(SearchTagValuesV2Response) - err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTagValuesV2", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_Sample proto.InternalMessageInfo + +func (m *Sample) GetTimestampMs() int64 { + if m != nil { + return m.TimestampMs } - return out, nil + return 0 } -// QuerierServer is the server API for Querier service. -type QuerierServer interface { - FindTraceByID(context.Context, *TraceByIDRequest) (*TraceByIDResponse, error) - SearchRecent(context.Context, *SearchRequest) (*SearchResponse, error) - SearchBlock(context.Context, *SearchBlockRequest) (*SearchResponse, error) - SearchTags(context.Context, *SearchTagsRequest) (*SearchTagsResponse, error) - SearchTagsV2(context.Context, *SearchTagsRequest) (*SearchTagsV2Response, error) - SearchTagValues(context.Context, *SearchTagValuesRequest) (*SearchTagValuesResponse, error) - SearchTagValuesV2(context.Context, *SearchTagValuesRequest) (*SearchTagValuesV2Response, error) +func (m *Sample) GetValue() float64 { + if m != nil { + return m.Value + } + return 0 } -// UnimplementedQuerierServer can be embedded to have forward compatible implementations. -type UnimplementedQuerierServer struct { +// https : // github.com/grafana/mimir/blob/main/pkg/mimirpb/mimir.proto#L53 +type TimeSeries struct { + // repeated LabelPair labels = 1 [(gogoproto.nullable) = false, + // (gogoproto.customtype) = "LabelAdapter"]; + Labels []v1.KeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels"` + // Sorted by time, oldest sample first. + Samples []Sample `protobuf:"bytes,2,rep,name=samples,proto3" json:"samples"` + // repeated Exemplar exemplars = 3 [ (gogoproto.nullable) = false ]; + // repeated Histogram histograms = 4 [ (gogoproto.nullable) = false ]; + // TODO: review the LabelAdapter and migrate the use of this string + PromLabels string `protobuf:"bytes,3,opt,name=prom_labels,json=promLabels,proto3" json:"prom_labels,omitempty"` } -func (*UnimplementedQuerierServer) FindTraceByID(ctx context.Context, req *TraceByIDRequest) (*TraceByIDResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindTraceByID not implemented") +func (m *TimeSeries) Reset() { *m = TimeSeries{} } +func (m *TimeSeries) String() string { return proto.CompactTextString(m) } +func (*TimeSeries) ProtoMessage() {} +func (*TimeSeries) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{40} } -func (*UnimplementedQuerierServer) SearchRecent(ctx context.Context, req *SearchRequest) (*SearchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchRecent not implemented") -} -func (*UnimplementedQuerierServer) SearchBlock(ctx context.Context, req *SearchBlockRequest) (*SearchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchBlock not implemented") +func (m *TimeSeries) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQuerierServer) SearchTags(ctx context.Context, req *SearchTagsRequest) (*SearchTagsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchTags not implemented") +func (m *TimeSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TimeSeries.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (*UnimplementedQuerierServer) SearchTagsV2(ctx context.Context, req *SearchTagsRequest) (*SearchTagsV2Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchTagsV2 not implemented") +func (m *TimeSeries) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimeSeries.Merge(m, src) } -func (*UnimplementedQuerierServer) SearchTagValues(ctx context.Context, req *SearchTagValuesRequest) (*SearchTagValuesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchTagValues not implemented") +func (m *TimeSeries) XXX_Size() int { + return m.Size() } -func (*UnimplementedQuerierServer) SearchTagValuesV2(ctx context.Context, req *SearchTagValuesRequest) (*SearchTagValuesV2Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchTagValuesV2 not implemented") +func (m *TimeSeries) XXX_DiscardUnknown() { + xxx_messageInfo_TimeSeries.DiscardUnknown(m) } -func RegisterQuerierServer(s *grpc.Server, srv QuerierServer) { - s.RegisterService(&_Querier_serviceDesc, srv) -} +var xxx_messageInfo_TimeSeries proto.InternalMessageInfo -func _Querier_FindTraceByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TraceByIDRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QuerierServer).FindTraceByID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.Querier/FindTraceByID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).FindTraceByID(ctx, req.(*TraceByIDRequest)) +func (m *TimeSeries) GetLabels() []v1.KeyValue { + if m != nil { + return m.Labels } - return interceptor(ctx, in, info, handler) + return nil } -func _Querier_SearchRecent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QuerierServer).SearchRecent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.Querier/SearchRecent", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).SearchRecent(ctx, req.(*SearchRequest)) +func (m *TimeSeries) GetSamples() []Sample { + if m != nil { + return m.Samples } - return interceptor(ctx, in, info, handler) + return nil } -func _Querier_SearchBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QuerierServer).SearchBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.Querier/SearchBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).SearchBlock(ctx, req.(*SearchBlockRequest)) +func (m *TimeSeries) GetPromLabels() string { + if m != nil { + return m.PromLabels } - return interceptor(ctx, in, info, handler) + return "" } -func _Querier_SearchTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchTagsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QuerierServer).SearchTags(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.Querier/SearchTags", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).SearchTags(ctx, req.(*SearchTagsRequest)) - } - return interceptor(ctx, in, info, handler) +func init() { + proto.RegisterEnum("tempopb.PushErrorReason", PushErrorReason_name, PushErrorReason_value) + proto.RegisterEnum("tempopb.DedicatedColumn_Scope", DedicatedColumn_Scope_name, DedicatedColumn_Scope_value) + proto.RegisterEnum("tempopb.DedicatedColumn_Type", DedicatedColumn_Type_name, DedicatedColumn_Type_value) + proto.RegisterType((*TraceByIDRequest)(nil), "tempopb.TraceByIDRequest") + proto.RegisterType((*TraceByIDResponse)(nil), "tempopb.TraceByIDResponse") + proto.RegisterType((*TraceByIDMetrics)(nil), "tempopb.TraceByIDMetrics") + proto.RegisterType((*SearchRequest)(nil), "tempopb.SearchRequest") + proto.RegisterMapType((map[string]string)(nil), "tempopb.SearchRequest.TagsEntry") + proto.RegisterType((*SearchBlockRequest)(nil), "tempopb.SearchBlockRequest") + proto.RegisterType((*DedicatedColumn)(nil), "tempopb.DedicatedColumn") + proto.RegisterType((*SearchResponse)(nil), "tempopb.SearchResponse") + proto.RegisterType((*TraceSearchMetadata)(nil), "tempopb.TraceSearchMetadata") + proto.RegisterType((*SpanSet)(nil), "tempopb.SpanSet") + proto.RegisterType((*Span)(nil), "tempopb.Span") + proto.RegisterType((*SearchMetrics)(nil), "tempopb.SearchMetrics") + proto.RegisterType((*SearchTagsRequest)(nil), "tempopb.SearchTagsRequest") + proto.RegisterType((*SearchTagsResponse)(nil), "tempopb.SearchTagsResponse") + proto.RegisterType((*SearchTagsV2Response)(nil), "tempopb.SearchTagsV2Response") + proto.RegisterType((*SearchTagsV2Scope)(nil), "tempopb.SearchTagsV2Scope") + proto.RegisterType((*SearchTagValuesRequest)(nil), "tempopb.SearchTagValuesRequest") + proto.RegisterType((*SearchTagValuesResponse)(nil), "tempopb.SearchTagValuesResponse") + proto.RegisterType((*TagValue)(nil), "tempopb.TagValue") + proto.RegisterType((*SearchTagValuesV2Response)(nil), "tempopb.SearchTagValuesV2Response") + proto.RegisterType((*Trace)(nil), "tempopb.Trace") + proto.RegisterType((*PushResponse)(nil), "tempopb.PushResponse") + proto.RegisterType((*PushBytesRequest)(nil), "tempopb.PushBytesRequest") + proto.RegisterType((*PushSpansRequest)(nil), "tempopb.PushSpansRequest") + proto.RegisterType((*TraceBytes)(nil), "tempopb.TraceBytes") + proto.RegisterType((*LinkSlice)(nil), "tempopb.LinkSlice") + proto.RegisterType((*SpanMetricsRequest)(nil), "tempopb.SpanMetricsRequest") + proto.RegisterType((*SpanMetricsSummaryRequest)(nil), "tempopb.SpanMetricsSummaryRequest") + proto.RegisterType((*SpanMetricsResponse)(nil), "tempopb.SpanMetricsResponse") + proto.RegisterType((*RawHistogram)(nil), "tempopb.RawHistogram") + proto.RegisterType((*KeyValue)(nil), "tempopb.KeyValue") + proto.RegisterType((*SpanMetrics)(nil), "tempopb.SpanMetrics") + proto.RegisterType((*SpanMetricsSummary)(nil), "tempopb.SpanMetricsSummary") + proto.RegisterType((*SpanMetricsSummaryResponse)(nil), "tempopb.SpanMetricsSummaryResponse") + proto.RegisterType((*TraceQLStatic)(nil), "tempopb.TraceQLStatic") + proto.RegisterType((*SpanMetricsData)(nil), "tempopb.SpanMetricsData") + proto.RegisterType((*SpanMetricsResult)(nil), "tempopb.SpanMetricsResult") + proto.RegisterType((*SpanMetricsResultPoint)(nil), "tempopb.SpanMetricsResultPoint") + proto.RegisterType((*QueryRangeRequest)(nil), "tempopb.QueryRangeRequest") + proto.RegisterType((*QueryRangeResponse)(nil), "tempopb.QueryRangeResponse") + proto.RegisterType((*Sample)(nil), "tempopb.Sample") + proto.RegisterType((*TimeSeries)(nil), "tempopb.TimeSeries") } -func _Querier_SearchTagsV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchTagsRequest) - if err := dec(in); err != nil { +func init() { proto.RegisterFile("pkg/tempopb/tempo.proto", fileDescriptor_f22805646f4f62b6) } + +var fileDescriptor_f22805646f4f62b6 = []byte{ + // 2400 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4b, 0x6f, 0x1b, 0xc9, + 0xf1, 0xd7, 0x88, 0x0f, 0x89, 0xa5, 0x17, 0xd5, 0xf6, 0xca, 0x34, 0xed, 0x95, 0xf4, 0x9f, 0x35, + 0xfe, 0xd1, 0x3a, 0x5e, 0x49, 0xe6, 0xda, 0xd8, 0x78, 0x1d, 0x6c, 0x20, 0x59, 0x8a, 0x2d, 0x5b, + 0xaf, 0x6d, 0xd2, 0xda, 0x20, 0x08, 0x20, 0x0c, 0x87, 0x6d, 0x7a, 0x20, 0x72, 0x86, 0x3b, 0xd3, + 0x54, 0xcc, 0x1c, 0x03, 0x24, 0x40, 0x80, 0x1c, 0x72, 0x48, 0x0e, 0xb9, 0x24, 0xc8, 0x69, 0x91, + 0x73, 0x3e, 0x42, 0x80, 0x60, 0x2f, 0x09, 0xf6, 0x18, 0xe4, 0xb0, 0x08, 0xec, 0x4f, 0x90, 0x6f, + 0x10, 0x54, 0x75, 0xf7, 0x3c, 0x48, 0x4a, 0xc6, 0x26, 0x87, 0x9c, 0xd8, 0xf5, 0xeb, 0x5f, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x0f, 0xe1, 0x5a, 0xef, 0xac, 0xbd, 0x21, 0x45, 0xb7, 0x17, 0xf4, + 0x9a, 0xea, 0x77, 0xbd, 0x17, 0x06, 0x32, 0x60, 0x53, 0x1a, 0xac, 0x2e, 0xb9, 0x41, 0xb7, 0x1b, + 0xf8, 0x1b, 0xe7, 0x77, 0x37, 0x54, 0x4b, 0x11, 0xaa, 0x1f, 0xb4, 0x3d, 0xf9, 0xb2, 0xdf, 0x5c, + 0x77, 0x83, 0xee, 0x46, 0x3b, 0x68, 0x07, 0x1b, 0x04, 0x37, 0xfb, 0x2f, 0x48, 0x22, 0x81, 0x5a, + 0x9a, 0x7e, 0x55, 0x86, 0x8e, 0x2b, 0x50, 0x0b, 0x35, 0x14, 0x6a, 0xff, 0xdc, 0x82, 0x72, 0x03, + 0xe5, 0xed, 0xc1, 0xde, 0x0e, 0x17, 0x9f, 0xf7, 0x45, 0x24, 0x59, 0x05, 0xa6, 0x88, 0xb3, 0xb7, + 0x53, 0xb1, 0x56, 0xad, 0xb5, 0x59, 0x6e, 0x44, 0xb6, 0x0c, 0xd0, 0xec, 0x04, 0xee, 0x59, 0x5d, + 0x3a, 0xa1, 0xac, 0x4c, 0xae, 0x5a, 0x6b, 0x25, 0x9e, 0x42, 0x58, 0x15, 0xa6, 0x49, 0xda, 0xf5, + 0x5b, 0x95, 0x1c, 0xf5, 0xc6, 0x32, 0xbb, 0x09, 0xa5, 0xcf, 0xfb, 0x22, 0x1c, 0x1c, 0x04, 0x2d, + 0x51, 0x29, 0x50, 0x67, 0x02, 0xd8, 0x3e, 0x2c, 0xa6, 0xec, 0x88, 0x7a, 0x81, 0x1f, 0x09, 0x76, + 0x0b, 0x0a, 0x34, 0x33, 0x99, 0x31, 0x53, 0x9b, 0x5f, 0xd7, 0x3e, 0x59, 0x27, 0x2a, 0x57, 0x9d, + 0xec, 0x43, 0x98, 0xea, 0x0a, 0x19, 0x7a, 0x6e, 0x44, 0x16, 0xcd, 0xd4, 0xae, 0x67, 0x79, 0xa8, + 0xf2, 0x40, 0x11, 0xb8, 0x61, 0xda, 0x2c, 0xb5, 0x6e, 0xdd, 0x69, 0xff, 0x6d, 0x12, 0xe6, 0xea, + 0xc2, 0x09, 0xdd, 0x97, 0xc6, 0x13, 0x1f, 0x43, 0xbe, 0xe1, 0xb4, 0xa3, 0x8a, 0xb5, 0x9a, 0x5b, + 0x9b, 0xa9, 0xad, 0xc6, 0x7a, 0x33, 0xac, 0x75, 0xa4, 0xec, 0xfa, 0x32, 0x1c, 0x6c, 0xe7, 0xbf, + 0xfc, 0x7a, 0x65, 0x82, 0xd3, 0x18, 0x76, 0x0b, 0xe6, 0x0e, 0x3c, 0x7f, 0xa7, 0x1f, 0x3a, 0xd2, + 0x0b, 0xfc, 0x03, 0x65, 0xdc, 0x1c, 0xcf, 0x82, 0xc4, 0x72, 0x5e, 0xa5, 0x58, 0x39, 0xcd, 0x4a, + 0x83, 0xec, 0x2a, 0x14, 0xf6, 0xbd, 0xae, 0x27, 0x2b, 0x79, 0xea, 0x55, 0x02, 0xa2, 0x11, 0x6d, + 0x44, 0x41, 0xa1, 0x24, 0xb0, 0x32, 0xe4, 0x84, 0xdf, 0xaa, 0x14, 0x09, 0xc3, 0x26, 0xf2, 0x3e, + 0x45, 0x47, 0x57, 0xa6, 0xc9, 0xeb, 0x4a, 0x60, 0x6b, 0xb0, 0x50, 0xef, 0x39, 0x7e, 0x74, 0x2c, + 0x42, 0xfc, 0xad, 0x0b, 0x59, 0x29, 0xd1, 0x98, 0x61, 0xb8, 0xfa, 0x11, 0x94, 0xe2, 0x25, 0xa2, + 0xfa, 0x33, 0x31, 0xa0, 0x1d, 0x29, 0x71, 0x6c, 0xa2, 0xfa, 0x73, 0xa7, 0xd3, 0x17, 0x3a, 0x1e, + 0x94, 0xf0, 0xf1, 0xe4, 0x77, 0x2c, 0xfb, 0x2f, 0x39, 0x60, 0xca, 0x55, 0xdb, 0x18, 0x05, 0xc6, + 0xab, 0xf7, 0xa0, 0x14, 0x19, 0x07, 0xea, 0xad, 0x5d, 0x1a, 0xef, 0x5a, 0x9e, 0x10, 0x31, 0x2a, + 0x29, 0x96, 0xf6, 0x76, 0xf4, 0x44, 0x46, 0xc4, 0xc8, 0xa2, 0xa5, 0x1f, 0x3b, 0x6d, 0xa1, 0xfd, + 0x97, 0x00, 0xe8, 0xe1, 0x9e, 0xd3, 0x16, 0x51, 0x23, 0x50, 0xaa, 0xb5, 0x0f, 0xb3, 0x20, 0x46, + 0xae, 0xf0, 0xdd, 0xa0, 0xe5, 0xf9, 0x6d, 0x1d, 0x9c, 0xb1, 0x8c, 0x1a, 0x3c, 0xbf, 0x25, 0x5e, + 0xa1, 0xba, 0xba, 0xf7, 0x13, 0xa1, 0x7d, 0x9b, 0x05, 0x99, 0x0d, 0xb3, 0x32, 0x90, 0x4e, 0x87, + 0x0b, 0x37, 0x08, 0x5b, 0x51, 0x65, 0x8a, 0x48, 0x19, 0x0c, 0x39, 0x2d, 0x47, 0x3a, 0xbb, 0x66, + 0x26, 0xb5, 0x21, 0x19, 0x0c, 0xd7, 0x79, 0x2e, 0xc2, 0xc8, 0x0b, 0x7c, 0xda, 0x8f, 0x12, 0x37, + 0x22, 0x63, 0x90, 0x8f, 0x70, 0x7a, 0x58, 0xb5, 0xd6, 0xf2, 0x9c, 0xda, 0x78, 0x22, 0x5f, 0x04, + 0x81, 0x14, 0x21, 0x19, 0x36, 0x43, 0x73, 0xa6, 0x10, 0xb6, 0x03, 0xe5, 0x96, 0x68, 0x79, 0xae, + 0x23, 0x45, 0xeb, 0x51, 0xd0, 0xe9, 0x77, 0xfd, 0xa8, 0x32, 0x4b, 0xd1, 0x5c, 0x89, 0x5d, 0xbe, + 0x93, 0x25, 0xf0, 0x91, 0x11, 0xf6, 0x9f, 0x2d, 0x58, 0x18, 0x62, 0xb1, 0x7b, 0x50, 0x88, 0xdc, + 0xa0, 0xa7, 0x3c, 0x3e, 0x5f, 0x5b, 0xbe, 0x48, 0xdd, 0x7a, 0x1d, 0x59, 0x5c, 0x91, 0x71, 0x0d, + 0xbe, 0xd3, 0x35, 0xb1, 0x42, 0x6d, 0x76, 0x17, 0xf2, 0x72, 0xd0, 0x53, 0xa7, 0x7c, 0xbe, 0xf6, + 0xee, 0x85, 0x8a, 0x1a, 0x83, 0x9e, 0xe0, 0x44, 0xb5, 0x57, 0xa0, 0x40, 0x6a, 0xd9, 0x34, 0xe4, + 0xeb, 0xc7, 0x5b, 0x87, 0xe5, 0x09, 0x36, 0x0b, 0xd3, 0x7c, 0xb7, 0x7e, 0xf4, 0x9c, 0x3f, 0xda, + 0x2d, 0x5b, 0x36, 0x83, 0x3c, 0xd2, 0x19, 0x40, 0xb1, 0xde, 0xe0, 0x7b, 0x87, 0x8f, 0xcb, 0x13, + 0xf6, 0x2b, 0x98, 0x37, 0xd1, 0xa5, 0x13, 0xcc, 0x3d, 0x28, 0x52, 0x0e, 0x31, 0x27, 0xfc, 0x66, + 0x36, 0x73, 0x28, 0xf6, 0x81, 0x90, 0x0e, 0xee, 0x10, 0xd7, 0x5c, 0xb6, 0x39, 0x9c, 0x70, 0x86, + 0xa3, 0x77, 0x24, 0xdb, 0x7c, 0x31, 0x09, 0x57, 0xc6, 0x68, 0x1c, 0xce, 0xb4, 0xa5, 0x24, 0xd3, + 0xae, 0xc1, 0x42, 0x18, 0x04, 0xb2, 0x2e, 0xc2, 0x73, 0xcf, 0x15, 0x87, 0x89, 0xcb, 0x86, 0x61, + 0x8c, 0x4e, 0x84, 0x48, 0x3d, 0xf1, 0x54, 0xe2, 0xcd, 0x82, 0xec, 0x0e, 0x2c, 0xd2, 0x91, 0x68, + 0x78, 0x5d, 0xf1, 0xdc, 0xf7, 0x5e, 0x1d, 0x3a, 0x7e, 0x40, 0x27, 0x21, 0xcf, 0x47, 0x3b, 0x30, + 0xaa, 0x5a, 0x49, 0x4a, 0x52, 0xe9, 0x25, 0x85, 0xb0, 0xdb, 0x30, 0x15, 0xe9, 0x9c, 0x51, 0x24, + 0x0f, 0x94, 0x13, 0x0f, 0x28, 0x9c, 0x1b, 0x02, 0xbb, 0x03, 0xd3, 0xba, 0x89, 0x67, 0x22, 0x37, + 0x96, 0x1c, 0x33, 0xec, 0x9f, 0x59, 0x30, 0xa5, 0x51, 0xf6, 0x1e, 0x14, 0x10, 0x37, 0x9b, 0x33, + 0x97, 0x19, 0xc6, 0x55, 0x1f, 0xba, 0xb0, 0xeb, 0x48, 0xf7, 0xa5, 0x68, 0xe9, 0x04, 0x6b, 0x44, + 0xf6, 0x10, 0xc0, 0x91, 0x32, 0xf4, 0x9a, 0x7d, 0x29, 0x30, 0xaf, 0xa2, 0x8e, 0x1b, 0xb1, 0x0e, + 0x7d, 0x97, 0x9e, 0xdf, 0x5d, 0x7f, 0x26, 0x06, 0x27, 0x98, 0xb2, 0x78, 0x8a, 0x8e, 0x11, 0x9f, + 0xc7, 0x69, 0xd8, 0x12, 0x14, 0x71, 0xa2, 0x78, 0x87, 0xb4, 0x34, 0x36, 0x90, 0xc7, 0x3a, 0x39, + 0x77, 0x91, 0x93, 0x6f, 0xc1, 0x9c, 0x71, 0x29, 0xca, 0x91, 0xde, 0x8e, 0x2c, 0x38, 0xb4, 0x8a, + 0xc2, 0x37, 0x5b, 0xc5, 0xbf, 0x2c, 0x73, 0xa3, 0xe9, 0x90, 0xc4, 0xb8, 0xf2, 0xfc, 0xa8, 0x27, + 0x5c, 0x29, 0x5a, 0x0d, 0x13, 0xfa, 0x94, 0xf5, 0x87, 0x60, 0xf6, 0xff, 0x30, 0x1f, 0x43, 0xdb, + 0x03, 0x9c, 0x7c, 0x92, 0xec, 0x1b, 0x42, 0xd9, 0x2a, 0xcc, 0x50, 0x8e, 0xa3, 0x14, 0x6f, 0xee, + 0xaf, 0x34, 0x84, 0x0b, 0x75, 0x83, 0x6e, 0xaf, 0x23, 0xa4, 0x68, 0x3d, 0x0d, 0x9a, 0x91, 0xc9, + 0xc0, 0x19, 0x10, 0xb3, 0x38, 0x0d, 0x22, 0x86, 0x0a, 0xb9, 0x04, 0x40, 0xbb, 0x13, 0x95, 0xca, + 0x9c, 0x22, 0x99, 0x33, 0x0c, 0xdb, 0xef, 0xc3, 0xa2, 0x5a, 0x32, 0xde, 0x59, 0xe6, 0xca, 0xb9, + 0x6a, 0x92, 0x95, 0xda, 0x44, 0x25, 0xd8, 0x9b, 0xe6, 0x7a, 0x52, 0x54, 0x9d, 0x14, 0xaa, 0x30, + 0x2d, 0x9d, 0x36, 0x9e, 0x1a, 0x15, 0x79, 0x25, 0x1e, 0xcb, 0xf6, 0x53, 0xb8, 0x9a, 0x8c, 0x38, + 0xa9, 0xc5, 0x63, 0x6a, 0x50, 0x24, 0x95, 0x26, 0x56, 0xab, 0x43, 0x19, 0x41, 0xd1, 0x55, 0x26, + 0xd4, 0x4c, 0xfb, 0x61, 0xda, 0x50, 0xdd, 0x19, 0x87, 0x95, 0x95, 0x0a, 0x2b, 0x06, 0x79, 0x89, + 0x55, 0xc8, 0x24, 0x19, 0x43, 0x6d, 0xfb, 0x09, 0x2c, 0xc5, 0x83, 0x69, 0xdf, 0xa3, 0x74, 0xf5, + 0xa6, 0xcc, 0x8d, 0x73, 0x8a, 0x12, 0xd1, 0x09, 0x54, 0x70, 0x99, 0x8b, 0x9a, 0x04, 0xfb, 0x23, + 0xb8, 0x36, 0xa2, 0x49, 0xaf, 0x0a, 0xb7, 0xc4, 0x80, 0xda, 0x15, 0x09, 0x60, 0xdf, 0x83, 0x69, + 0x33, 0x84, 0x4c, 0x1c, 0xc4, 0xee, 0xa5, 0xf6, 0xf8, 0xba, 0xc0, 0xde, 0x87, 0xeb, 0x43, 0xd3, + 0xa5, 0xdc, 0xb8, 0x31, 0x3c, 0xe1, 0x4c, 0x6d, 0x31, 0x49, 0xc9, 0xba, 0x27, 0x6d, 0xc3, 0x36, + 0x14, 0x28, 0x5c, 0xd9, 0x03, 0x98, 0x6a, 0xd2, 0xb9, 0x37, 0xe3, 0x56, 0xe2, 0x71, 0xaa, 0xde, + 0x3d, 0xbf, 0xbb, 0xce, 0x45, 0x14, 0xf4, 0x43, 0x57, 0x50, 0x7d, 0xc3, 0x0d, 0xdf, 0x3e, 0x84, + 0xd9, 0xe3, 0x7e, 0x94, 0x5c, 0x0a, 0x9f, 0xc0, 0x9c, 0x08, 0xc3, 0x20, 0x8c, 0xb6, 0x07, 0x0d, + 0x5d, 0x7d, 0xe6, 0xd6, 0xe6, 0x53, 0xf7, 0x25, 0xb2, 0x77, 0x91, 0xc1, 0x85, 0x13, 0x05, 0x3e, + 0xcf, 0xd2, 0xed, 0x3f, 0x58, 0x50, 0x46, 0x0a, 0x85, 0xa3, 0xd9, 0x95, 0x0f, 0xe2, 0x9b, 0x06, + 0x77, 0x71, 0x76, 0xfb, 0x1d, 0xac, 0x14, 0xff, 0xf1, 0xf5, 0xca, 0xdc, 0x71, 0x28, 0x9c, 0x4e, + 0x27, 0x70, 0x15, 0xdb, 0x5c, 0x31, 0xdf, 0x82, 0x9c, 0xd7, 0x52, 0x49, 0xeb, 0x42, 0x2e, 0x32, + 0xd8, 0x7d, 0x00, 0x55, 0x22, 0xed, 0x38, 0xd2, 0xa9, 0xe4, 0x2f, 0xe3, 0xa7, 0x88, 0xf6, 0x81, + 0x32, 0x51, 0x79, 0x42, 0x9b, 0xf8, 0x5f, 0xb8, 0xf0, 0x16, 0x80, 0xae, 0xa6, 0x31, 0x23, 0x2c, + 0x65, 0x6e, 0xd5, 0x59, 0xb3, 0x28, 0xfb, 0x13, 0x28, 0xed, 0x7b, 0xfe, 0x59, 0xbd, 0xe3, 0xb9, + 0x78, 0xe9, 0x17, 0x3a, 0x9e, 0x7f, 0x66, 0xe6, 0xba, 0x31, 0x3a, 0x17, 0xce, 0xb1, 0x8e, 0x03, + 0xb8, 0x62, 0xda, 0x3f, 0xb5, 0x80, 0x21, 0x68, 0xae, 0xd7, 0xe4, 0x6c, 0xab, 0xb0, 0xb6, 0x52, + 0x61, 0x8d, 0xc7, 0xa0, 0x1d, 0x06, 0xfd, 0xde, 0xb6, 0x09, 0x77, 0x23, 0x22, 0xbf, 0x43, 0xc5, + 0xb4, 0xca, 0xcc, 0x4a, 0x48, 0x8a, 0xe9, 0xfc, 0x98, 0x62, 0xba, 0x10, 0x17, 0xd3, 0xf6, 0x2f, + 0x2c, 0xb8, 0x9e, 0x32, 0xa2, 0xde, 0xef, 0x76, 0x9d, 0x70, 0xf0, 0xbf, 0xb1, 0xe5, 0x8f, 0x16, + 0x5c, 0xc9, 0x38, 0x24, 0x39, 0xb7, 0x22, 0x92, 0x5e, 0x17, 0x6b, 0x27, 0xb2, 0x64, 0x9a, 0x27, + 0x00, 0x95, 0xcb, 0x3d, 0xc7, 0x7f, 0x14, 0xf4, 0x7d, 0xa9, 0x73, 0x7a, 0x02, 0x60, 0xda, 0xa7, + 0x70, 0xae, 0xc7, 0x14, 0x65, 0xda, 0x10, 0xca, 0xd6, 0x93, 0x22, 0x28, 0x4f, 0x3b, 0x78, 0x35, + 0x73, 0x3d, 0x8f, 0x94, 0x40, 0xdf, 0x85, 0x59, 0xee, 0xfc, 0xf8, 0x89, 0x17, 0xc9, 0xa0, 0x1d, + 0x3a, 0x5d, 0x0c, 0x92, 0x66, 0xdf, 0x3d, 0x13, 0x92, 0x0c, 0xcc, 0x73, 0x2d, 0xe1, 0xda, 0xdd, + 0x94, 0x65, 0x4a, 0xb0, 0x9f, 0xc2, 0xb4, 0xb9, 0xe0, 0xc6, 0xbc, 0x40, 0xee, 0xa4, 0x33, 0x4d, + 0xba, 0x1c, 0xa3, 0xa0, 0xfc, 0x74, 0xbf, 0x2e, 0x1d, 0xe9, 0xb9, 0x26, 0x03, 0xfd, 0xda, 0x82, + 0x99, 0x94, 0x89, 0x6c, 0x1b, 0x16, 0x3b, 0x8e, 0x14, 0xbe, 0x3b, 0x38, 0x7d, 0x69, 0xcc, 0xd3, + 0x51, 0xf9, 0x4e, 0xac, 0x29, 0x6d, 0x3b, 0x2f, 0x6b, 0x7e, 0xb2, 0x9a, 0xf7, 0xa1, 0x18, 0x89, + 0xd0, 0xd3, 0xc7, 0x3b, 0x9d, 0xb5, 0xe2, 0x7b, 0x59, 0x13, 0x70, 0xe1, 0x2a, 0x5f, 0x68, 0xc7, + 0x6a, 0xc9, 0xfe, 0x6b, 0x36, 0xba, 0x75, 0x60, 0x65, 0x77, 0xcb, 0x7a, 0xfb, 0x6e, 0x4d, 0x8e, + 0xdd, 0xad, 0xc4, 0xbe, 0xdc, 0xdb, 0xec, 0x2b, 0x43, 0xae, 0xf7, 0xe0, 0x81, 0x2e, 0x46, 0xb0, + 0xa9, 0x90, 0xfb, 0x14, 0x78, 0x84, 0xdc, 0x57, 0xc8, 0xa6, 0xbe, 0x81, 0xb1, 0x49, 0xc8, 0xfd, + 0x4d, 0x7a, 0xf4, 0x20, 0x72, 0x7f, 0xd3, 0xfe, 0x0c, 0xaa, 0xe3, 0xce, 0x89, 0x0e, 0xd1, 0x07, + 0x50, 0x8a, 0x08, 0xf2, 0xc4, 0x68, 0x0a, 0x18, 0x33, 0x2e, 0x61, 0xdb, 0xbf, 0xb1, 0x60, 0x2e, + 0xb3, 0xb1, 0x99, 0xdb, 0xa7, 0xa0, 0x6f, 0x9f, 0x59, 0xb0, 0x7c, 0x72, 0x46, 0x8e, 0x5b, 0x3e, + 0x4a, 0x2f, 0xc8, 0xdf, 0x16, 0xb7, 0x5e, 0xa0, 0xa4, 0x8a, 0x90, 0x12, 0xb7, 0x22, 0x94, 0x9a, + 0xb4, 0xb8, 0x69, 0x6e, 0x35, 0x51, 0x6a, 0xe9, 0x85, 0x59, 0x2d, 0xaa, 0xfe, 0xa4, 0x23, 0xfb, + 0xea, 0x39, 0x57, 0xe0, 0x5a, 0xc2, 0x19, 0xcf, 0x3c, 0xbf, 0x45, 0x0f, 0xb8, 0x02, 0xa7, 0xb6, + 0x2d, 0xd4, 0x83, 0x5a, 0x1b, 0x8e, 0x69, 0x16, 0xeb, 0xe8, 0x50, 0x44, 0xfd, 0x8e, 0x6c, 0x24, + 0x97, 0x63, 0x0a, 0xc1, 0xb2, 0x41, 0x49, 0x3a, 0x6c, 0xaa, 0x63, 0xcf, 0x10, 0x31, 0xb8, 0x66, + 0x62, 0x16, 0x5c, 0x1c, 0xe9, 0xc5, 0x30, 0xe9, 0x38, 0x4d, 0xd1, 0x49, 0xdd, 0xfb, 0x09, 0x80, + 0x76, 0x90, 0x70, 0x92, 0xba, 0x8f, 0x53, 0x08, 0xdb, 0x80, 0x49, 0x69, 0x42, 0x63, 0xe5, 0x62, + 0x1b, 0x8e, 0x03, 0xcf, 0x97, 0x7c, 0x52, 0x46, 0x78, 0x86, 0x96, 0xc6, 0x77, 0xd3, 0x66, 0x78, + 0xda, 0x88, 0x39, 0x4e, 0x6d, 0x8c, 0x8e, 0x73, 0xa7, 0x43, 0x13, 0x5b, 0x1c, 0x9b, 0x58, 0xcf, + 0x89, 0x57, 0xa2, 0xdb, 0xeb, 0x38, 0x61, 0x43, 0xbf, 0x80, 0x72, 0xf4, 0xad, 0x69, 0x18, 0x66, + 0xb7, 0xa1, 0x6c, 0x20, 0xf3, 0x45, 0x44, 0x07, 0xe7, 0x08, 0x6e, 0xff, 0xde, 0x82, 0x45, 0xfa, + 0xba, 0xc1, 0x1d, 0xbf, 0x2d, 0x2e, 0x4f, 0xca, 0x71, 0x92, 0xd5, 0x89, 0x26, 0x93, 0x64, 0xd5, + 0xd1, 0xa4, 0xaf, 0x27, 0xf8, 0xea, 0x96, 0xa2, 0xa7, 0xe7, 0xa4, 0x36, 0x26, 0xf4, 0xe8, 0xa5, + 0x13, 0xb6, 0xf6, 0x76, 0x74, 0x3a, 0x36, 0x22, 0x7a, 0x9a, 0x9a, 0xea, 0x30, 0xaa, 0x0f, 0x05, + 0x29, 0xc4, 0xde, 0x02, 0x96, 0x36, 0x50, 0x9f, 0x86, 0x6f, 0xc7, 0xc7, 0x53, 0x1d, 0x85, 0x2b, + 0x49, 0x06, 0xf3, 0xba, 0xa2, 0x4e, 0x5d, 0xe6, 0x80, 0xda, 0x5b, 0x50, 0xac, 0x3b, 0x58, 0x39, + 0xb3, 0xff, 0x83, 0x59, 0x74, 0x6f, 0x24, 0x9d, 0x6e, 0xef, 0xb4, 0x1b, 0xe9, 0x70, 0x9f, 0x89, + 0x31, 0xf5, 0xe5, 0x48, 0xa5, 0x46, 0x8b, 0x7c, 0xaf, 0x53, 0xe0, 0x6f, 0x2d, 0x80, 0x44, 0x33, + 0x7b, 0x00, 0x45, 0x0a, 0x86, 0xd1, 0x93, 0x38, 0xfa, 0xbe, 0xd0, 0xdf, 0xb8, 0xf4, 0x00, 0xb6, + 0x01, 0x53, 0x11, 0x19, 0x63, 0x32, 0xdf, 0x42, 0x12, 0x3e, 0x84, 0x6b, 0xbe, 0x61, 0xb1, 0x15, + 0x98, 0xe9, 0x85, 0x41, 0xf7, 0x54, 0x4f, 0xa8, 0x1e, 0xab, 0x80, 0xd0, 0x3e, 0x21, 0xb7, 0x7f, + 0x04, 0x0b, 0x43, 0x05, 0x16, 0x3e, 0xed, 0x0f, 0x8f, 0x4e, 0x77, 0x39, 0x3f, 0xe2, 0xe5, 0x09, + 0x76, 0x05, 0x16, 0x0e, 0xb6, 0x7e, 0x70, 0xba, 0xbf, 0x77, 0xb2, 0x7b, 0xda, 0xe0, 0x5b, 0x8f, + 0x76, 0xeb, 0x65, 0x0b, 0x41, 0x6a, 0x9f, 0x36, 0x8e, 0x8e, 0x4e, 0xf7, 0xb7, 0xf8, 0xe3, 0xdd, + 0xf2, 0x24, 0x5b, 0x84, 0xb9, 0xe7, 0x87, 0xcf, 0x0e, 0x8f, 0x3e, 0x3b, 0xd4, 0x83, 0x73, 0xb5, + 0x5f, 0x5a, 0x50, 0x44, 0xf5, 0x22, 0x64, 0xdf, 0x83, 0x52, 0x5c, 0xa6, 0xb1, 0xeb, 0x99, 0xea, + 0x2e, 0x5d, 0xba, 0x55, 0xdf, 0xc9, 0x74, 0x99, 0x3d, 0xb3, 0x27, 0xd8, 0x16, 0xcc, 0xc4, 0xe4, + 0x93, 0xda, 0x7f, 0xa2, 0xa2, 0xf6, 0x3b, 0x0b, 0xca, 0xfa, 0x0c, 0x3d, 0x16, 0xbe, 0x08, 0x1d, + 0x19, 0xc4, 0x86, 0x51, 0x8d, 0x35, 0xa4, 0x35, 0x5d, 0xb0, 0x5d, 0x6c, 0xd8, 0x1e, 0xc0, 0x63, + 0x21, 0xcd, 0xfd, 0x76, 0x63, 0xfc, 0x81, 0x56, 0x3a, 0x6e, 0x5e, 0x70, 0xda, 0x8d, 0x81, 0x5f, + 0xe4, 0x61, 0x0a, 0x03, 0xd6, 0x13, 0x21, 0x7b, 0x02, 0x73, 0xdf, 0xf7, 0xfc, 0x56, 0xfc, 0xdd, + 0x94, 0x8d, 0xf9, 0xd0, 0x6a, 0xf4, 0x56, 0xc7, 0x75, 0xa5, 0x3c, 0x37, 0x6b, 0xbe, 0xc4, 0xb8, + 0xc2, 0x97, 0xec, 0x82, 0xcf, 0x7f, 0xd5, 0x6b, 0x23, 0x78, 0xac, 0x62, 0x17, 0x66, 0x52, 0x9f, + 0x16, 0xd3, 0x8b, 0x1c, 0xf9, 0xe0, 0x78, 0x99, 0x9a, 0xc7, 0x00, 0xc9, 0x23, 0x8c, 0x8d, 0x7b, + 0xb6, 0x19, 0x25, 0x37, 0xc6, 0xf6, 0xc5, 0x8a, 0x9e, 0x99, 0x25, 0xa9, 0xd7, 0xdc, 0xa5, 0xaa, + 0xde, 0x1d, 0xfb, 0x3a, 0x4c, 0x29, 0x3b, 0x81, 0x85, 0xa1, 0x47, 0x12, 0x5b, 0x19, 0x1d, 0x93, + 0x79, 0xf7, 0x55, 0x57, 0x2f, 0x26, 0xc4, 0x7a, 0x7f, 0x98, 0x7a, 0x72, 0x9a, 0xc7, 0xd7, 0xdb, + 0x35, 0xdb, 0x17, 0x11, 0xd2, 0x36, 0xd7, 0x8e, 0xa0, 0x5c, 0x97, 0xa1, 0x70, 0xba, 0x9e, 0xdf, + 0x36, 0x11, 0xf3, 0x10, 0x8a, 0xfa, 0xfb, 0xea, 0x37, 0xdd, 0xe1, 0x4d, 0xab, 0xf6, 0x27, 0x0b, + 0xa6, 0x4c, 0x0c, 0x9f, 0x8e, 0xad, 0x8d, 0xec, 0xcb, 0x2a, 0x06, 0x3d, 0xc1, 0x7b, 0x97, 0x72, + 0xd2, 0x71, 0x90, 0xe4, 0xe5, 0xd4, 0xe6, 0x8d, 0xdc, 0x26, 0xa9, 0x38, 0x18, 0x4d, 0xe4, 0xf6, + 0xc4, 0x76, 0xe5, 0xcb, 0xd7, 0xcb, 0xd6, 0x57, 0xaf, 0x97, 0xad, 0x7f, 0xbe, 0x5e, 0xb6, 0x7e, + 0xf5, 0x66, 0x79, 0xe2, 0xab, 0x37, 0xcb, 0x13, 0x7f, 0x7f, 0xb3, 0x3c, 0xd1, 0x2c, 0xd2, 0x5f, + 0x2e, 0x1f, 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x94, 0x37, 0xa4, 0x49, 0xf3, 0x19, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// PusherClient is the client API for Pusher service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type PusherClient interface { + // different versions of PushBytes expect the trace data to be pushed in + // different formats + PushBytes(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) + PushBytesV2(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) +} + +type pusherClient struct { + cc *grpc.ClientConn +} + +func NewPusherClient(cc *grpc.ClientConn) PusherClient { + return &pusherClient{cc} +} + +func (c *pusherClient) PushBytes(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) { + out := new(PushResponse) + err := c.cc.Invoke(ctx, "/tempopb.Pusher/PushBytes", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QuerierServer).SearchTagsV2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.Querier/SearchTagsV2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).SearchTagsV2(ctx, req.(*SearchTagsRequest)) + return out, nil +} + +func (c *pusherClient) PushBytesV2(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) { + out := new(PushResponse) + err := c.cc.Invoke(ctx, "/tempopb.Pusher/PushBytesV2", in, out, opts...) + if err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Querier_SearchTagValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchTagValuesRequest) +// PusherServer is the server API for Pusher service. +type PusherServer interface { + // different versions of PushBytes expect the trace data to be pushed in + // different formats + PushBytes(context.Context, *PushBytesRequest) (*PushResponse, error) + PushBytesV2(context.Context, *PushBytesRequest) (*PushResponse, error) +} + +// UnimplementedPusherServer can be embedded to have forward compatible implementations. +type UnimplementedPusherServer struct { +} + +func (*UnimplementedPusherServer) PushBytes(ctx context.Context, req *PushBytesRequest) (*PushResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PushBytes not implemented") +} +func (*UnimplementedPusherServer) PushBytesV2(ctx context.Context, req *PushBytesRequest) (*PushResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PushBytesV2 not implemented") +} + +func RegisterPusherServer(s *grpc.Server, srv PusherServer) { + s.RegisterService(&_Pusher_serviceDesc, srv) +} + +func _Pusher_PushBytes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushBytesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QuerierServer).SearchTagValues(ctx, in) + return srv.(PusherServer).PushBytes(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tempopb.Querier/SearchTagValues", + FullMethod: "/tempopb.Pusher/PushBytes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).SearchTagValues(ctx, req.(*SearchTagValuesRequest)) + return srv.(PusherServer).PushBytes(ctx, req.(*PushBytesRequest)) } return interceptor(ctx, in, info, handler) } -func _Querier_SearchTagValuesV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchTagValuesRequest) +func _Pusher_PushBytesV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushBytesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QuerierServer).SearchTagValuesV2(ctx, in) + return srv.(PusherServer).PushBytesV2(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tempopb.Querier/SearchTagValuesV2", + FullMethod: "/tempopb.Pusher/PushBytesV2", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).SearchTagValuesV2(ctx, req.(*SearchTagValuesRequest)) + return srv.(PusherServer).PushBytesV2(ctx, req.(*PushBytesRequest)) } return interceptor(ctx, in, info, handler) } -var _Querier_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tempopb.Querier", - HandlerType: (*QuerierServer)(nil), +var _Pusher_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tempopb.Pusher", + HandlerType: (*PusherServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "FindTraceByID", - Handler: _Querier_FindTraceByID_Handler, - }, - { - MethodName: "SearchRecent", - Handler: _Querier_SearchRecent_Handler, - }, - { - MethodName: "SearchBlock", - Handler: _Querier_SearchBlock_Handler, - }, - { - MethodName: "SearchTags", - Handler: _Querier_SearchTags_Handler, - }, - { - MethodName: "SearchTagsV2", - Handler: _Querier_SearchTagsV2_Handler, - }, - { - MethodName: "SearchTagValues", - Handler: _Querier_SearchTagValues_Handler, + MethodName: "PushBytes", + Handler: _Pusher_PushBytes_Handler, }, { - MethodName: "SearchTagValuesV2", - Handler: _Querier_SearchTagValuesV2_Handler, + MethodName: "PushBytesV2", + Handler: _Pusher_PushBytesV2_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/tempopb/tempo.proto", } -// StreamingQuerierClient is the client API for StreamingQuerier service. +// MetricsGeneratorClient is the client API for MetricsGenerator service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type StreamingQuerierClient interface { - Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (StreamingQuerier_SearchClient, error) +type MetricsGeneratorClient interface { + PushSpans(ctx context.Context, in *PushSpansRequest, opts ...grpc.CallOption) (*PushResponse, error) + GetMetrics(ctx context.Context, in *SpanMetricsRequest, opts ...grpc.CallOption) (*SpanMetricsResponse, error) } -type streamingQuerierClient struct { +type metricsGeneratorClient struct { cc *grpc.ClientConn } -func NewStreamingQuerierClient(cc *grpc.ClientConn) StreamingQuerierClient { - return &streamingQuerierClient{cc} +func NewMetricsGeneratorClient(cc *grpc.ClientConn) MetricsGeneratorClient { + return &metricsGeneratorClient{cc} } -func (c *streamingQuerierClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (StreamingQuerier_SearchClient, error) { - stream, err := c.cc.NewStream(ctx, &_StreamingQuerier_serviceDesc.Streams[0], "/tempopb.StreamingQuerier/Search", opts...) +func (c *metricsGeneratorClient) PushSpans(ctx context.Context, in *PushSpansRequest, opts ...grpc.CallOption) (*PushResponse, error) { + out := new(PushResponse) + err := c.cc.Invoke(ctx, "/tempopb.MetricsGenerator/PushSpans", in, out, opts...) if err != nil { return nil, err } - x := &streamingQuerierSearchClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type StreamingQuerier_SearchClient interface { - Recv() (*SearchResponse, error) - grpc.ClientStream -} - -type streamingQuerierSearchClient struct { - grpc.ClientStream + return out, nil } -func (x *streamingQuerierSearchClient) Recv() (*SearchResponse, error) { - m := new(SearchResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { +func (c *metricsGeneratorClient) GetMetrics(ctx context.Context, in *SpanMetricsRequest, opts ...grpc.CallOption) (*SpanMetricsResponse, error) { + out := new(SpanMetricsResponse) + err := c.cc.Invoke(ctx, "/tempopb.MetricsGenerator/GetMetrics", in, out, opts...) + if err != nil { return nil, err } - return m, nil + return out, nil } -// StreamingQuerierServer is the server API for StreamingQuerier service. -type StreamingQuerierServer interface { - Search(*SearchRequest, StreamingQuerier_SearchServer) error +// MetricsGeneratorServer is the server API for MetricsGenerator service. +type MetricsGeneratorServer interface { + PushSpans(context.Context, *PushSpansRequest) (*PushResponse, error) + GetMetrics(context.Context, *SpanMetricsRequest) (*SpanMetricsResponse, error) } -// UnimplementedStreamingQuerierServer can be embedded to have forward compatible implementations. -type UnimplementedStreamingQuerierServer struct { +// UnimplementedMetricsGeneratorServer can be embedded to have forward compatible implementations. +type UnimplementedMetricsGeneratorServer struct { } -func (*UnimplementedStreamingQuerierServer) Search(req *SearchRequest, srv StreamingQuerier_SearchServer) error { - return status.Errorf(codes.Unimplemented, "method Search not implemented") +func (*UnimplementedMetricsGeneratorServer) PushSpans(ctx context.Context, req *PushSpansRequest) (*PushResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PushSpans not implemented") } - -func RegisterStreamingQuerierServer(s *grpc.Server, srv StreamingQuerierServer) { - s.RegisterService(&_StreamingQuerier_serviceDesc, srv) +func (*UnimplementedMetricsGeneratorServer) GetMetrics(ctx context.Context, req *SpanMetricsRequest) (*SpanMetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMetrics not implemented") } -func _StreamingQuerier_Search_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(SearchRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(StreamingQuerierServer).Search(m, &streamingQuerierSearchServer{stream}) +func RegisterMetricsGeneratorServer(s *grpc.Server, srv MetricsGeneratorServer) { + s.RegisterService(&_MetricsGenerator_serviceDesc, srv) } -type StreamingQuerier_SearchServer interface { - Send(*SearchResponse) error - grpc.ServerStream -} - -type streamingQuerierSearchServer struct { - grpc.ServerStream -} - -func (x *streamingQuerierSearchServer) Send(m *SearchResponse) error { - return x.ServerStream.SendMsg(m) -} - -var _StreamingQuerier_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tempopb.StreamingQuerier", - HandlerType: (*StreamingQuerierServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "Search", - Handler: _StreamingQuerier_Search_Handler, - ServerStreams: true, - }, - }, - Metadata: "pkg/tempopb/tempo.proto", -} - -// MetricsClient is the client API for Metrics service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MetricsClient interface { - SpanMetricsSummary(ctx context.Context, in *SpanMetricsSummaryRequest, opts ...grpc.CallOption) (*SpanMetricsSummaryResponse, error) -} - -type metricsClient struct { - cc *grpc.ClientConn -} - -func NewMetricsClient(cc *grpc.ClientConn) MetricsClient { - return &metricsClient{cc} -} - -func (c *metricsClient) SpanMetricsSummary(ctx context.Context, in *SpanMetricsSummaryRequest, opts ...grpc.CallOption) (*SpanMetricsSummaryResponse, error) { - out := new(SpanMetricsSummaryResponse) - err := c.cc.Invoke(ctx, "/tempopb.Metrics/SpanMetricsSummary", in, out, opts...) - if err != nil { +func _MetricsGenerator_PushSpans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushSpansRequest) + if err := dec(in); err != nil { return nil, err } - return out, nil -} - -// MetricsServer is the server API for Metrics service. -type MetricsServer interface { - SpanMetricsSummary(context.Context, *SpanMetricsSummaryRequest) (*SpanMetricsSummaryResponse, error) -} - -// UnimplementedMetricsServer can be embedded to have forward compatible implementations. -type UnimplementedMetricsServer struct { -} - -func (*UnimplementedMetricsServer) SpanMetricsSummary(ctx context.Context, req *SpanMetricsSummaryRequest) (*SpanMetricsSummaryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SpanMetricsSummary not implemented") -} - -func RegisterMetricsServer(s *grpc.Server, srv MetricsServer) { - s.RegisterService(&_Metrics_serviceDesc, srv) + if interceptor == nil { + return srv.(MetricsGeneratorServer).PushSpans(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.MetricsGenerator/PushSpans", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsGeneratorServer).PushSpans(ctx, req.(*PushSpansRequest)) + } + return interceptor(ctx, in, info, handler) } -func _Metrics_SpanMetricsSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SpanMetricsSummaryRequest) +func _MetricsGenerator_GetMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SpanMetricsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MetricsServer).SpanMetricsSummary(ctx, in) + return srv.(MetricsGeneratorServer).GetMetrics(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tempopb.Metrics/SpanMetricsSummary", + FullMethod: "/tempopb.MetricsGenerator/GetMetrics", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServer).SpanMetricsSummary(ctx, req.(*SpanMetricsSummaryRequest)) + return srv.(MetricsGeneratorServer).GetMetrics(ctx, req.(*SpanMetricsRequest)) } return interceptor(ctx, in, info, handler) } -var _Metrics_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tempopb.Metrics", - HandlerType: (*MetricsServer)(nil), +var _MetricsGenerator_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tempopb.MetricsGenerator", + HandlerType: (*MetricsGeneratorServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "SpanMetricsSummary", - Handler: _Metrics_SpanMetricsSummary_Handler, + MethodName: "PushSpans", + Handler: _MetricsGenerator_PushSpans_Handler, + }, + { + MethodName: "GetMetrics", + Handler: _MetricsGenerator_GetMetrics_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/tempopb/tempo.proto", } -func (m *TraceByIDRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +// QuerierClient is the client API for Querier service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QuerierClient interface { + FindTraceByID(ctx context.Context, in *TraceByIDRequest, opts ...grpc.CallOption) (*TraceByIDResponse, error) + SearchRecent(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) + SearchBlock(ctx context.Context, in *SearchBlockRequest, opts ...grpc.CallOption) (*SearchResponse, error) + SearchTags(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsResponse, error) + SearchTagsV2(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsV2Response, error) + SearchTagValues(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesResponse, error) + SearchTagValuesV2(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesV2Response, error) } -func (m *TraceByIDRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type querierClient struct { + cc *grpc.ClientConn } -func (m *TraceByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.QueryMode) > 0 { - i -= len(m.QueryMode) - copy(dAtA[i:], m.QueryMode) - i = encodeVarintTempo(dAtA, i, uint64(len(m.QueryMode))) - i-- - dAtA[i] = 0x2a - } - if len(m.BlockEnd) > 0 { - i -= len(m.BlockEnd) - copy(dAtA[i:], m.BlockEnd) - i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockEnd))) - i-- - dAtA[i] = 0x1a - } - if len(m.BlockStart) > 0 { - i -= len(m.BlockStart) - copy(dAtA[i:], m.BlockStart) - i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockStart))) - i-- - dAtA[i] = 0x12 - } - if len(m.TraceID) > 0 { - i -= len(m.TraceID) - copy(dAtA[i:], m.TraceID) - i = encodeVarintTempo(dAtA, i, uint64(len(m.TraceID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +func NewQuerierClient(cc *grpc.ClientConn) QuerierClient { + return &querierClient{cc} } -func (m *TraceByIDResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *querierClient) FindTraceByID(ctx context.Context, in *TraceByIDRequest, opts ...grpc.CallOption) (*TraceByIDResponse, error) { + out := new(TraceByIDResponse) + err := c.cc.Invoke(ctx, "/tempopb.Querier/FindTraceByID", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *TraceByIDResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *querierClient) SearchRecent(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) { + out := new(SearchResponse) + err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchRecent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *TraceByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Metrics != nil { - { - size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Trace != nil { - { - size, err := m.Trace.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (c *querierClient) SearchBlock(ctx context.Context, in *SearchBlockRequest, opts ...grpc.CallOption) (*SearchResponse, error) { + out := new(SearchResponse) + err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchBlock", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *TraceByIDMetrics) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *querierClient) SearchTags(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsResponse, error) { + out := new(SearchTagsResponse) + err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTags", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *TraceByIDMetrics) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *querierClient) SearchTagsV2(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsV2Response, error) { + out := new(SearchTagsV2Response) + err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTagsV2", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *TraceByIDMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (c *querierClient) SearchTagValues(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesResponse, error) { + out := new(SearchTagValuesResponse) + err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTagValues", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *SearchRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *querierClient) SearchTagValuesV2(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesV2Response, error) { + out := new(SearchTagValuesV2Response) + err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTagValuesV2", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *SearchRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// QuerierServer is the server API for Querier service. +type QuerierServer interface { + FindTraceByID(context.Context, *TraceByIDRequest) (*TraceByIDResponse, error) + SearchRecent(context.Context, *SearchRequest) (*SearchResponse, error) + SearchBlock(context.Context, *SearchBlockRequest) (*SearchResponse, error) + SearchTags(context.Context, *SearchTagsRequest) (*SearchTagsResponse, error) + SearchTagsV2(context.Context, *SearchTagsRequest) (*SearchTagsV2Response, error) + SearchTagValues(context.Context, *SearchTagValuesRequest) (*SearchTagValuesResponse, error) + SearchTagValuesV2(context.Context, *SearchTagValuesRequest) (*SearchTagValuesV2Response, error) } -func (m *SearchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SpansPerSpanSet != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.SpansPerSpanSet)) - i-- - dAtA[i] = 0x48 +// UnimplementedQuerierServer can be embedded to have forward compatible implementations. +type UnimplementedQuerierServer struct { +} + +func (*UnimplementedQuerierServer) FindTraceByID(ctx context.Context, req *TraceByIDRequest) (*TraceByIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindTraceByID not implemented") +} +func (*UnimplementedQuerierServer) SearchRecent(ctx context.Context, req *SearchRequest) (*SearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchRecent not implemented") +} +func (*UnimplementedQuerierServer) SearchBlock(ctx context.Context, req *SearchBlockRequest) (*SearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchBlock not implemented") +} +func (*UnimplementedQuerierServer) SearchTags(ctx context.Context, req *SearchTagsRequest) (*SearchTagsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchTags not implemented") +} +func (*UnimplementedQuerierServer) SearchTagsV2(ctx context.Context, req *SearchTagsRequest) (*SearchTagsV2Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchTagsV2 not implemented") +} +func (*UnimplementedQuerierServer) SearchTagValues(ctx context.Context, req *SearchTagValuesRequest) (*SearchTagValuesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchTagValues not implemented") +} +func (*UnimplementedQuerierServer) SearchTagValuesV2(ctx context.Context, req *SearchTagValuesRequest) (*SearchTagValuesV2Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchTagValuesV2 not implemented") +} + +func RegisterQuerierServer(s *grpc.Server, srv QuerierServer) { + s.RegisterService(&_Querier_serviceDesc, srv) +} + +func _Querier_FindTraceByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TraceByIDRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.Query) > 0 { - i -= len(m.Query) - copy(dAtA[i:], m.Query) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Query))) - i-- - dAtA[i] = 0x42 + if interceptor == nil { + return srv.(QuerierServer).FindTraceByID(ctx, in) } - if m.End != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.End)) - i-- - dAtA[i] = 0x30 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Querier/FindTraceByID", } - if m.Start != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Start)) - i-- - dAtA[i] = 0x28 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).FindTraceByID(ctx, req.(*TraceByIDRequest)) } - if m.Limit != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x20 + return interceptor(ctx, in, info, handler) +} + +func _Querier_SearchRecent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchRequest) + if err := dec(in); err != nil { + return nil, err } - if m.MaxDurationMs != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.MaxDurationMs)) - i-- - dAtA[i] = 0x18 + if interceptor == nil { + return srv.(QuerierServer).SearchRecent(ctx, in) } - if m.MinDurationMs != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.MinDurationMs)) - i-- - dAtA[i] = 0x10 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Querier/SearchRecent", } - if len(m.Tags) > 0 { - for k := range m.Tags { - v := m.Tags[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintTempo(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintTempo(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintTempo(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).SearchRecent(ctx, req.(*SearchRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *SearchBlockRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Querier_SearchBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchBlockRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QuerierServer).SearchBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Querier/SearchBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).SearchBlock(ctx, req.(*SearchBlockRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *SearchBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Querier_SearchTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchTagsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuerierServer).SearchTags(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Querier/SearchTags", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).SearchTags(ctx, req.(*SearchTagsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *SearchBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DedicatedColumns) > 0 { - for iNdEx := len(m.DedicatedColumns) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DedicatedColumns[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } +func _Querier_SearchTagsV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchTagsRequest) + if err := dec(in); err != nil { + return nil, err } - if m.FooterSize != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.FooterSize)) - i-- - dAtA[i] = 0x58 + if interceptor == nil { + return srv.(QuerierServer).SearchTagsV2(ctx, in) } - if m.Size_ != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Size_)) - i-- - dAtA[i] = 0x50 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Querier/SearchTagsV2", } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x4a + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).SearchTagsV2(ctx, req.(*SearchTagsRequest)) } - if len(m.DataEncoding) > 0 { - i -= len(m.DataEncoding) - copy(dAtA[i:], m.DataEncoding) - i = encodeVarintTempo(dAtA, i, uint64(len(m.DataEncoding))) - i-- - dAtA[i] = 0x42 + return interceptor(ctx, in, info, handler) +} + +func _Querier_SearchTagValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchTagValuesRequest) + if err := dec(in); err != nil { + return nil, err } - if m.TotalRecords != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.TotalRecords)) - i-- - dAtA[i] = 0x38 + if interceptor == nil { + return srv.(QuerierServer).SearchTagValues(ctx, in) } - if m.IndexPageSize != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.IndexPageSize)) - i-- - dAtA[i] = 0x30 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Querier/SearchTagValues", } - if len(m.Encoding) > 0 { - i -= len(m.Encoding) - copy(dAtA[i:], m.Encoding) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Encoding))) - i-- - dAtA[i] = 0x2a + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).SearchTagValues(ctx, req.(*SearchTagValuesRequest)) } - if m.PagesToSearch != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.PagesToSearch)) - i-- - dAtA[i] = 0x20 + return interceptor(ctx, in, info, handler) +} + +func _Querier_SearchTagValuesV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchTagValuesRequest) + if err := dec(in); err != nil { + return nil, err } - if m.StartPage != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.StartPage)) - i-- - dAtA[i] = 0x18 + if interceptor == nil { + return srv.(QuerierServer).SearchTagValuesV2(ctx, in) } - if len(m.BlockID) > 0 { - i -= len(m.BlockID) - copy(dAtA[i:], m.BlockID) - i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockID))) - i-- - dAtA[i] = 0x12 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Querier/SearchTagValuesV2", } - if m.SearchReq != nil { - { - size, err := m.SearchReq.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).SearchTagValuesV2(ctx, req.(*SearchTagValuesRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *DedicatedColumn) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +var _Querier_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tempopb.Querier", + HandlerType: (*QuerierServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FindTraceByID", + Handler: _Querier_FindTraceByID_Handler, + }, + { + MethodName: "SearchRecent", + Handler: _Querier_SearchRecent_Handler, + }, + { + MethodName: "SearchBlock", + Handler: _Querier_SearchBlock_Handler, + }, + { + MethodName: "SearchTags", + Handler: _Querier_SearchTags_Handler, + }, + { + MethodName: "SearchTagsV2", + Handler: _Querier_SearchTagsV2_Handler, + }, + { + MethodName: "SearchTagValues", + Handler: _Querier_SearchTagValues_Handler, + }, + { + MethodName: "SearchTagValuesV2", + Handler: _Querier_SearchTagValuesV2_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "pkg/tempopb/tempo.proto", } -func (m *DedicatedColumn) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// StreamingQuerierClient is the client API for StreamingQuerier service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type StreamingQuerierClient interface { + Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (StreamingQuerier_SearchClient, error) } -func (m *DedicatedColumn) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Scope != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Scope)) - i-- - dAtA[i] = 0x18 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if m.Type != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil +type streamingQuerierClient struct { + cc *grpc.ClientConn } -func (m *SearchResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func NewStreamingQuerierClient(cc *grpc.ClientConn) StreamingQuerierClient { + return &streamingQuerierClient{cc} +} + +func (c *streamingQuerierClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (StreamingQuerier_SearchClient, error) { + stream, err := c.cc.NewStream(ctx, &_StreamingQuerier_serviceDesc.Streams[0], "/tempopb.StreamingQuerier/Search", opts...) if err != nil { return nil, err } - return dAtA[:n], nil + x := &streamingQuerierSearchClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil } -func (m *SearchResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type StreamingQuerier_SearchClient interface { + Recv() (*SearchResponse, error) + grpc.ClientStream } -func (m *SearchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Metrics != nil { - { - size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Traces) > 0 { - for iNdEx := len(m.Traces) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Traces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil +type streamingQuerierSearchClient struct { + grpc.ClientStream } -func (m *TraceSearchMetadata) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func (x *streamingQuerierSearchClient) Recv() (*SearchResponse, error) { + m := new(SearchResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } - return dAtA[:n], nil + return m, nil } -func (m *TraceSearchMetadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// StreamingQuerierServer is the server API for StreamingQuerier service. +type StreamingQuerierServer interface { + Search(*SearchRequest, StreamingQuerier_SearchServer) error } -func (m *TraceSearchMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpanSets) > 0 { - for iNdEx := len(m.SpanSets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SpanSets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.SpanSet != nil { - { - size, err := m.SpanSet.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.DurationMs != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.DurationMs)) - i-- - dAtA[i] = 0x28 - } - if m.StartTimeUnixNano != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x20 - } - if len(m.RootTraceName) > 0 { - i -= len(m.RootTraceName) - copy(dAtA[i:], m.RootTraceName) - i = encodeVarintTempo(dAtA, i, uint64(len(m.RootTraceName))) - i-- - dAtA[i] = 0x1a - } - if len(m.RootServiceName) > 0 { - i -= len(m.RootServiceName) - copy(dAtA[i:], m.RootServiceName) - i = encodeVarintTempo(dAtA, i, uint64(len(m.RootServiceName))) - i-- - dAtA[i] = 0x12 - } - if len(m.TraceID) > 0 { - i -= len(m.TraceID) - copy(dAtA[i:], m.TraceID) - i = encodeVarintTempo(dAtA, i, uint64(len(m.TraceID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +// UnimplementedStreamingQuerierServer can be embedded to have forward compatible implementations. +type UnimplementedStreamingQuerierServer struct { } -func (m *SpanSet) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (*UnimplementedStreamingQuerierServer) Search(req *SearchRequest, srv StreamingQuerier_SearchServer) error { + return status.Errorf(codes.Unimplemented, "method Search not implemented") } -func (m *SpanSet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func RegisterStreamingQuerierServer(s *grpc.Server, srv StreamingQuerierServer) { + s.RegisterService(&_StreamingQuerier_serviceDesc, srv) } -func (m *SpanSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Matched != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Matched)) - i-- - dAtA[i] = 0x10 +func _StreamingQuerier_Search_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SearchRequest) + if err := stream.RecvMsg(m); err != nil { + return err } - if len(m.Spans) > 0 { - for iNdEx := len(m.Spans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Spans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + return srv.(StreamingQuerierServer).Search(m, &streamingQuerierSearchServer{stream}) +} + +type StreamingQuerier_SearchServer interface { + Send(*SearchResponse) error + grpc.ServerStream +} + +type streamingQuerierSearchServer struct { + grpc.ServerStream +} + +func (x *streamingQuerierSearchServer) Send(m *SearchResponse) error { + return x.ServerStream.SendMsg(m) +} + +var _StreamingQuerier_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tempopb.StreamingQuerier", + HandlerType: (*StreamingQuerierServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Search", + Handler: _StreamingQuerier_Search_Handler, + ServerStreams: true, + }, + }, + Metadata: "pkg/tempopb/tempo.proto", +} + +// MetricsClient is the client API for Metrics service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MetricsClient interface { + SpanMetricsSummary(ctx context.Context, in *SpanMetricsSummaryRequest, opts ...grpc.CallOption) (*SpanMetricsSummaryResponse, error) + QueryRange(ctx context.Context, in *QueryRangeRequest, opts ...grpc.CallOption) (*QueryRangeResponse, error) +} + +type metricsClient struct { + cc *grpc.ClientConn +} + +func NewMetricsClient(cc *grpc.ClientConn) MetricsClient { + return &metricsClient{cc} +} + +func (c *metricsClient) SpanMetricsSummary(ctx context.Context, in *SpanMetricsSummaryRequest, opts ...grpc.CallOption) (*SpanMetricsSummaryResponse, error) { + out := new(SpanMetricsSummaryResponse) + err := c.cc.Invoke(ctx, "/tempopb.Metrics/SpanMetricsSummary", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *Span) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *metricsClient) QueryRange(ctx context.Context, in *QueryRangeRequest, opts ...grpc.CallOption) (*QueryRangeResponse, error) { + out := new(QueryRangeResponse) + err := c.cc.Invoke(ctx, "/tempopb.Metrics/QueryRange", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *Span) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// MetricsServer is the server API for Metrics service. +type MetricsServer interface { + SpanMetricsSummary(context.Context, *SpanMetricsSummaryRequest) (*SpanMetricsSummaryResponse, error) + QueryRange(context.Context, *QueryRangeRequest) (*QueryRangeResponse, error) } -func (m *Span) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } +// UnimplementedMetricsServer can be embedded to have forward compatible implementations. +type UnimplementedMetricsServer struct { +} + +func (*UnimplementedMetricsServer) SpanMetricsSummary(ctx context.Context, req *SpanMetricsSummaryRequest) (*SpanMetricsSummaryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SpanMetricsSummary not implemented") +} +func (*UnimplementedMetricsServer) QueryRange(ctx context.Context, req *QueryRangeRequest) (*QueryRangeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryRange not implemented") +} + +func RegisterMetricsServer(s *grpc.Server, srv MetricsServer) { + s.RegisterService(&_Metrics_serviceDesc, srv) +} + +func _Metrics_SpanMetricsSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SpanMetricsSummaryRequest) + if err := dec(in); err != nil { + return nil, err } - if m.DurationNanos != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.DurationNanos)) - i-- - dAtA[i] = 0x20 + if interceptor == nil { + return srv.(MetricsServer).SpanMetricsSummary(ctx, in) } - if m.StartTimeUnixNano != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x18 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Metrics/SpanMetricsSummary", } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsServer).SpanMetricsSummary(ctx, req.(*SpanMetricsSummaryRequest)) } - if len(m.SpanID) > 0 { - i -= len(m.SpanID) - copy(dAtA[i:], m.SpanID) - i = encodeVarintTempo(dAtA, i, uint64(len(m.SpanID))) - i-- - dAtA[i] = 0xa + return interceptor(ctx, in, info, handler) +} + +func _Metrics_QueryRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRangeRequest) + if err := dec(in); err != nil { + return nil, err } - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(MetricsServer).QueryRange(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Metrics/QueryRange", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsServer).QueryRange(ctx, req.(*QueryRangeRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *SearchMetrics) Marshal() (dAtA []byte, err error) { +var _Metrics_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tempopb.Metrics", + HandlerType: (*MetricsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SpanMetricsSummary", + Handler: _Metrics_SpanMetricsSummary_Handler, + }, + { + MethodName: "QueryRange", + Handler: _Metrics_QueryRange_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "pkg/tempopb/tempo.proto", +} + +func (m *TraceByIDRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3659,50 +3560,48 @@ func (m *SearchMetrics) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchMetrics) MarshalTo(dAtA []byte) (int, error) { +func (m *TraceByIDRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SearchMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TraceByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.TotalBlockBytes != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.TotalBlockBytes)) - i-- - dAtA[i] = 0x30 - } - if m.TotalJobs != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.TotalJobs)) - i-- - dAtA[i] = 0x28 - } - if m.CompletedJobs != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.CompletedJobs)) + if len(m.QueryMode) > 0 { + i -= len(m.QueryMode) + copy(dAtA[i:], m.QueryMode) + i = encodeVarintTempo(dAtA, i, uint64(len(m.QueryMode))) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x2a } - if m.TotalBlocks != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.TotalBlocks)) + if len(m.BlockEnd) > 0 { + i -= len(m.BlockEnd) + copy(dAtA[i:], m.BlockEnd) + i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockEnd))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x1a } - if m.InspectedBytes != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.InspectedBytes)) + if len(m.BlockStart) > 0 { + i -= len(m.BlockStart) + copy(dAtA[i:], m.BlockStart) + i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockStart))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.InspectedTraces != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.InspectedTraces)) + if len(m.TraceID) > 0 { + i -= len(m.TraceID) + copy(dAtA[i:], m.TraceID) + i = encodeVarintTempo(dAtA, i, uint64(len(m.TraceID))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *SearchTagsRequest) Marshal() (dAtA []byte, err error) { +func (m *TraceByIDResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3712,28 +3611,45 @@ func (m *SearchTagsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchTagsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *TraceByIDResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SearchTagsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TraceByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Scope) > 0 { - i -= len(m.Scope) - copy(dAtA[i:], m.Scope) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Scope))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SearchTagsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() + if m.Metrics != nil { + { + size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Trace != nil { + { + size, err := m.Trace.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TraceByIDMetrics) Marshal() (dAtA []byte, err error) { + size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { @@ -3742,29 +3658,20 @@ func (m *SearchTagsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchTagsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *TraceByIDMetrics) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SearchTagsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TraceByIDMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.TagNames) > 0 { - for iNdEx := len(m.TagNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.TagNames[iNdEx]) - copy(dAtA[i:], m.TagNames[iNdEx]) - i = encodeVarintTempo(dAtA, i, uint64(len(m.TagNames[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } return len(dAtA) - i, nil } -func (m *SearchTagsV2Response) Marshal() (dAtA []byte, err error) { +func (m *SearchRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3774,26 +3681,68 @@ func (m *SearchTagsV2Response) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchTagsV2Response) MarshalTo(dAtA []byte) (int, error) { +func (m *SearchRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SearchTagsV2Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SearchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Scopes) > 0 { - for iNdEx := len(m.Scopes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Scopes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } + if m.SpansPerSpanSet != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.SpansPerSpanSet)) + i-- + dAtA[i] = 0x48 + } + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Query))) + i-- + dAtA[i] = 0x42 + } + if m.End != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.End)) + i-- + dAtA[i] = 0x30 + } + if m.Start != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Start)) + i-- + dAtA[i] = 0x28 + } + if m.Limit != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x20 + } + if m.MaxDurationMs != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.MaxDurationMs)) + i-- + dAtA[i] = 0x18 + } + if m.MinDurationMs != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.MinDurationMs)) + i-- + dAtA[i] = 0x10 + } + if len(m.Tags) > 0 { + for k := range m.Tags { + v := m.Tags[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintTempo(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintTempo(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintTempo(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } @@ -3801,7 +3750,7 @@ func (m *SearchTagsV2Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SearchTagsV2Scope) Marshal() (dAtA []byte, err error) { +func (m *SearchBlockRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3811,36 +3760,104 @@ func (m *SearchTagsV2Scope) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchTagsV2Scope) MarshalTo(dAtA []byte) (int, error) { +func (m *SearchBlockRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SearchTagsV2Scope) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SearchBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Tags) > 0 { - for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Tags[iNdEx]) - copy(dAtA[i:], m.Tags[iNdEx]) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Tags[iNdEx]))) + if len(m.DedicatedColumns) > 0 { + for iNdEx := len(m.DedicatedColumns) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DedicatedColumns[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x62 } } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Name))) + if m.FooterSize != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.FooterSize)) + i-- + dAtA[i] = 0x58 + } + if m.Size_ != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Size_)) + i-- + dAtA[i] = 0x50 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x4a + } + if len(m.DataEncoding) > 0 { + i -= len(m.DataEncoding) + copy(dAtA[i:], m.DataEncoding) + i = encodeVarintTempo(dAtA, i, uint64(len(m.DataEncoding))) + i-- + dAtA[i] = 0x42 + } + if m.TotalRecords != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.TotalRecords)) + i-- + dAtA[i] = 0x38 + } + if m.IndexPageSize != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.IndexPageSize)) + i-- + dAtA[i] = 0x30 + } + if len(m.Encoding) > 0 { + i -= len(m.Encoding) + copy(dAtA[i:], m.Encoding) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Encoding))) + i-- + dAtA[i] = 0x2a + } + if m.PagesToSearch != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.PagesToSearch)) + i-- + dAtA[i] = 0x20 + } + if m.StartPage != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.StartPage)) + i-- + dAtA[i] = 0x18 + } + if len(m.BlockID) > 0 { + i -= len(m.BlockID) + copy(dAtA[i:], m.BlockID) + i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockID))) + i-- + dAtA[i] = 0x12 + } + if m.SearchReq != nil { + { + size, err := m.SearchReq.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *SearchTagValuesRequest) Marshal() (dAtA []byte, err error) { +func (m *DedicatedColumn) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3850,34 +3867,37 @@ func (m *SearchTagValuesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchTagValuesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *DedicatedColumn) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SearchTagValuesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DedicatedColumn) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Query) > 0 { - i -= len(m.Query) - copy(dAtA[i:], m.Query) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Query))) + if m.Scope != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Scope)) + i-- + dAtA[i] = 0x18 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x12 } - if len(m.TagName) > 0 { - i -= len(m.TagName) - copy(dAtA[i:], m.TagName) - i = encodeVarintTempo(dAtA, i, uint64(len(m.TagName))) + if m.Type != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Type)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *SearchTagValuesResponse) Marshal() (dAtA []byte, err error) { +func (m *SearchResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3887,29 +3907,46 @@ func (m *SearchTagValuesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchTagValuesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *SearchResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SearchTagValuesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SearchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.TagValues) > 0 { - for iNdEx := len(m.TagValues) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.TagValues[iNdEx]) - copy(dAtA[i:], m.TagValues[iNdEx]) - i = encodeVarintTempo(dAtA, i, uint64(len(m.TagValues[iNdEx]))) - i-- - dAtA[i] = 0xa + if m.Metrics != nil { + { + size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } - return len(dAtA) - i, nil -} + if len(m.Traces) > 0 { + for iNdEx := len(m.Traces) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Traces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} -func (m *TagValue) Marshal() (dAtA []byte, err error) { +func (m *TraceSearchMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3919,34 +3956,77 @@ func (m *TagValue) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TagValue) MarshalTo(dAtA []byte) (int, error) { +func (m *TraceSearchMetadata) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TagValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TraceSearchMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Value))) + if len(m.SpanSets) > 0 { + for iNdEx := len(m.SpanSets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpanSets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if m.SpanSet != nil { + { + size, err := m.SpanSet.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.DurationMs != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.DurationMs)) + i-- + dAtA[i] = 0x28 + } + if m.StartTimeUnixNano != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.StartTimeUnixNano)) + i-- + dAtA[i] = 0x20 + } + if len(m.RootTraceName) > 0 { + i -= len(m.RootTraceName) + copy(dAtA[i:], m.RootTraceName) + i = encodeVarintTempo(dAtA, i, uint64(len(m.RootTraceName))) + i-- + dAtA[i] = 0x1a + } + if len(m.RootServiceName) > 0 { + i -= len(m.RootServiceName) + copy(dAtA[i:], m.RootServiceName) + i = encodeVarintTempo(dAtA, i, uint64(len(m.RootServiceName))) i-- dAtA[i] = 0x12 } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Type))) + if len(m.TraceID) > 0 { + i -= len(m.TraceID) + copy(dAtA[i:], m.TraceID) + i = encodeVarintTempo(dAtA, i, uint64(len(m.TraceID))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *SearchTagValuesV2Response) Marshal() (dAtA []byte, err error) { +func (m *SpanSet) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3956,20 +4036,39 @@ func (m *SearchTagValuesV2Response) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchTagValuesV2Response) MarshalTo(dAtA []byte) (int, error) { +func (m *SpanSet) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SearchTagValuesV2Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SpanSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.TagValues) > 0 { - for iNdEx := len(m.TagValues) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.TagValues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Matched != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Matched)) + i-- + dAtA[i] = 0x10 + } + if len(m.Spans) > 0 { + for iNdEx := len(m.Spans) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Spans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3983,7 +4082,7 @@ func (m *SearchTagValuesV2Response) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *Trace) Marshal() (dAtA []byte, err error) { +func (m *Span) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3993,20 +4092,20 @@ func (m *Trace) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Trace) MarshalTo(dAtA []byte) (int, error) { +func (m *Span) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Trace) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Span) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Batches) > 0 { - for iNdEx := len(m.Batches) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Batches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4014,13 +4113,37 @@ func (m *Trace) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTempo(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x2a } } + if m.DurationNanos != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.DurationNanos)) + i-- + dAtA[i] = 0x20 + } + if m.StartTimeUnixNano != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.StartTimeUnixNano)) + i-- + dAtA[i] = 0x18 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpanID) > 0 { + i -= len(m.SpanID) + copy(dAtA[i:], m.SpanID) + i = encodeVarintTempo(dAtA, i, uint64(len(m.SpanID))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *PushResponse) Marshal() (dAtA []byte, err error) { +func (m *SearchMetrics) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4030,38 +4153,50 @@ func (m *PushResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PushResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *SearchMetrics) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PushResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SearchMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.ErrorsByTrace) > 0 { - dAtA7 := make([]byte, len(m.ErrorsByTrace)*10) - var j6 int - for _, num := range m.ErrorsByTrace { - for num >= 1<<7 { - dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j6++ - } - dAtA7[j6] = uint8(num) - j6++ - } - i -= j6 - copy(dAtA[i:], dAtA7[:j6]) - i = encodeVarintTempo(dAtA, i, uint64(j6)) + if m.TotalBlockBytes != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.TotalBlockBytes)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x30 + } + if m.TotalJobs != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.TotalJobs)) + i-- + dAtA[i] = 0x28 + } + if m.CompletedJobs != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.CompletedJobs)) + i-- + dAtA[i] = 0x20 + } + if m.TotalBlocks != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.TotalBlocks)) + i-- + dAtA[i] = 0x18 + } + if m.InspectedBytes != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.InspectedBytes)) + i-- + dAtA[i] = 0x10 + } + if m.InspectedTraces != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.InspectedTraces)) + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *PushBytesRequest) Marshal() (dAtA []byte, err error) { +func (m *SearchTagsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4071,62 +4206,27 @@ func (m *PushBytesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PushBytesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *SearchTagsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PushBytesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SearchTagsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.SearchData) > 0 { - for iNdEx := len(m.SearchData) - 1; iNdEx >= 0; iNdEx-- { - { - size := m.SearchData[iNdEx].Size() - i -= size - if _, err := m.SearchData[iNdEx].MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Ids) > 0 { - for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { - { - size := m.Ids[iNdEx].Size() - i -= size - if _, err := m.Ids[iNdEx].MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Traces) > 0 { - for iNdEx := len(m.Traces) - 1; iNdEx >= 0; iNdEx-- { - { - size := m.Traces[iNdEx].Size() - i -= size - if _, err := m.Traces[iNdEx].MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } + if len(m.Scope) > 0 { + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *PushSpansRequest) Marshal() (dAtA []byte, err error) { +func (m *SearchTagsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4136,58 +4236,21 @@ func (m *PushSpansRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PushSpansRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PushSpansRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Batches) > 0 { - for iNdEx := len(m.Batches) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Batches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TraceBytes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TraceBytes) MarshalTo(dAtA []byte) (int, error) { +func (m *SearchTagsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TraceBytes) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SearchTagsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Traces) > 0 { - for iNdEx := len(m.Traces) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Traces[iNdEx]) - copy(dAtA[i:], m.Traces[iNdEx]) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Traces[iNdEx]))) + if len(m.TagNames) > 0 { + for iNdEx := len(m.TagNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TagNames[iNdEx]) + copy(dAtA[i:], m.TagNames[iNdEx]) + i = encodeVarintTempo(dAtA, i, uint64(len(m.TagNames[iNdEx]))) i-- dAtA[i] = 0xa } @@ -4195,7 +4258,7 @@ func (m *TraceBytes) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *LinkSlice) Marshal() (dAtA []byte, err error) { +func (m *SearchTagsV2Response) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4205,20 +4268,20 @@ func (m *LinkSlice) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *LinkSlice) MarshalTo(dAtA []byte) (int, error) { +func (m *SearchTagsV2Response) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *LinkSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SearchTagsV2Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Links) > 0 { - for iNdEx := len(m.Links) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Scopes) > 0 { + for iNdEx := len(m.Scopes) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Links[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Scopes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4232,7 +4295,7 @@ func (m *LinkSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SpanMetricsRequest) Marshal() (dAtA []byte, err error) { +func (m *SearchTagsV2Scope) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4242,49 +4305,36 @@ func (m *SpanMetricsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SpanMetricsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *SearchTagsV2Scope) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SpanMetricsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SearchTagsV2Scope) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.End != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.End)) - i-- - dAtA[i] = 0x28 - } - if m.Start != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Start)) - i-- - dAtA[i] = 0x20 - } - if m.Limit != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x18 - } - if len(m.GroupBy) > 0 { - i -= len(m.GroupBy) - copy(dAtA[i:], m.GroupBy) - i = encodeVarintTempo(dAtA, i, uint64(len(m.GroupBy))) - i-- - dAtA[i] = 0x12 + if len(m.Tags) > 0 { + for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Tags[iNdEx]) + copy(dAtA[i:], m.Tags[iNdEx]) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Tags[iNdEx]))) + i-- + dAtA[i] = 0x12 + } } - if len(m.Query) > 0 { - i -= len(m.Query) - copy(dAtA[i:], m.Query) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Query))) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *SpanMetricsSummaryRequest) Marshal() (dAtA []byte, err error) { +func (m *SearchTagValuesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4294,49 +4344,34 @@ func (m *SpanMetricsSummaryRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SpanMetricsSummaryRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *SearchTagValuesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SpanMetricsSummaryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SearchTagValuesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.End != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.End)) - i-- - dAtA[i] = 0x28 - } - if m.Start != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Start)) - i-- - dAtA[i] = 0x20 - } - if m.Limit != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x18 - } - if len(m.GroupBy) > 0 { - i -= len(m.GroupBy) - copy(dAtA[i:], m.GroupBy) - i = encodeVarintTempo(dAtA, i, uint64(len(m.GroupBy))) - i-- - dAtA[i] = 0x12 - } if len(m.Query) > 0 { i -= len(m.Query) copy(dAtA[i:], m.Query) i = encodeVarintTempo(dAtA, i, uint64(len(m.Query))) i-- + dAtA[i] = 0x12 + } + if len(m.TagName) > 0 { + i -= len(m.TagName) + copy(dAtA[i:], m.TagName) + i = encodeVarintTempo(dAtA, i, uint64(len(m.TagName))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *SpanMetricsResponse) Marshal() (dAtA []byte, err error) { +func (m *SearchTagValuesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4346,54 +4381,29 @@ func (m *SpanMetricsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SpanMetricsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *SearchTagValuesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SpanMetricsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SearchTagValuesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Metrics) > 0 { - for iNdEx := len(m.Metrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Metrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } + if len(m.TagValues) > 0 { + for iNdEx := len(m.TagValues) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TagValues[iNdEx]) + copy(dAtA[i:], m.TagValues[iNdEx]) + i = encodeVarintTempo(dAtA, i, uint64(len(m.TagValues[iNdEx]))) i-- - dAtA[i] = 0x22 - } - } - if m.ErrorSpanCount != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.ErrorSpanCount)) - i-- - dAtA[i] = 0x18 - } - if m.SpanCount != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.SpanCount)) - i-- - dAtA[i] = 0x10 - } - if m.Estimated { - i-- - if m.Estimated { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *RawHistogram) Marshal() (dAtA []byte, err error) { +func (m *TagValue) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4403,30 +4413,34 @@ func (m *RawHistogram) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RawHistogram) MarshalTo(dAtA []byte) (int, error) { +func (m *TagValue) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *RawHistogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TagValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Count != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Count)) + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Value))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.Bucket != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Bucket)) + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Type))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *KeyValue) Marshal() (dAtA []byte, err error) { +func (m *SearchTagValuesV2Response) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4436,39 +4450,34 @@ func (m *KeyValue) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) { +func (m *SearchTagValuesV2Response) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *KeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SearchTagValuesV2Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.TagValues) > 0 { + for iNdEx := len(m.TagValues) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TagValues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *SpanMetrics) Marshal() (dAtA []byte, err error) { +func (m *Trace) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4478,25 +4487,20 @@ func (m *SpanMetrics) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SpanMetrics) MarshalTo(dAtA []byte) (int, error) { +func (m *Trace) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SpanMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Trace) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Errors != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Errors)) - i-- - dAtA[i] = 0x18 - } - if len(m.Series) > 0 { - for iNdEx := len(m.Series) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Batches) > 0 { + for iNdEx := len(m.Batches) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Series[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Batches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4504,27 +4508,119 @@ func (m *SpanMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTempo(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0xa } } - if len(m.LatencyHistogram) > 0 { - for iNdEx := len(m.LatencyHistogram) - 1; iNdEx >= 0; iNdEx-- { + return len(dAtA) - i, nil +} + +func (m *PushResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PushResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PushResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ErrorsByTrace) > 0 { + dAtA7 := make([]byte, len(m.ErrorsByTrace)*10) + var j6 int + for _, num := range m.ErrorsByTrace { + for num >= 1<<7 { + dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j6++ + } + dAtA7[j6] = uint8(num) + j6++ + } + i -= j6 + copy(dAtA[i:], dAtA7[:j6]) + i = encodeVarintTempo(dAtA, i, uint64(j6)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PushBytesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PushBytesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PushBytesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SearchData) > 0 { + for iNdEx := len(m.SearchData) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.LatencyHistogram[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { + size := m.SearchData[iNdEx].Size() + i -= size + if _, err := m.SearchData[iNdEx].MarshalTo(dAtA[i:]); err != nil { return 0, err } + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Ids) > 0 { + for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.Ids[iNdEx].Size() i -= size + if _, err := m.Ids[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } i = encodeVarintTempo(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x1a + } + } + if len(m.Traces) > 0 { + for iNdEx := len(m.Traces) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.Traces[iNdEx].Size() + i -= size + if _, err := m.Traces[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } return len(dAtA) - i, nil } -func (m *SpanMetricsSummary) Marshal() (dAtA []byte, err error) { +func (m *PushSpansRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4534,40 +4630,20 @@ func (m *SpanMetricsSummary) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SpanMetricsSummary) MarshalTo(dAtA []byte) (int, error) { +func (m *PushSpansRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SpanMetricsSummary) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PushSpansRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.P50 != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.P50)) - i-- - dAtA[i] = 0x38 - } - if m.P90 != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.P90)) - i-- - dAtA[i] = 0x30 - } - if m.P95 != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.P95)) - i-- - dAtA[i] = 0x28 - } - if m.P99 != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.P99)) - i-- - dAtA[i] = 0x20 - } - if len(m.Series) > 0 { - for iNdEx := len(m.Series) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Batches) > 0 { + for iNdEx := len(m.Batches) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Series[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Batches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4575,23 +4651,45 @@ func (m *SpanMetricsSummary) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTempo(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0xa } } - if m.ErrorSpanCount != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.ErrorSpanCount)) - i-- - dAtA[i] = 0x10 + return len(dAtA) - i, nil +} + +func (m *TraceBytes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if m.SpanCount != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.SpanCount)) - i-- - dAtA[i] = 0x8 + return dAtA[:n], nil +} + +func (m *TraceBytes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceBytes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Traces) > 0 { + for iNdEx := len(m.Traces) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Traces[iNdEx]) + copy(dAtA[i:], m.Traces[iNdEx]) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Traces[iNdEx]))) + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *SpanMetricsSummaryResponse) Marshal() (dAtA []byte, err error) { +func (m *LinkSlice) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4601,20 +4699,20 @@ func (m *SpanMetricsSummaryResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SpanMetricsSummaryResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *LinkSlice) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SpanMetricsSummaryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *LinkSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Summaries) > 0 { - for iNdEx := len(m.Summaries) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Links) > 0 { + for iNdEx := len(m.Links) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Summaries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Links[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4628,7 +4726,7 @@ func (m *SpanMetricsSummaryResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *TraceQLStatic) Marshal() (dAtA []byte, err error) { +func (m *SpanMetricsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4638,826 +4736,2731 @@ func (m *TraceQLStatic) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TraceQLStatic) MarshalTo(dAtA []byte) (int, error) { +func (m *SpanMetricsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TraceQLStatic) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SpanMetricsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Kind != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Kind)) - i-- - dAtA[i] = 0x40 - } - if m.Status != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x38 - } - if m.D != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.D)) - i-- - dAtA[i] = 0x30 - } - if m.B { - i-- - if m.B { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.End != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.End)) i-- dAtA[i] = 0x28 } - if len(m.S) > 0 { - i -= len(m.S) - copy(dAtA[i:], m.S) - i = encodeVarintTempo(dAtA, i, uint64(len(m.S))) + if m.Start != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Start)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x20 } - if m.F != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.F)))) + if m.Limit != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Limit)) i-- - dAtA[i] = 0x19 + dAtA[i] = 0x18 } - if m.N != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.N)) + if len(m.GroupBy) > 0 { + i -= len(m.GroupBy) + copy(dAtA[i:], m.GroupBy) + i = encodeVarintTempo(dAtA, i, uint64(len(m.GroupBy))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.Type != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Type)) + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Query))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func encodeVarintTempo(dAtA []byte, offset int, v uint64) int { - offset -= sovTempo(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *TraceByIDRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TraceID) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - l = len(m.BlockStart) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - l = len(m.BlockEnd) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - l = len(m.QueryMode) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - return n -} - -func (m *TraceByIDResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Trace != nil { - l = m.Trace.Size() - n += 1 + l + sovTempo(uint64(l)) - } - if m.Metrics != nil { - l = m.Metrics.Size() - n += 1 + l + sovTempo(uint64(l)) +func (m *SpanMetricsSummaryRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *TraceByIDMetrics) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n +func (m *SpanMetricsSummaryRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SearchRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *SpanMetricsSummaryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Tags) > 0 { - for k, v := range m.Tags { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTempo(uint64(len(k))) + 1 + len(v) + sovTempo(uint64(len(v))) - n += mapEntrySize + 1 + sovTempo(uint64(mapEntrySize)) - } - } - if m.MinDurationMs != 0 { - n += 1 + sovTempo(uint64(m.MinDurationMs)) - } - if m.MaxDurationMs != 0 { - n += 1 + sovTempo(uint64(m.MaxDurationMs)) - } - if m.Limit != 0 { - n += 1 + sovTempo(uint64(m.Limit)) + if m.End != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.End)) + i-- + dAtA[i] = 0x28 } if m.Start != 0 { - n += 1 + sovTempo(uint64(m.Start)) + i = encodeVarintTempo(dAtA, i, uint64(m.Start)) + i-- + dAtA[i] = 0x20 } - if m.End != 0 { - n += 1 + sovTempo(uint64(m.End)) + if m.Limit != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x18 } - l = len(m.Query) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) + if len(m.GroupBy) > 0 { + i -= len(m.GroupBy) + copy(dAtA[i:], m.GroupBy) + i = encodeVarintTempo(dAtA, i, uint64(len(m.GroupBy))) + i-- + dAtA[i] = 0x12 } - if m.SpansPerSpanSet != 0 { - n += 1 + sovTempo(uint64(m.SpansPerSpanSet)) + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Query))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *SearchBlockRequest) Size() (n int) { - if m == nil { - return 0 +func (m *SpanMetricsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *SpanMetricsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpanMetricsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.SearchReq != nil { - l = m.SearchReq.Size() - n += 1 + l + sovTempo(uint64(l)) - } - l = len(m.BlockID) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - if m.StartPage != 0 { - n += 1 + sovTempo(uint64(m.StartPage)) - } - if m.PagesToSearch != 0 { - n += 1 + sovTempo(uint64(m.PagesToSearch)) - } - l = len(m.Encoding) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - if m.IndexPageSize != 0 { - n += 1 + sovTempo(uint64(m.IndexPageSize)) - } - if m.TotalRecords != 0 { - n += 1 + sovTempo(uint64(m.TotalRecords)) - } - l = len(m.DataEncoding) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) + if len(m.Metrics) > 0 { + for iNdEx := len(m.Metrics) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Metrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } } - if m.Size_ != 0 { - n += 1 + sovTempo(uint64(m.Size_)) + if m.ErrorSpanCount != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.ErrorSpanCount)) + i-- + dAtA[i] = 0x18 } - if m.FooterSize != 0 { - n += 1 + sovTempo(uint64(m.FooterSize)) + if m.SpanCount != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.SpanCount)) + i-- + dAtA[i] = 0x10 } - if len(m.DedicatedColumns) > 0 { - for _, e := range m.DedicatedColumns { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) + if m.Estimated { + i-- + if m.Estimated { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *DedicatedColumn) Size() (n int) { - if m == nil { - return 0 +func (m *RawHistogram) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *RawHistogram) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RawHistogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Type != 0 { - n += 1 + sovTempo(uint64(m.Type)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) + if m.Count != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x10 } - if m.Scope != 0 { - n += 1 + sovTempo(uint64(m.Scope)) + if m.Bucket != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Bucket)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *SearchResponse) Size() (n int) { - if m == nil { - return 0 +func (m *KeyValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - if len(m.Traces) > 0 { - for _, e := range m.Traces { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) - } - } - if m.Metrics != nil { - l = m.Metrics.Size() - n += 1 + l + sovTempo(uint64(l)) - } - return n + return dAtA[:n], nil } -func (m *TraceSearchMetadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TraceID) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - l = len(m.RootServiceName) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - l = len(m.RootTraceName) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - if m.StartTimeUnixNano != 0 { - n += 1 + sovTempo(uint64(m.StartTimeUnixNano)) - } - if m.DurationMs != 0 { - n += 1 + sovTempo(uint64(m.DurationMs)) - } - if m.SpanSet != nil { - l = m.SpanSet.Size() - n += 1 + l + sovTempo(uint64(l)) - } - if len(m.SpanSets) > 0 { - for _, e := range m.SpanSets { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) - } - } - return n +func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SpanSet) Size() (n int) { - if m == nil { - return 0 - } +func (m *KeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Spans) > 0 { - for _, e := range m.Spans { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) + if m.Value != nil { + { + size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } - if m.Matched != 0 { - n += 1 + sovTempo(uint64(m.Matched)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) - } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *Span) Size() (n int) { - if m == nil { - return 0 +func (m *SpanMetrics) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *SpanMetrics) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpanMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.SpanID) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - if m.StartTimeUnixNano != 0 { - n += 1 + sovTempo(uint64(m.StartTimeUnixNano)) + if m.Errors != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Errors)) + i-- + dAtA[i] = 0x18 } - if m.DurationNanos != 0 { - n += 1 + sovTempo(uint64(m.DurationNanos)) + if len(m.Series) > 0 { + for iNdEx := len(m.Series) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Series[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) + if len(m.LatencyHistogram) > 0 { + for iNdEx := len(m.LatencyHistogram) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LatencyHistogram[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } } - return n + return len(dAtA) - i, nil } -func (m *SearchMetrics) Size() (n int) { - if m == nil { - return 0 +func (m *SpanMetricsSummary) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *SpanMetricsSummary) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpanMetricsSummary) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.InspectedTraces != 0 { - n += 1 + sovTempo(uint64(m.InspectedTraces)) + if m.P50 != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.P50)) + i-- + dAtA[i] = 0x38 } - if m.InspectedBytes != 0 { - n += 1 + sovTempo(uint64(m.InspectedBytes)) + if m.P90 != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.P90)) + i-- + dAtA[i] = 0x30 } - if m.TotalBlocks != 0 { - n += 1 + sovTempo(uint64(m.TotalBlocks)) + if m.P95 != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.P95)) + i-- + dAtA[i] = 0x28 } - if m.CompletedJobs != 0 { - n += 1 + sovTempo(uint64(m.CompletedJobs)) + if m.P99 != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.P99)) + i-- + dAtA[i] = 0x20 } - if m.TotalJobs != 0 { - n += 1 + sovTempo(uint64(m.TotalJobs)) + if len(m.Series) > 0 { + for iNdEx := len(m.Series) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Series[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } - if m.TotalBlockBytes != 0 { - n += 1 + sovTempo(uint64(m.TotalBlockBytes)) + if m.ErrorSpanCount != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.ErrorSpanCount)) + i-- + dAtA[i] = 0x10 } - return n + if m.SpanCount != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.SpanCount)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *SearchTagsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Scope) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) +func (m *SpanMetricsSummaryResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *SearchTagsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *SpanMetricsSummaryResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpanMetricsSummaryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.TagNames) > 0 { - for _, s := range m.TagNames { - l = len(s) - n += 1 + l + sovTempo(uint64(l)) + if len(m.Summaries) > 0 { + for iNdEx := len(m.Summaries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Summaries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } } - return n + return len(dAtA) - i, nil } -func (m *SearchTagsV2Response) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Scopes) > 0 { - for _, e := range m.Scopes { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) - } +func (m *TraceQLStatic) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *SearchTagsV2Scope) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - if len(m.Tags) > 0 { - for _, s := range m.Tags { - l = len(s) - n += 1 + l + sovTempo(uint64(l)) - } - } - return n +func (m *TraceQLStatic) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SearchTagValuesRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *TraceQLStatic) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.TagName) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) + if m.Kind != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Kind)) + i-- + dAtA[i] = 0x40 } - l = len(m.Query) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) + if m.Status != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x38 } - return n -} - -func (m *SearchTagValuesResponse) Size() (n int) { - if m == nil { - return 0 + if m.D != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.D)) + i-- + dAtA[i] = 0x30 } - var l int - _ = l - if len(m.TagValues) > 0 { - for _, s := range m.TagValues { - l = len(s) - n += 1 + l + sovTempo(uint64(l)) + if m.B { + i-- + if m.B { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x28 } - return n -} - -func (m *TagValue) Size() (n int) { - if m == nil { - return 0 + if len(m.S) > 0 { + i -= len(m.S) + copy(dAtA[i:], m.S) + i = encodeVarintTempo(dAtA, i, uint64(len(m.S))) + i-- + dAtA[i] = 0x22 } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) + if m.F != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.F)))) + i-- + dAtA[i] = 0x19 } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) + if m.N != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.N)) + i-- + dAtA[i] = 0x10 } - return n + if m.Type != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *SearchTagValuesV2Response) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.TagValues) > 0 { - for _, e := range m.TagValues { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) - } +func (m *SpanMetricsData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *Trace) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Batches) > 0 { - for _, e := range m.Batches { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) - } - } - return n +func (m *SpanMetricsData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PushResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *SpanMetricsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.ErrorsByTrace) > 0 { - l = 0 - for _, e := range m.ErrorsByTrace { - l += sovTempo(uint64(e)) + if len(m.Result) > 0 { + for iNdEx := len(m.Result) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Result[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - n += 1 + sovTempo(uint64(l)) + l } - return n + if len(m.ResultType) > 0 { + i -= len(m.ResultType) + copy(dAtA[i:], m.ResultType) + i = encodeVarintTempo(dAtA, i, uint64(len(m.ResultType))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *PushBytesRequest) Size() (n int) { - if m == nil { - return 0 +func (m *SpanMetricsResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *SpanMetricsResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpanMetricsResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Traces) > 0 { - for _, e := range m.Traces { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) + if len(m.Ts) > 0 { + for iNdEx := len(m.Ts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Ts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } } - if len(m.Ids) > 0 { - for _, e := range m.Ids { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) - } + if len(m.LabelValue) > 0 { + i -= len(m.LabelValue) + copy(dAtA[i:], m.LabelValue) + i = encodeVarintTempo(dAtA, i, uint64(len(m.LabelValue))) + i-- + dAtA[i] = 0x12 } - if len(m.SearchData) > 0 { - for _, e := range m.SearchData { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) - } + if len(m.LabelName) > 0 { + i -= len(m.LabelName) + copy(dAtA[i:], m.LabelName) + i = encodeVarintTempo(dAtA, i, uint64(len(m.LabelName))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *PushSpansRequest) Size() (n int) { - if m == nil { - return 0 +func (m *SpanMetricsResultPoint) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *SpanMetricsResultPoint) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpanMetricsResultPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Batches) > 0 { - for _, e := range m.Batches { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) - } + if m.ExemplarDuration != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.ExemplarDuration)) + i-- + dAtA[i] = 0x20 } - return n + if len(m.ExemplarTraceID) > 0 { + i -= len(m.ExemplarTraceID) + copy(dAtA[i:], m.ExemplarTraceID) + i = encodeVarintTempo(dAtA, i, uint64(len(m.ExemplarTraceID))) + i-- + dAtA[i] = 0x1a + } + if m.Val != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Val)))) + i-- + dAtA[i] = 0x11 + } + if m.Time != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Time)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *TraceBytes) Size() (n int) { - if m == nil { - return 0 +func (m *QueryRangeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *QueryRangeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Traces) > 0 { - for _, b := range m.Traces { - l = len(b) - n += 1 + l + sovTempo(uint64(l)) - } + if m.ShardCount != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.ShardCount)) + i-- + dAtA[i] = 0x30 } - return n + if m.ShardID != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.ShardID)) + i-- + dAtA[i] = 0x28 + } + if m.Step != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Step)) + i-- + dAtA[i] = 0x20 + } + if m.End != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.End)) + i-- + dAtA[i] = 0x18 + } + if m.Start != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Start)) + i-- + dAtA[i] = 0x10 + } + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Query))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *LinkSlice) Size() (n int) { - if m == nil { - return 0 +func (m *QueryRangeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *QueryRangeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Links) > 0 { - for _, e := range m.Links { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) + if len(m.Series) > 0 { + for iNdEx := len(m.Series) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Series[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } } - return n + return len(dAtA) - i, nil } -func (m *SpanMetricsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *Sample) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *Sample) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Sample) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Query) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) + if m.TimestampMs != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.TimestampMs)) + i-- + dAtA[i] = 0x10 } - l = len(m.GroupBy) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) + if m.Value != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) + i-- + dAtA[i] = 0x9 } - if m.Limit != 0 { - n += 1 + sovTempo(uint64(m.Limit)) + return len(dAtA) - i, nil +} + +func (m *TimeSeries) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if m.Start != 0 { - n += 1 + sovTempo(uint64(m.Start)) + return dAtA[:n], nil +} + +func (m *TimeSeries) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TimeSeries) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PromLabels) > 0 { + i -= len(m.PromLabels) + copy(dAtA[i:], m.PromLabels) + i = encodeVarintTempo(dAtA, i, uint64(len(m.PromLabels))) + i-- + dAtA[i] = 0x1a } - if m.End != 0 { - n += 1 + sovTempo(uint64(m.End)) + if len(m.Samples) > 0 { + for iNdEx := len(m.Samples) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Samples[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - return n + if len(m.Labels) > 0 { + for iNdEx := len(m.Labels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Labels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } -func (m *SpanMetricsSummaryRequest) Size() (n int) { +func encodeVarintTempo(dAtA []byte, offset int, v uint64) int { + offset -= sovTempo(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *TraceByIDRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Query) + l = len(m.TraceID) if l > 0 { n += 1 + l + sovTempo(uint64(l)) } - l = len(m.GroupBy) + l = len(m.BlockStart) if l > 0 { n += 1 + l + sovTempo(uint64(l)) } - if m.Limit != 0 { - n += 1 + sovTempo(uint64(m.Limit)) - } - if m.Start != 0 { - n += 1 + sovTempo(uint64(m.Start)) + l = len(m.BlockEnd) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) } - if m.End != 0 { - n += 1 + sovTempo(uint64(m.End)) + l = len(m.QueryMode) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) } return n } -func (m *SpanMetricsResponse) Size() (n int) { +func (m *TraceByIDResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Estimated { - n += 2 - } - if m.SpanCount != 0 { - n += 1 + sovTempo(uint64(m.SpanCount)) - } - if m.ErrorSpanCount != 0 { - n += 1 + sovTempo(uint64(m.ErrorSpanCount)) + if m.Trace != nil { + l = m.Trace.Size() + n += 1 + l + sovTempo(uint64(l)) } - if len(m.Metrics) > 0 { - for _, e := range m.Metrics { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) - } + if m.Metrics != nil { + l = m.Metrics.Size() + n += 1 + l + sovTempo(uint64(l)) } return n } -func (m *RawHistogram) Size() (n int) { +func (m *TraceByIDMetrics) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Bucket != 0 { - n += 1 + sovTempo(uint64(m.Bucket)) - } - if m.Count != 0 { - n += 1 + sovTempo(uint64(m.Count)) - } return n } -func (m *KeyValue) Size() (n int) { +func (m *SearchRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) + if len(m.Tags) > 0 { + for k, v := range m.Tags { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTempo(uint64(len(k))) + 1 + len(v) + sovTempo(uint64(len(v))) + n += mapEntrySize + 1 + sovTempo(uint64(mapEntrySize)) + } } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovTempo(uint64(l)) + if m.MinDurationMs != 0 { + n += 1 + sovTempo(uint64(m.MinDurationMs)) } - return n + if m.MaxDurationMs != 0 { + n += 1 + sovTempo(uint64(m.MaxDurationMs)) + } + if m.Limit != 0 { + n += 1 + sovTempo(uint64(m.Limit)) + } + if m.Start != 0 { + n += 1 + sovTempo(uint64(m.Start)) + } + if m.End != 0 { + n += 1 + sovTempo(uint64(m.End)) + } + l = len(m.Query) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.SpansPerSpanSet != 0 { + n += 1 + sovTempo(uint64(m.SpansPerSpanSet)) + } + return n } -func (m *SpanMetrics) Size() (n int) { +func (m *SearchBlockRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.LatencyHistogram) > 0 { - for _, e := range m.LatencyHistogram { + if m.SearchReq != nil { + l = m.SearchReq.Size() + n += 1 + l + sovTempo(uint64(l)) + } + l = len(m.BlockID) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.StartPage != 0 { + n += 1 + sovTempo(uint64(m.StartPage)) + } + if m.PagesToSearch != 0 { + n += 1 + sovTempo(uint64(m.PagesToSearch)) + } + l = len(m.Encoding) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.IndexPageSize != 0 { + n += 1 + sovTempo(uint64(m.IndexPageSize)) + } + if m.TotalRecords != 0 { + n += 1 + sovTempo(uint64(m.TotalRecords)) + } + l = len(m.DataEncoding) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.Size_ != 0 { + n += 1 + sovTempo(uint64(m.Size_)) + } + if m.FooterSize != 0 { + n += 1 + sovTempo(uint64(m.FooterSize)) + } + if len(m.DedicatedColumns) > 0 { + for _, e := range m.DedicatedColumns { l = e.Size() n += 1 + l + sovTempo(uint64(l)) } } - if len(m.Series) > 0 { - for _, e := range m.Series { + return n +} + +func (m *DedicatedColumn) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sovTempo(uint64(m.Type)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.Scope != 0 { + n += 1 + sovTempo(uint64(m.Scope)) + } + return n +} + +func (m *SearchResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Traces) > 0 { + for _, e := range m.Traces { l = e.Size() n += 1 + l + sovTempo(uint64(l)) } } - if m.Errors != 0 { - n += 1 + sovTempo(uint64(m.Errors)) + if m.Metrics != nil { + l = m.Metrics.Size() + n += 1 + l + sovTempo(uint64(l)) } return n } -func (m *SpanMetricsSummary) Size() (n int) { +func (m *TraceSearchMetadata) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.SpanCount != 0 { - n += 1 + sovTempo(uint64(m.SpanCount)) + l = len(m.TraceID) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) } - if m.ErrorSpanCount != 0 { - n += 1 + sovTempo(uint64(m.ErrorSpanCount)) + l = len(m.RootServiceName) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) } - if len(m.Series) > 0 { - for _, e := range m.Series { + l = len(m.RootTraceName) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.StartTimeUnixNano != 0 { + n += 1 + sovTempo(uint64(m.StartTimeUnixNano)) + } + if m.DurationMs != 0 { + n += 1 + sovTempo(uint64(m.DurationMs)) + } + if m.SpanSet != nil { + l = m.SpanSet.Size() + n += 1 + l + sovTempo(uint64(l)) + } + if len(m.SpanSets) > 0 { + for _, e := range m.SpanSets { l = e.Size() n += 1 + l + sovTempo(uint64(l)) } } - if m.P99 != 0 { - n += 1 + sovTempo(uint64(m.P99)) + return n +} + +func (m *SpanSet) Size() (n int) { + if m == nil { + return 0 } - if m.P95 != 0 { - n += 1 + sovTempo(uint64(m.P95)) + var l int + _ = l + if len(m.Spans) > 0 { + for _, e := range m.Spans { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } } - if m.P90 != 0 { - n += 1 + sovTempo(uint64(m.P90)) + if m.Matched != 0 { + n += 1 + sovTempo(uint64(m.Matched)) } - if m.P50 != 0 { - n += 1 + sovTempo(uint64(m.P50)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } } return n } -func (m *SpanMetricsSummaryResponse) Size() (n int) { +func (m *Span) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Summaries) > 0 { - for _, e := range m.Summaries { + l = len(m.SpanID) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.StartTimeUnixNano != 0 { + n += 1 + sovTempo(uint64(m.StartTimeUnixNano)) + } + if m.DurationNanos != 0 { + n += 1 + sovTempo(uint64(m.DurationNanos)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *SearchMetrics) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.InspectedTraces != 0 { + n += 1 + sovTempo(uint64(m.InspectedTraces)) + } + if m.InspectedBytes != 0 { + n += 1 + sovTempo(uint64(m.InspectedBytes)) + } + if m.TotalBlocks != 0 { + n += 1 + sovTempo(uint64(m.TotalBlocks)) + } + if m.CompletedJobs != 0 { + n += 1 + sovTempo(uint64(m.CompletedJobs)) + } + if m.TotalJobs != 0 { + n += 1 + sovTempo(uint64(m.TotalJobs)) + } + if m.TotalBlockBytes != 0 { + n += 1 + sovTempo(uint64(m.TotalBlockBytes)) + } + return n +} + +func (m *SearchTagsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Scope) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + return n +} + +func (m *SearchTagsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TagNames) > 0 { + for _, s := range m.TagNames { + l = len(s) + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *SearchTagsV2Response) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Scopes) > 0 { + for _, e := range m.Scopes { l = e.Size() n += 1 + l + sovTempo(uint64(l)) } } - return n -} + return n +} + +func (m *SearchTagsV2Scope) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if len(m.Tags) > 0 { + for _, s := range m.Tags { + l = len(s) + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *SearchTagValuesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TagName) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + l = len(m.Query) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + return n +} + +func (m *SearchTagValuesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TagValues) > 0 { + for _, s := range m.TagValues { + l = len(s) + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *TagValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + return n +} + +func (m *SearchTagValuesV2Response) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TagValues) > 0 { + for _, e := range m.TagValues { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *Trace) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Batches) > 0 { + for _, e := range m.Batches { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *PushResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ErrorsByTrace) > 0 { + l = 0 + for _, e := range m.ErrorsByTrace { + l += sovTempo(uint64(e)) + } + n += 1 + sovTempo(uint64(l)) + l + } + return n +} + +func (m *PushBytesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Traces) > 0 { + for _, e := range m.Traces { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + if len(m.Ids) > 0 { + for _, e := range m.Ids { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + if len(m.SearchData) > 0 { + for _, e := range m.SearchData { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *PushSpansRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Batches) > 0 { + for _, e := range m.Batches { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *TraceBytes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Traces) > 0 { + for _, b := range m.Traces { + l = len(b) + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *LinkSlice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Links) > 0 { + for _, e := range m.Links { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *SpanMetricsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Query) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + l = len(m.GroupBy) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.Limit != 0 { + n += 1 + sovTempo(uint64(m.Limit)) + } + if m.Start != 0 { + n += 1 + sovTempo(uint64(m.Start)) + } + if m.End != 0 { + n += 1 + sovTempo(uint64(m.End)) + } + return n +} + +func (m *SpanMetricsSummaryRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Query) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + l = len(m.GroupBy) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.Limit != 0 { + n += 1 + sovTempo(uint64(m.Limit)) + } + if m.Start != 0 { + n += 1 + sovTempo(uint64(m.Start)) + } + if m.End != 0 { + n += 1 + sovTempo(uint64(m.End)) + } + return n +} + +func (m *SpanMetricsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Estimated { + n += 2 + } + if m.SpanCount != 0 { + n += 1 + sovTempo(uint64(m.SpanCount)) + } + if m.ErrorSpanCount != 0 { + n += 1 + sovTempo(uint64(m.ErrorSpanCount)) + } + if len(m.Metrics) > 0 { + for _, e := range m.Metrics { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *RawHistogram) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Bucket != 0 { + n += 1 + sovTempo(uint64(m.Bucket)) + } + if m.Count != 0 { + n += 1 + sovTempo(uint64(m.Count)) + } + return n +} + +func (m *KeyValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovTempo(uint64(l)) + } + return n +} + +func (m *SpanMetrics) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.LatencyHistogram) > 0 { + for _, e := range m.LatencyHistogram { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + if len(m.Series) > 0 { + for _, e := range m.Series { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + if m.Errors != 0 { + n += 1 + sovTempo(uint64(m.Errors)) + } + return n +} + +func (m *SpanMetricsSummary) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SpanCount != 0 { + n += 1 + sovTempo(uint64(m.SpanCount)) + } + if m.ErrorSpanCount != 0 { + n += 1 + sovTempo(uint64(m.ErrorSpanCount)) + } + if len(m.Series) > 0 { + for _, e := range m.Series { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + if m.P99 != 0 { + n += 1 + sovTempo(uint64(m.P99)) + } + if m.P95 != 0 { + n += 1 + sovTempo(uint64(m.P95)) + } + if m.P90 != 0 { + n += 1 + sovTempo(uint64(m.P90)) + } + if m.P50 != 0 { + n += 1 + sovTempo(uint64(m.P50)) + } + return n +} + +func (m *SpanMetricsSummaryResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Summaries) > 0 { + for _, e := range m.Summaries { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *TraceQLStatic) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sovTempo(uint64(m.Type)) + } + if m.N != 0 { + n += 1 + sovTempo(uint64(m.N)) + } + if m.F != 0 { + n += 9 + } + l = len(m.S) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.B { + n += 2 + } + if m.D != 0 { + n += 1 + sovTempo(uint64(m.D)) + } + if m.Status != 0 { + n += 1 + sovTempo(uint64(m.Status)) + } + if m.Kind != 0 { + n += 1 + sovTempo(uint64(m.Kind)) + } + return n +} + +func (m *SpanMetricsData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ResultType) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if len(m.Result) > 0 { + for _, e := range m.Result { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *SpanMetricsResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.LabelName) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + l = len(m.LabelValue) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if len(m.Ts) > 0 { + for _, e := range m.Ts { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *SpanMetricsResultPoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Time != 0 { + n += 1 + sovTempo(uint64(m.Time)) + } + if m.Val != 0 { + n += 9 + } + l = len(m.ExemplarTraceID) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.ExemplarDuration != 0 { + n += 1 + sovTempo(uint64(m.ExemplarDuration)) + } + return n +} + +func (m *QueryRangeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Query) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.Start != 0 { + n += 1 + sovTempo(uint64(m.Start)) + } + if m.End != 0 { + n += 1 + sovTempo(uint64(m.End)) + } + if m.Step != 0 { + n += 1 + sovTempo(uint64(m.Step)) + } + if m.ShardID != 0 { + n += 1 + sovTempo(uint64(m.ShardID)) + } + if m.ShardCount != 0 { + n += 1 + sovTempo(uint64(m.ShardCount)) + } + return n +} + +func (m *QueryRangeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Series) > 0 { + for _, e := range m.Series { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *Sample) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 9 + } + if m.TimestampMs != 0 { + n += 1 + sovTempo(uint64(m.TimestampMs)) + } + return n +} + +func (m *TimeSeries) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Labels) > 0 { + for _, e := range m.Labels { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + if len(m.Samples) > 0 { + for _, e := range m.Samples { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + l = len(m.PromLabels) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + return n +} + +func sovTempo(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTempo(x uint64) (n int) { + return sovTempo(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceByIDRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TraceID = append(m.TraceID[:0], dAtA[iNdEx:postIndex]...) + if m.TraceID == nil { + m.TraceID = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockStart", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockStart = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockEnd", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockEnd = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryMode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QueryMode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TraceByIDResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceByIDResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceByIDResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Trace", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Trace == nil { + m.Trace = &Trace{} + } + if err := m.Trace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metrics == nil { + m.Metrics = &TraceByIDMetrics{} + } + if err := m.Metrics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TraceByIDMetrics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceByIDMetrics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceByIDMetrics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Tags == nil { + m.Tags = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTempo + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthTempo + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTempo + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthTempo + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Tags[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinDurationMs", wireType) + } + m.MinDurationMs = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinDurationMs |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxDurationMs", wireType) + } + m.MaxDurationMs = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxDurationMs |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + } + m.Start = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Start |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.End |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Query = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpansPerSpanSet", wireType) + } + m.SpansPerSpanSet = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SpansPerSpanSet |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchBlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchReq", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SearchReq == nil { + m.SearchReq = &SearchRequest{} + } + if err := m.SearchReq.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartPage", wireType) + } + m.StartPage = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StartPage |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesToSearch", wireType) + } + m.PagesToSearch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PagesToSearch |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Encoding = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IndexPageSize", wireType) + } + m.IndexPageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IndexPageSize |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalRecords", wireType) + } + m.TotalRecords = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalRecords |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataEncoding", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DataEncoding = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) + } + m.Size_ = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size_ |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FooterSize", wireType) + } + m.FooterSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FooterSize |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DedicatedColumns", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DedicatedColumns = append(m.DedicatedColumns, &DedicatedColumn{}) + if err := m.DedicatedColumns[len(m.DedicatedColumns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } -func (m *TraceQLStatic) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovTempo(uint64(m.Type)) - } - if m.N != 0 { - n += 1 + sovTempo(uint64(m.N)) - } - if m.F != 0 { - n += 9 - } - l = len(m.S) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - if m.B { - n += 2 - } - if m.D != 0 { - n += 1 + sovTempo(uint64(m.D)) - } - if m.Status != 0 { - n += 1 + sovTempo(uint64(m.Status)) - } - if m.Kind != 0 { - n += 1 + sovTempo(uint64(m.Kind)) + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n -} - -func sovTempo(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTempo(x uint64) (n int) { - return sovTempo(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return nil } -func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { +func (m *DedicatedColumn) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5480,51 +7483,17 @@ func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TraceByIDRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DedicatedColumn: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TraceByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DedicatedColumn: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TraceID = append(m.TraceID[:0], dAtA[iNdEx:postIndex]...) - if m.TraceID == nil { - m.TraceID = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockStart", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var stringLen uint64 + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5534,27 +7503,14 @@ func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Type |= DedicatedColumn_Type(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockStart = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockEnd", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5582,13 +7538,13 @@ func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BlockEnd = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryMode", wireType) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) } - var stringLen uint64 + m.Scope = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5598,24 +7554,11 @@ func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Scope |= DedicatedColumn_Scope(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QueryMode = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -5637,7 +7580,7 @@ func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *TraceByIDResponse) Unmarshal(dAtA []byte) error { +func (m *SearchResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5660,15 +7603,15 @@ func (m *TraceByIDResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TraceByIDResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TraceByIDResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Trace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5695,10 +7638,8 @@ func (m *TraceByIDResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Trace == nil { - m.Trace = &Trace{} - } - if err := m.Trace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Traces = append(m.Traces, &TraceSearchMetadata{}) + if err := m.Traces[len(m.Traces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5732,7 +7673,7 @@ func (m *TraceByIDResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Metrics == nil { - m.Metrics = &TraceByIDMetrics{} + m.Metrics = &SearchMetrics{} } if err := m.Metrics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -5759,57 +7700,7 @@ func (m *TraceByIDResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *TraceByIDMetrics) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TraceByIDMetrics: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TraceByIDMetrics: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTempo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTempo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SearchRequest) Unmarshal(dAtA []byte) error { +func (m *TraceSearchMetadata) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5821,155 +7712,60 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } if iNdEx >= l { return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SearchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tags == nil { - m.Tags = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTempo - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthTempo - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTempo - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthTempo - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipTempo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTempo - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceSearchMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceSearchMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } } - m.Tags[mapkey] = mapvalue + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TraceID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinDurationMs", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RootServiceName", wireType) } - m.MinDurationMs = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5979,16 +7775,29 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MinDurationMs |= uint32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RootServiceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxDurationMs", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RootTraceName", wireType) } - m.MaxDurationMs = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5998,16 +7807,29 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MaxDurationMs |= uint32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RootTraceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) } - m.Limit = 0 + m.StartTimeUnixNano = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6017,16 +7839,16 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Limit |= uint32(b&0x7F) << shift + m.StartTimeUnixNano |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DurationMs", wireType) } - m.Start = 0 + m.DurationMs = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6036,16 +7858,16 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= uint32(b&0x7F) << shift + m.DurationMs |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanSet", wireType) } - m.End = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6055,16 +7877,33 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= uint32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 8: + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SpanSet == nil { + m.SpanSet = &SpanSet{} + } + if err := m.SpanSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SpanSets", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6074,29 +7913,115 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Query = string(dAtA[iNdEx:postIndex]) + m.SpanSets = append(m.SpanSets, &SpanSet{}) + if err := m.SpanSets[len(m.SpanSets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 9: + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpanSet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpanSet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpanSet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Spans = append(m.Spans, &Span{}) + if err := m.Spans[len(m.Spans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SpansPerSpanSet", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Matched", wireType) } - m.SpansPerSpanSet = 0 + m.Matched = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6106,11 +8031,45 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SpansPerSpanSet |= uint32(b&0x7F) << shift + m.Matched |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &v1.KeyValue{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -6132,7 +8091,7 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { +func (m *Span) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6155,17 +8114,17 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchBlockRequest: wiretype end group for non-group") + return fmt.Errorf("proto: Span: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Span: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchReq", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SpanID", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6175,31 +8134,27 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - if m.SearchReq == nil { - m.SearchReq = &SearchRequest{} - } - if err := m.SearchReq.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.SpanID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6227,13 +8182,13 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BlockID = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartPage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) } - m.StartPage = 0 + m.StartTimeUnixNano = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6243,16 +8198,16 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StartPage |= uint32(b&0x7F) << shift + m.StartTimeUnixNano |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PagesToSearch", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DurationNanos", wireType) } - m.PagesToSearch = 0 + m.DurationNanos = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6262,16 +8217,16 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PagesToSearch |= uint32(b&0x7F) << shift + m.DurationNanos |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6281,29 +8236,81 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Encoding = string(dAtA[iNdEx:postIndex]) + m.Attributes = append(m.Attributes, &v1.KeyValue{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 6: + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchMetrics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchMetrics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchMetrics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IndexPageSize", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InspectedTraces", wireType) } - m.IndexPageSize = 0 + m.InspectedTraces = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6313,16 +8320,16 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.IndexPageSize |= uint32(b&0x7F) << shift + m.InspectedTraces |= uint32(b&0x7F) << shift if b < 0x80 { break } } - case 7: + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalRecords", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InspectedBytes", wireType) } - m.TotalRecords = 0 + m.InspectedBytes = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6332,16 +8339,16 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalRecords |= uint32(b&0x7F) << shift + m.InspectedBytes |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataEncoding", wireType) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalBlocks", wireType) } - var stringLen uint64 + m.TotalBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6351,29 +8358,16 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.TotalBlocks |= uint32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataEncoding = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletedJobs", wireType) } - var stringLen uint64 + m.CompletedJobs = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6383,29 +8377,16 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.CompletedJobs |= uint32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalJobs", wireType) } - m.Size_ = 0 + m.TotalJobs = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6415,16 +8396,16 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size_ |= uint64(b&0x7F) << shift + m.TotalJobs |= uint32(b&0x7F) << shift if b < 0x80 { break } } - case 11: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FooterSize", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalBlockBytes", wireType) } - m.FooterSize = 0 + m.TotalBlockBytes = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6434,16 +8415,66 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FooterSize |= uint32(b&0x7F) << shift + m.TotalBlockBytes |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 12: + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchTagsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchTagsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchTagsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DedicatedColumns", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6453,25 +8484,23 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.DedicatedColumns = append(m.DedicatedColumns, &DedicatedColumn{}) - if err := m.DedicatedColumns[len(m.DedicatedColumns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Scope = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -6494,7 +8523,7 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DedicatedColumn) Unmarshal(dAtA []byte) error { +func (m *SearchTagsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6517,34 +8546,15 @@ func (m *DedicatedColumn) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DedicatedColumn: wiretype end group for non-group") + return fmt.Errorf("proto: SearchTagsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DedicatedColumn: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchTagsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= DedicatedColumn_Type(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TagNames", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6572,27 +8582,8 @@ func (m *DedicatedColumn) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.TagNames = append(m.TagNames, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - m.Scope = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Scope |= DedicatedColumn_Scope(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -6614,7 +8605,7 @@ func (m *DedicatedColumn) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchResponse) Unmarshal(dAtA []byte) error { +func (m *SearchTagsV2Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6637,49 +8628,15 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SearchTagsV2Response: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchTagsV2Response: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Traces = append(m.Traces, &TraceSearchMetadata{}) - if err := m.Traces[len(m.Traces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6706,10 +8663,8 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Metrics == nil { - m.Metrics = &SearchMetrics{} - } - if err := m.Metrics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Scopes = append(m.Scopes, &SearchTagsV2Scope{}) + if err := m.Scopes[len(m.Scopes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6734,7 +8689,7 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *TraceSearchMetadata) Unmarshal(dAtA []byte) error { +func (m *SearchTagsV2Scope) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6757,15 +8712,15 @@ func (m *TraceSearchMetadata) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TraceSearchMetadata: wiretype end group for non-group") + return fmt.Errorf("proto: SearchTagsV2Scope: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TraceSearchMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchTagsV2Scope: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6793,43 +8748,11 @@ func (m *TraceSearchMetadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TraceID = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootServiceName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RootServiceName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootTraceName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6847,125 +8770,17 @@ func (m *TraceSearchMetadata) Unmarshal(dAtA []byte) error { } } intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RootTraceName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartTimeUnixNano |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DurationMs", wireType) - } - m.DurationMs = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DurationMs |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SpanSet == nil { - m.SpanSet = &SpanSet{} - } - if err := m.SpanSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanSets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.SpanSets = append(m.SpanSets, &SpanSet{}) - if err := m.SpanSets[len(m.SpanSets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Tags = append(m.Tags, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -6988,7 +8803,7 @@ func (m *TraceSearchMetadata) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanSet) Unmarshal(dAtA []byte) error { +func (m *SearchTagValuesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7011,17 +8826,17 @@ func (m *SpanSet) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanSet: wiretype end group for non-group") + return fmt.Errorf("proto: SearchTagValuesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanSet: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchTagValuesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TagName", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7031,50 +8846,29 @@ func (m *SpanSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Spans = append(m.Spans, &Span{}) - if err := m.Spans[len(m.Spans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.TagName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Matched", wireType) - } - m.Matched = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Matched |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7084,25 +8878,23 @@ func (m *SpanSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Attributes = append(m.Attributes, &v1.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7125,7 +8917,7 @@ func (m *SpanSet) Unmarshal(dAtA []byte) error { } return nil } -func (m *Span) Unmarshal(dAtA []byte) error { +func (m *SearchTagValuesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7148,15 +8940,15 @@ func (m *Span) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Span: wiretype end group for non-group") + return fmt.Errorf("proto: SearchTagValuesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Span: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchTagValuesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TagValues", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7184,11 +8976,61 @@ func (m *Span) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SpanID = string(dAtA[iNdEx:postIndex]) + m.TagValues = append(m.TagValues, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 2: + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TagValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TagValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TagValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7216,51 +9058,13 @@ func (m *Span) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartTimeUnixNano |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DurationNanos", wireType) - } - m.DurationNanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DurationNanos |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7270,25 +9074,23 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Attributes = append(m.Attributes, &v1.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Value = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7311,7 +9113,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchMetrics) Unmarshal(dAtA []byte) error { +func (m *SearchTagValuesV2Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7334,74 +9136,17 @@ func (m *SearchMetrics) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchMetrics: wiretype end group for non-group") + return fmt.Errorf("proto: SearchTagValuesV2Response: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchMetrics: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchTagValuesV2Response: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InspectedTraces", wireType) - } - m.InspectedTraces = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InspectedTraces |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InspectedBytes", wireType) - } - m.InspectedBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InspectedBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalBlocks", wireType) - } - m.TotalBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalBlocks |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletedJobs", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TagValues", wireType) } - m.CompletedJobs = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7411,49 +9156,26 @@ func (m *SearchMetrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CompletedJobs |= uint32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalJobs", wireType) + if msglen < 0 { + return ErrInvalidLengthTempo } - m.TotalJobs = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalJobs |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalBlockBytes", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - m.TotalBlockBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalBlockBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + m.TagValues = append(m.TagValues, &TagValue{}) + if err := m.TagValues[len(m.TagValues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -7475,7 +9197,7 @@ func (m *SearchMetrics) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagsRequest) Unmarshal(dAtA []byte) error { +func (m *Trace) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7498,17 +9220,17 @@ func (m *SearchTagsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: Trace: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Trace: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7518,23 +9240,25 @@ func (m *SearchTagsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Scope = string(dAtA[iNdEx:postIndex]) + m.Batches = append(m.Batches, &v11.ResourceSpans{}) + if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -7557,7 +9281,7 @@ func (m *SearchTagsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagsResponse) Unmarshal(dAtA []byte) error { +func (m *PushResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7580,17 +9304,206 @@ func (m *SearchTagsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: PushResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PushResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType == 0 { + var v PushErrorReason + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PushErrorReason(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ErrorsByTrace = append(m.ErrorsByTrace, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.ErrorsByTrace) == 0 { + m.ErrorsByTrace = make([]PushErrorReason, 0, elementCount) + } + for iNdEx < postIndex { + var v PushErrorReason + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PushErrorReason(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ErrorsByTrace = append(m.ErrorsByTrace, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorsByTrace", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PushBytesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PushBytesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PushBytesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v PreallocBytes + m.Traces = append(m.Traces, v) + if err := m.Traces[len(m.Traces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v PreallocBytes + m.Ids = append(m.Ids, v) + if err := m.Ids[len(m.Ids)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TagNames", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7600,23 +9513,26 @@ func (m *SearchTagsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.TagNames = append(m.TagNames, string(dAtA[iNdEx:postIndex])) + var v PreallocBytes + m.SearchData = append(m.SearchData, v) + if err := m.SearchData[len(m.SearchData)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -7639,7 +9555,7 @@ func (m *SearchTagsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagsV2Response) Unmarshal(dAtA []byte) error { +func (m *PushSpansRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7662,15 +9578,15 @@ func (m *SearchTagsV2Response) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagsV2Response: wiretype end group for non-group") + return fmt.Errorf("proto: PushSpansRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagsV2Response: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PushSpansRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7697,8 +9613,8 @@ func (m *SearchTagsV2Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Scopes = append(m.Scopes, &SearchTagsV2Scope{}) - if err := m.Scopes[len(m.Scopes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Batches = append(m.Batches, &v11.ResourceSpans{}) + if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7723,7 +9639,7 @@ func (m *SearchTagsV2Response) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagsV2Scope) Unmarshal(dAtA []byte) error { +func (m *TraceBytes) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7746,49 +9662,17 @@ func (m *SearchTagsV2Scope) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagsV2Scope: wiretype end group for non-group") + return fmt.Errorf("proto: TraceBytes: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagsV2Scope: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TraceBytes: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7798,23 +9682,23 @@ func (m *SearchTagsV2Scope) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Tags = append(m.Tags, string(dAtA[iNdEx:postIndex])) + m.Traces = append(m.Traces, make([]byte, postIndex-iNdEx)) + copy(m.Traces[len(m.Traces)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7837,7 +9721,7 @@ func (m *SearchTagsV2Scope) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagValuesRequest) Unmarshal(dAtA []byte) error { +func (m *LinkSlice) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7860,17 +9744,17 @@ func (m *SearchTagValuesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagValuesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: LinkSlice: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagValuesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LinkSlice: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TagName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7880,55 +9764,25 @@ func (m *SearchTagValuesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.TagName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF + m.Links = append(m.Links, &v11.Span_Link{}) + if err := m.Links[len(m.Links)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7951,7 +9805,7 @@ func (m *SearchTagValuesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagValuesResponse) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7974,15 +9828,15 @@ func (m *SearchTagValuesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagValuesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagValuesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TagValues", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8010,61 +9864,11 @@ func (m *SearchTagValuesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TagValues = append(m.TagValues, string(dAtA[iNdEx:postIndex])) + m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTempo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTempo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TagValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TagValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TagValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8092,13 +9896,13 @@ func (m *TagValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = string(dAtA[iNdEx:postIndex]) + m.GroupBy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) } - var stringLen uint64 + m.Limit = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8108,24 +9912,49 @@ func (m *TagValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Limit |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo + m.Start = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Start |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } } - if postIndex > l { - return io.ErrUnexpectedEOF + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.End |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -8147,7 +9976,7 @@ func (m *TagValue) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagValuesV2Response) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8170,17 +9999,17 @@ func (m *SearchTagValuesV2Response) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagValuesV2Response: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsSummaryRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagValuesV2Response: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsSummaryRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TagValues", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8190,81 +10019,29 @@ func (m *SearchTagValuesV2Response) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.TagValues = append(m.TagValues, &TagValue{}) - if err := m.TagValues[len(m.TagValues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTempo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTempo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Trace) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Trace: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Trace: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8274,144 +10051,80 @@ func (m *Trace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Batches = append(m.Batches, &v11.ResourceSpans{}) - if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.GroupBy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTempo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTempo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PushResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) } - if iNdEx >= l { - return io.ErrUnexpectedEOF + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PushResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PushResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v PushErrorReason - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PushErrorReason(b&0x7F) << shift - if b < 0x80 { - break - } + m.Start = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo } - m.ErrorsByTrace = append(m.ErrorsByTrace, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return ErrInvalidLengthTempo + b := dAtA[iNdEx] + iNdEx++ + m.Start |= uint32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthTempo + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - if elementCount != 0 && len(m.ErrorsByTrace) == 0 { - m.ErrorsByTrace = make([]PushErrorReason, 0, elementCount) - } - for iNdEx < postIndex { - var v PushErrorReason - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PushErrorReason(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ErrorsByTrace = append(m.ErrorsByTrace, v) + b := dAtA[iNdEx] + iNdEx++ + m.End |= uint32(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorsByTrace", wireType) } default: iNdEx = preIndex @@ -8434,7 +10147,7 @@ func (m *PushResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *PushBytesRequest) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8457,17 +10170,17 @@ func (m *PushBytesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PushBytesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PushBytesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Estimated", wireType) } - var byteLen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8477,32 +10190,36 @@ func (m *PushBytesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF + m.Estimated = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanCount", wireType) } - var v PreallocBytes - m.Traces = append(m.Traces, v) - if err := m.Traces[len(m.Traces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.SpanCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SpanCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorSpanCount", wireType) } - var byteLen int + m.ErrorSpanCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8512,32 +10229,16 @@ func (m *PushBytesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + m.ErrorSpanCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v PreallocBytes - m.Ids = append(m.Ids, v) - if err := m.Ids[len(m.Ids)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchData", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8547,24 +10248,23 @@ func (m *PushBytesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - var v PreallocBytes - m.SearchData = append(m.SearchData, v) - if err := m.SearchData[len(m.SearchData)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Metrics = append(m.Metrics, &SpanMetrics{}) + if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8589,7 +10289,7 @@ func (m *PushBytesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *PushSpansRequest) Unmarshal(dAtA []byte) error { +func (m *RawHistogram) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8612,17 +10312,17 @@ func (m *PushSpansRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PushSpansRequest: wiretype end group for non-group") + return fmt.Errorf("proto: RawHistogram: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PushSpansRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RawHistogram: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bucket", wireType) } - var msglen int + m.Bucket = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8632,26 +10332,30 @@ func (m *PushSpansRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Bucket |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) } - m.Batches = append(m.Batches, &v11.ResourceSpans{}) - if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -8673,7 +10377,7 @@ func (m *PushSpansRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *TraceBytes) Unmarshal(dAtA []byte) error { +func (m *KeyValue) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8696,17 +10400,17 @@ func (m *TraceBytes) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TraceBytes: wiretype end group for non-group") + return fmt.Errorf("proto: KeyValue: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TraceBytes: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8716,23 +10420,59 @@ func (m *TraceBytes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Traces = append(m.Traces, make([]byte, postIndex-iNdEx)) - copy(m.Traces[len(m.Traces)-1], dAtA[iNdEx:postIndex]) + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Value == nil { + m.Value = &TraceQLStatic{} + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -8755,7 +10495,7 @@ func (m *TraceBytes) Unmarshal(dAtA []byte) error { } return nil } -func (m *LinkSlice) Unmarshal(dAtA []byte) error { +func (m *SpanMetrics) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8778,17 +10518,85 @@ func (m *LinkSlice) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LinkSlice: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetrics: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LinkSlice: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetrics: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LatencyHistogram", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LatencyHistogram = append(m.LatencyHistogram, &RawHistogram{}) + if err := m.LatencyHistogram[len(m.LatencyHistogram)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Series = append(m.Series, &KeyValue{}) + if err := m.Series[len(m.Series)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) } - var msglen int + m.Errors = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8798,26 +10606,11 @@ func (m *LinkSlice) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Errors |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Links = append(m.Links, &v11.Span_Link{}) - if err := m.Links[len(m.Links)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -8839,7 +10632,7 @@ func (m *LinkSlice) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8862,17 +10655,17 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanMetricsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsSummary: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanMetricsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsSummary: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanCount", wireType) } - var stringLen uint64 + m.SpanCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8882,29 +10675,35 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.SpanCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorSpanCount", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + m.ErrorSpanCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ErrorSpanCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - m.Query = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8914,29 +10713,31 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.GroupBy = string(dAtA[iNdEx:postIndex]) + m.Series = append(m.Series, &KeyValue{}) + if err := m.Series[len(m.Series)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field P99", wireType) } - m.Limit = 0 + m.P99 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8946,16 +10747,16 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Limit |= uint64(b&0x7F) << shift + m.P99 |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field P95", wireType) } - m.Start = 0 + m.P95 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8965,16 +10766,16 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= uint32(b&0x7F) << shift + m.P95 |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 5: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field P90", wireType) } - m.End = 0 + m.P90 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8984,7 +10785,26 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= uint32(b&0x7F) << shift + m.P90 |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field P50", wireType) + } + m.P50 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.P50 |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -9010,7 +10830,7 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsSummaryResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9033,15 +10853,148 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanMetricsSummaryRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsSummaryResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanMetricsSummaryRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsSummaryResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Summaries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Summaries = append(m.Summaries, &SpanMetricsSummary{}) + if err := m.Summaries[len(m.Summaries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceQLStatic: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceQLStatic: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field N", wireType) + } + m.N = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.N |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.F = float64(math.Float64frombits(v)) + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9069,13 +11022,13 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Query = string(dAtA[iNdEx:postIndex]) + m.S = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9085,29 +11038,17 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GroupBy = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + m.B = bool(v != 0) + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field D", wireType) } - m.Limit = 0 + m.D = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9117,16 +11058,16 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Limit |= uint64(b&0x7F) << shift + m.D |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + case 7: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - m.Start = 0 + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9136,16 +11077,16 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= uint32(b&0x7F) << shift + m.Status |= int32(b&0x7F) << shift if b < 0x80 { break } } - case 5: + case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) } - m.End = 0 + m.Kind = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9155,7 +11096,7 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= uint32(b&0x7F) << shift + m.Kind |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -9181,7 +11122,7 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanMetricsResponse) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsData) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9204,17 +11145,17 @@ func (m *SpanMetricsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanMetricsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsData: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanMetricsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsData: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Estimated", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResultType", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9224,53 +11165,27 @@ func (m *SpanMetricsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.Estimated = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanCount", wireType) - } - m.SpanCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SpanCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorSpanCount", wireType) + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo } - m.ErrorSpanCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ErrorSpanCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if postIndex > l { + return io.ErrUnexpectedEOF } - case 4: + m.ResultType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9297,8 +11212,8 @@ func (m *SpanMetricsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Metrics = append(m.Metrics, &SpanMetrics{}) - if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Result = append(m.Result, &SpanMetricsResult{}) + if err := m.Result[len(m.Result)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9323,7 +11238,7 @@ func (m *SpanMetricsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *RawHistogram) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9346,36 +11261,17 @@ func (m *RawHistogram) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RawHistogram: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RawHistogram: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Bucket", wireType) - } - m.Bucket = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Bucket |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelName", wireType) } - m.Count = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9385,64 +11281,27 @@ func (m *RawHistogram) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Count |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipTempo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KeyValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KeyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.LabelName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LabelValue", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9470,11 +11329,11 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Key = string(dAtA[iNdEx:postIndex]) + m.LabelValue = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9501,10 +11360,8 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Value == nil { - m.Value = &TraceQLStatic{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Ts = append(m.Ts, &SpanMetricsResultPoint{}) + if err := m.Ts[len(m.Ts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9529,7 +11386,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanMetrics) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsResultPoint) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9552,17 +11409,17 @@ func (m *SpanMetrics) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanMetrics: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsResultPoint: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanMetrics: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsResultPoint: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LatencyHistogram", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) } - var msglen int + m.Time = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9572,31 +11429,27 @@ func (m *SpanMetrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Time |= uint32(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTempo + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Val", wireType) } - if postIndex > l { + var v uint64 + if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - m.LatencyHistogram = append(m.LatencyHistogram, &RawHistogram{}) - if err := m.LatencyHistogram[len(m.LatencyHistogram)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Val = float64(math.Float64frombits(v)) + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExemplarTraceID", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9606,31 +11459,31 @@ func (m *SpanMetrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Series = append(m.Series, &KeyValue{}) - if err := m.Series[len(m.Series)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.ExemplarTraceID = append(m.ExemplarTraceID[:0], dAtA[iNdEx:postIndex]...) + if m.ExemplarTraceID == nil { + m.ExemplarTraceID = []byte{} } iNdEx = postIndex - case 3: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExemplarDuration", wireType) } - m.Errors = 0 + m.ExemplarDuration = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9640,7 +11493,7 @@ func (m *SpanMetrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Errors |= uint64(b&0x7F) << shift + m.ExemplarDuration |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -9666,7 +11519,7 @@ func (m *SpanMetrics) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { +func (m *QueryRangeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9689,17 +11542,17 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanMetricsSummary: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRangeRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanMetricsSummary: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRangeRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanCount", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - m.SpanCount = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9709,16 +11562,29 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SpanCount |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Query = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorSpanCount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) } - m.ErrorSpanCount = 0 + m.Start = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9728,16 +11594,16 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ErrorSpanCount |= uint64(b&0x7F) << shift + m.Start |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) } - var msglen int + m.End = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9747,31 +11613,16 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.End |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Series = append(m.Series, &KeyValue{}) - if err := m.Series[len(m.Series)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field P99", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) } - m.P99 = 0 + m.Step = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9781,16 +11632,16 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.P99 |= uint64(b&0x7F) << shift + m.Step |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field P95", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ShardID", wireType) } - m.P95 = 0 + m.ShardID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9800,35 +11651,16 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.P95 |= uint64(b&0x7F) << shift + m.ShardID |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field P90", wireType) - } - m.P90 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.P90 |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field P50", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ShardCount", wireType) } - m.P50 = 0 + m.ShardCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9838,7 +11670,7 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.P50 |= uint64(b&0x7F) << shift + m.ShardCount |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -9864,7 +11696,7 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanMetricsSummaryResponse) Unmarshal(dAtA []byte) error { +func (m *QueryRangeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9887,15 +11719,15 @@ func (m *SpanMetricsSummaryResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanMetricsSummaryResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRangeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanMetricsSummaryResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRangeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Summaries", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9922,8 +11754,8 @@ func (m *SpanMetricsSummaryResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Summaries = append(m.Summaries, &SpanMetricsSummary{}) - if err := m.Summaries[len(m.Summaries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Series = append(m.Series, &TimeSeries{}) + if err := m.Series[len(m.Series)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9948,7 +11780,7 @@ func (m *SpanMetricsSummaryResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { +func (m *Sample) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9971,36 +11803,28 @@ func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TraceQLStatic: wiretype end group for non-group") + return fmt.Errorf("proto: Sample: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TraceQLStatic: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Sample: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= int32(b&0x7F) << shift - if b < 0x80 { - break - } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Value = float64(math.Float64frombits(v)) case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field N", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TimestampMs", wireType) } - m.N = 0 + m.TimestampMs = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -10010,27 +11834,66 @@ func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.N |= int64(b&0x7F) << shift + m.TimestampMs |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err } - var v uint64 - if (iNdEx + 8) > l { + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.F = float64(math.Float64frombits(v)) - case 4: + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TimeSeries) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TimeSeries: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TimeSeries: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -10040,29 +11903,31 @@ func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.S = string(dAtA[iNdEx:postIndex]) + m.Labels = append(m.Labels, v1.KeyValue{}) + if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -10072,55 +11937,31 @@ func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.B = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field D", wireType) + if msglen < 0 { + return ErrInvalidLengthTempo } - m.D = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.D |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= int32(b&0x7F) << shift - if b < 0x80 { - break - } + m.Samples = append(m.Samples, Sample{}) + if err := m.Samples[len(m.Samples)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PromLabels", wireType) } - m.Kind = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -10130,11 +11971,24 @@ func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Kind |= int32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PromLabels = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) diff --git a/pkg/tempopb/tempo.proto b/pkg/tempopb/tempo.proto index c20e6695d7b..cfb22645bb7 100644 --- a/pkg/tempopb/tempo.proto +++ b/pkg/tempopb/tempo.proto @@ -1,31 +1,33 @@ -syntax="proto3"; +syntax = "proto3"; package tempopb; -import "trace/v1/trace.proto"; import "common/v1/common.proto"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "trace/v1/trace.proto"; service Pusher { - // different versions of PushBytes expect the trace data to be pushed in different formats - rpc PushBytes(PushBytesRequest) returns (PushResponse) {}; // ./pkg/model/v1 - rpc PushBytesV2(PushBytesRequest) returns (PushResponse) {}; // ./pkg/model/v2 + // different versions of PushBytes expect the trace data to be pushed in + // different formats + rpc PushBytes(PushBytesRequest) returns (PushResponse) {} + rpc PushBytesV2(PushBytesRequest) returns (PushResponse) {} } service MetricsGenerator { - rpc PushSpans(PushSpansRequest) returns (PushResponse) {}; - rpc GetMetrics(SpanMetricsRequest) returns (SpanMetricsResponse) {}; + rpc PushSpans(PushSpansRequest) returns (PushResponse) {} + rpc GetMetrics(SpanMetricsRequest) returns (SpanMetricsResponse) {} } service Querier { - rpc FindTraceByID(TraceByIDRequest) returns (TraceByIDResponse) {}; - rpc SearchRecent(SearchRequest) returns (SearchResponse) {}; - rpc SearchBlock(SearchBlockRequest) returns (SearchResponse) {}; - rpc SearchTags(SearchTagsRequest) returns (SearchTagsResponse) {}; - rpc SearchTagsV2(SearchTagsRequest) returns (SearchTagsV2Response) {}; - rpc SearchTagValues(SearchTagValuesRequest) returns (SearchTagValuesResponse) {}; - rpc SearchTagValuesV2(SearchTagValuesRequest) returns (SearchTagValuesV2Response) {}; - // rpc SpanMetricsSummary(SpanMetricsSummaryRequest) returns (SpanMetricsSummaryResponse) {}; + rpc FindTraceByID(TraceByIDRequest) returns (TraceByIDResponse) {} + rpc SearchRecent(SearchRequest) returns (SearchResponse) {} + rpc SearchBlock(SearchBlockRequest) returns (SearchResponse) {} + rpc SearchTags(SearchTagsRequest) returns (SearchTagsResponse) {} + rpc SearchTagsV2(SearchTagsRequest) returns (SearchTagsV2Response) {} + rpc SearchTagValues(SearchTagValuesRequest) returns (SearchTagValuesResponse) {} + rpc SearchTagValuesV2(SearchTagValuesRequest) returns (SearchTagValuesV2Response) {} + // rpc SpanMetricsSummary(SpanMetricsSummaryRequest) returns + // (SpanMetricsSummaryResponse) {}; } service StreamingQuerier { @@ -34,6 +36,7 @@ service StreamingQuerier { service Metrics { rpc SpanMetricsSummary(SpanMetricsSummaryRequest) returns (SpanMetricsSummaryResponse) {} + rpc QueryRange(QueryRangeRequest) returns (QueryRangeResponse) {} } // Read @@ -49,8 +52,7 @@ message TraceByIDResponse { TraceByIDMetrics metrics = 2; } -message TraceByIDMetrics { -} +message TraceByIDMetrics {} // SearchRequest takes no block parameters and implies a "recent traces" search message SearchRequest { @@ -66,8 +68,8 @@ message SearchRequest { uint32 SpansPerSpanSet = 9; } -// SearchBlockRequest takes SearchRequest parameters as well as all information necessary -// to search a block in the backend. +// SearchBlockRequest takes SearchRequest parameters as well as all information +// necessary to search a block in the backend. message SearchBlockRequest { SearchRequest searchReq = 1; string blockID = 2; @@ -186,15 +188,25 @@ enum PushErrorReason { UNKNOWN_ERROR = 3; } -// PushBytesRequest pushes slices of traces, ids and searchdata. Traces are encoded using the +// PushBytesRequest pushes slices of traces, ids and searchdata. Traces are +// encoded using the // current BatchDecoder in ./pkg/model message PushBytesRequest { // pre-marshalled Traces. length must match ids - repeated bytes traces = 2 [(gogoproto.nullable) = false, (gogoproto.customtype) = "PreallocBytes"]; + repeated bytes traces = 2 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "PreallocBytes" + ]; // trace ids. length must match traces - repeated bytes ids = 3 [(gogoproto.nullable) = false, (gogoproto.customtype) = "PreallocBytes"]; + repeated bytes ids = 3 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "PreallocBytes" + ]; // search data, length must match traces - repeated bytes searchData = 4 [(gogoproto.nullable) = false, (gogoproto.customtype) = "PreallocBytes"]; + repeated bytes searchData = 4 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "PreallocBytes" + ]; } message PushSpansRequest { @@ -207,9 +219,10 @@ message TraceBytes { repeated bytes traces = 1; } -// this message exists for marshalling/unmarshalling convenience to/from parquet. in parquet we proto encode -// links to a column. unfortunately you can't encode a slice directly so we use this wrapper to generate -// the required marshalling/unmarshalling functions. +// this message exists for marshalling/unmarshalling convenience to/from +// parquet. in parquet we proto encode links to a column. unfortunately you +// can't encode a slice directly so we use this wrapper to generate the required +// marshalling/unmarshalling functions. message LinkSlice { repeated tempopb.trace.v1.Span.Link links = 1; } @@ -277,3 +290,53 @@ message TraceQLStatic { int32 status = 7; int32 kind = 8; } + +message SpanMetricsData { + string resultType = 1; + repeated SpanMetricsResult result = 2; +} + +message SpanMetricsResult { + string labelName = 1; // if these are empty it is the primary trend + string labelValue = 2; + repeated SpanMetricsResultPoint ts = 3; +} + +message SpanMetricsResultPoint { + uint32 time = 1; + double val = 2; + bytes exemplarTraceID = 3; + uint64 exemplarDuration = 4; +} + +message QueryRangeRequest { + string query = 1; + uint64 start = 2; + uint64 end = 3; + uint64 step = 4; + uint32 shardID = 5; + uint32 shardCount = 6; +} + +message QueryRangeResponse { + repeated TimeSeries series = 1; +} + +message Sample { + // Fields order MUST match promql.FPoint so that we can cast types between them. + int64 timestamp_ms = 2; + double value = 1; +} + +// https : // github.com/grafana/mimir/blob/main/pkg/mimirpb/mimir.proto#L53 +message TimeSeries { + // repeated LabelPair labels = 1 [(gogoproto.nullable) = false, + // (gogoproto.customtype) = "LabelAdapter"]; + repeated tempopb.common.v1.KeyValue labels = 1 [(gogoproto.nullable) = false]; + // Sorted by time, oldest sample first. + repeated Sample samples = 2 [(gogoproto.nullable) = false]; + // repeated Exemplar exemplars = 3 [ (gogoproto.nullable) = false ]; + // repeated Histogram histograms = 4 [ (gogoproto.nullable) = false ]; + // TODO: review the LabelAdapter and migrate the use of this string + string prom_labels = 3; +} diff --git a/pkg/traceql/ast.go b/pkg/traceql/ast.go index b1343d67aa9..349e97184c8 100644 --- a/pkg/traceql/ast.go +++ b/pkg/traceql/ast.go @@ -5,6 +5,8 @@ import ( "math" "regexp" "time" + + "github.com/grafana/tempo/pkg/tempopb" ) type Element interface { @@ -12,6 +14,14 @@ type Element interface { validate() error } +type metricsFirstStageElement interface { + Element + extractConditions(request *FetchSpansRequest) + init(*tempopb.QueryRangeRequest) + observe(Span) // TODO - batching? + result() SeriesSet +} + type pipelineElement interface { Element extractConditions(request *FetchSpansRequest) @@ -23,7 +33,8 @@ type typedExpression interface { } type RootExpr struct { - Pipeline Pipeline + Pipeline Pipeline + MetricsPipeline metricsFirstStageElement } func newRootExpr(e pipelineElement) *RootExpr { @@ -37,6 +48,18 @@ func newRootExpr(e pipelineElement) *RootExpr { } } +func newRootExprWithMetrics(e pipelineElement, m metricsFirstStageElement) *RootExpr { + p, ok := e.(Pipeline) + if !ok { + p = newPipeline(e) + } + + return &RootExpr{ + Pipeline: p, + MetricsPipeline: m, + } +} + // ********************** // Pipeline // ********************** @@ -130,12 +153,12 @@ func (o CoalesceOperation) extractConditions(*FetchSpansRequest) { } type SelectOperation struct { - exprs []FieldExpression + attrs []Attribute } -func newSelectOperation(exprs []FieldExpression) SelectOperation { +func newSelectOperation(exprs []Attribute) SelectOperation { return SelectOperation{ - exprs: exprs, + attrs: exprs, } } @@ -718,3 +741,70 @@ var ( _ pipelineElement = (*ScalarFilter)(nil) _ pipelineElement = (*GroupOperation)(nil) ) + +type MetricsAggregate struct { + op MetricsAggregateOp + by []Attribute + agg SpanAggregator +} + +func newMetricsAggregate(agg MetricsAggregateOp, by []Attribute) *MetricsAggregate { + return &MetricsAggregate{ + op: agg, + by: by, + } +} + +func (a *MetricsAggregate) extractConditions(request *FetchSpansRequest) { + switch a.op { + case metricsAggregateRate, metricsAggregateCountOverTime: + // No extra conditions, start time is already enough + } + + selectR := &FetchSpansRequest{} + // copy any conditions to the normal request's SecondPassConditions + for _, b := range a.by { + b.extractConditions(selectR) + } + request.SecondPassConditions = append(request.SecondPassConditions, selectR.Conditions...) +} + +func (a *MetricsAggregate) init(q *tempopb.QueryRangeRequest) { + var innerAgg func() VectorAggregator + + switch a.op { + case metricsAggregateCountOverTime: + innerAgg = func() VectorAggregator { return NewCountOverTimeAggregator() } + case metricsAggregateRate: + innerAgg = func() VectorAggregator { return NewRateAggregator(1.0 / time.Duration(q.Step).Seconds()) } + } + + a.agg = NewGroupingAggregator(a.op.String(), func() RangeAggregator { + return NewStepAggregator(q.Start, q.End, q.Step, innerAgg) + }, a.by) +} + +func (a *MetricsAggregate) observe(span Span) { + a.agg.Observe(span) +} + +func (a *MetricsAggregate) result() SeriesSet { + return a.agg.Series() +} + +func (a *MetricsAggregate) validate() error { + switch a.op { + case metricsAggregateCountOverTime: + case metricsAggregateRate: + default: + return newUnsupportedError(fmt.Sprintf("metrics aggregate operation (%v)", a.op)) + } + + if len(a.by) > maxGroupBys { + return newUnsupportedError(fmt.Sprintf("metrics group by %v values", len(a.by))) + } + + return nil +} + +var _ metricsFirstStageElement = (*MetricsAggregate)(nil) diff --git a/pkg/traceql/ast_conditions.go b/pkg/traceql/ast_conditions.go index d723ae1deed..aa9e0284a97 100644 --- a/pkg/traceql/ast_conditions.go +++ b/pkg/traceql/ast_conditions.go @@ -1,5 +1,12 @@ package traceql +func (r RootExpr) extractConditions(request *FetchSpansRequest) { + r.Pipeline.extractConditions(request) + if r.MetricsPipeline != nil { + r.MetricsPipeline.extractConditions(request) + } +} + func (f SpansetFilter) extractConditions(request *FetchSpansRequest) { f.Expression.extractConditions(request) @@ -24,7 +31,7 @@ func (f SpansetFilter) extractConditions(request *FetchSpansRequest) { // extractConditions on Select puts its conditions into the SecondPassConditions func (o SelectOperation) extractConditions(request *FetchSpansRequest) { selectR := &FetchSpansRequest{} - for _, expr := range o.exprs { + for _, expr := range o.attrs { expr.extractConditions(selectR) } // copy any conditions to the normal request's SecondPassConditions diff --git a/pkg/traceql/ast_stringer.go b/pkg/traceql/ast_stringer.go index d908594c2ca..194654890ea 100644 --- a/pkg/traceql/ast_stringer.go +++ b/pkg/traceql/ast_stringer.go @@ -27,8 +27,8 @@ func (o CoalesceOperation) String() string { } func (o SelectOperation) String() string { - s := make([]string, 0, len(o.exprs)) - for _, e := range o.exprs { + s := make([]string, 0, len(o.attrs)) + for _, e := range o.attrs { s = append(s, e.String()) } return "select(" + strings.Join(s, ", ") + ")" @@ -118,13 +118,17 @@ func (a Attribute) String() string { } // Top-level attributes get a "." but top-level intrinsics don't - if scope == "" && a.Intrinsic == IntrinsicNone { + if scope == "" && a.Intrinsic == IntrinsicNone && len(att) > 0 { scope += "." } return scope + att } +func (a MetricsAggregate) String() string { + return a.op.String() +} + func binaryOp(op Operator, lhs Element, rhs Element) string { return wrapElement(lhs) + " " + op.String() + " " + wrapElement(rhs) } diff --git a/pkg/traceql/ast_validate.go b/pkg/traceql/ast_validate.go index aeb9d4eff8a..c5ea45a3285 100644 --- a/pkg/traceql/ast_validate.go +++ b/pkg/traceql/ast_validate.go @@ -19,7 +19,16 @@ func (e *unsupportedError) Error() string { } func (r RootExpr) validate() error { - return r.Pipeline.validate() + err := r.Pipeline.validate() + if err != nil { + return err + } + + if r.MetricsPipeline != nil { + return r.MetricsPipeline.validate() + } + + return nil } func (p Pipeline) validate() error { @@ -46,7 +55,7 @@ func (o CoalesceOperation) validate() error { } func (o SelectOperation) validate() error { - for _, e := range o.exprs { + for _, e := range o.attrs { if err := e.validate(); err != nil { return err } diff --git a/pkg/traceql/combine.go b/pkg/traceql/combine.go index 60ea04fd5f6..85ffa36193b 100644 --- a/pkg/traceql/combine.go +++ b/pkg/traceql/combine.go @@ -5,6 +5,7 @@ import ( "strings" "github.com/grafana/tempo/pkg/tempopb" + "golang.org/x/exp/maps" ) type MetadataCombiner struct { @@ -119,3 +120,46 @@ func spansetID(ss *tempopb.SpanSet) string { return id } + +type QueryRangeCombiner struct { + ts map[string]*tempopb.TimeSeries +} + +func (q *QueryRangeCombiner) Combine(set []*tempopb.TimeSeries) { + if len(set) == 0 { + return + } + + if q.ts == nil { + q.ts = make(map[string]*tempopb.TimeSeries, len(set)) + } + + for _, series := range set { + + existing, ok := q.ts[series.PromLabels] + if !ok { + q.ts[series.PromLabels] = series + continue + } + + q.combine(series, existing) + } +} + +func (QueryRangeCombiner) combine(in *tempopb.TimeSeries, out *tempopb.TimeSeries) { +outer: + for _, sample := range in.Samples { + for i, existing := range out.Samples { + if sample.TimestampMs == existing.TimestampMs { + out.Samples[i].Value += sample.Value + continue outer + } + } + + out.Samples = append(out.Samples, sample) + } +} + +func (q *QueryRangeCombiner) Results() []*tempopb.TimeSeries { + return maps.Values(q.ts) +} diff --git a/pkg/traceql/engine.go b/pkg/traceql/engine.go index db476e96ae1..7686470f585 100644 --- a/pkg/traceql/engine.go +++ b/pkg/traceql/engine.go @@ -24,18 +24,23 @@ func NewEngine() *Engine { return &Engine{} } -func (e *Engine) Compile(query string) (func(input []*Spanset) (result []*Spanset, err error), *FetchSpansRequest, error) { +func (e *Engine) Compile(query string) (func(input []*Spanset) (result []*Spanset, err error), metricsFirstStageElement, *FetchSpansRequest, error) { expr, err := Parse(query) if err != nil { - return nil, nil, err + return nil, nil, nil, err } req := &FetchSpansRequest{ AllConditions: true, } - expr.Pipeline.extractConditions(req) + expr.extractConditions(req) - return expr.Pipeline.evaluate, req, nil + err = expr.validate() + if err != nil { + return nil, nil, nil, err + } + + return expr.Pipeline.evaluate, expr.MetricsPipeline, req, nil } func (e *Engine) ExecuteSearch(ctx context.Context, searchReq *tempopb.SearchRequest, spanSetFetcher SpansetFetcher) (*tempopb.SearchResponse, error) { @@ -252,7 +257,7 @@ func (e *Engine) asTraceSearchMetadata(spanset *Spanset) *tempopb.TraceSearchMet continue } - staticAnyValue := static.asAnyValue() + staticAnyValue := static.AsAnyValue() keyValue := &common_v1.KeyValue{ Key: attribute.Name, @@ -279,7 +284,7 @@ func (e *Engine) asTraceSearchMetadata(spanset *Spanset) *tempopb.TraceSearchMet continue } - staticAnyValue := att.Val.asAnyValue() + staticAnyValue := att.Val.AsAnyValue() keyValue := &common_v1.KeyValue{ Key: att.Name, Value: staticAnyValue, @@ -294,7 +299,7 @@ func unixSecToNano(ts uint32) uint64 { return uint64(ts) * uint64(time.Second/time.Nanosecond) } -func (s Static) asAnyValue() *common_v1.AnyValue { +func (s Static) AsAnyValue() *common_v1.AnyValue { switch s.Type { case TypeInt: return &common_v1.AnyValue{ diff --git a/pkg/traceql/engine_metrics.go b/pkg/traceql/engine_metrics.go new file mode 100644 index 00000000000..541e8950f19 --- /dev/null +++ b/pkg/traceql/engine_metrics.go @@ -0,0 +1,565 @@ +package traceql + +import ( + "context" + "encoding/binary" + "errors" + "fmt" + "hash" + "hash/fnv" + "sync" + "time" + + "github.com/prometheus/prometheus/model/labels" + + "github.com/grafana/tempo/pkg/tempopb" + "github.com/grafana/tempo/pkg/util" +) + +func DefaultQueryRangeStep(start, end uint64) uint64 { + delta := time.Duration(end - start) + + // Try to get this many data points + // Our baseline is is 1 hour @ 15s intervals + baseline := delta / 240 + + // Round down in intervals of 5s + interval := baseline / (5 * time.Second) * (5 * time.Second) + + if interval < 5*time.Second { + // Round down in intervals of 1s + interval = baseline / time.Second * time.Second + } + + if interval < time.Second { + return uint64(time.Second.Nanoseconds()) + } + + return uint64(interval.Nanoseconds()) +} + +// IntervalCount is the number of intervals in the range with step. +func IntervalCount(start, end, step uint64) int { + intervals := (end - start) / step + intervals++ + return int(intervals) +} + +// TimestampOf the given interval with the start and step. +func TimestampOf(interval, start, step uint64) uint64 { + return start + interval*step +} + +// IntervalOf the given timestamp within the range and step. +func IntervalOf(ts, start, end, step uint64) int { + if ts < start || ts > end || end == start || step == 0 { + // Invalid + return -1 + } + + return int((ts - start) / step) +} + +type TimeSeries struct { + Labels labels.Labels + Values []float64 +} + +// SeriesSet is a set of unique timeseries. They are mapped by the "Prometheus"-style +// text description: {x="a",y="b"} +type SeriesSet map[string]TimeSeries + +// VectorAggregator turns a vector of spans into a single numeric scalar +type VectorAggregator interface { + Observe(s Span) + Sample() float64 +} + +// RangeAggregator sorts spans into time slots +// TODO - for efficiency we probably combine this with VectorAggregator (see todo about CountOverTimeAggregator) +type RangeAggregator interface { + Observe(s Span) + Samples() []float64 +} + +// SpanAggregator sorts spans into series +type SpanAggregator interface { + Observe(Span) + Series() SeriesSet +} + +// CountOverTimeAggregator counts the number of spans. It can also +// calculate the rate when given a multiplier. +// TODO - Rewrite me to be []float64 which is more efficient +type CountOverTimeAggregator struct { + count float64 + rateMult float64 +} + +var _ VectorAggregator = (*CountOverTimeAggregator)(nil) + +func NewCountOverTimeAggregator() *CountOverTimeAggregator { + return &CountOverTimeAggregator{ + rateMult: 1.0, + } +} + +func NewRateAggregator(rateMult float64) *CountOverTimeAggregator { + return &CountOverTimeAggregator{ + rateMult: rateMult, + } +} + +func (c *CountOverTimeAggregator) Observe(_ Span) { + c.count++ +} + +func (c *CountOverTimeAggregator) Sample() float64 { + return c.count * c.rateMult +} + +// StepAggregator sorts spans into time slots using a step interval like 30s or 1m +type StepAggregator struct { + start uint64 + end uint64 + step uint64 + vectors []VectorAggregator +} + +var _ RangeAggregator = (*StepAggregator)(nil) + +func NewStepAggregator(start, end, step uint64, innerAgg func() VectorAggregator) *StepAggregator { + intervals := IntervalCount(start, end, step) + vectors := make([]VectorAggregator, intervals) + for i := range vectors { + vectors[i] = innerAgg() + } + + return &StepAggregator{ + start: start, + end: end, + step: step, + vectors: vectors, + } +} + +func (s *StepAggregator) Observe(span Span) { + interval := IntervalOf(span.StartTimeUnixNanos(), s.start, s.end, s.step) + if interval == -1 { + return + } + s.vectors[interval].Observe(span) +} + +func (s *StepAggregator) Samples() []float64 { + ss := make([]float64, len(s.vectors)) + for i, v := range s.vectors { + ss[i] = v.Sample() + } + return ss +} + +const maxGroupBys = 5 // TODO - This isn't ideal but see comment below. + +// FastValues is an array of attribute values (static values) that can be used +// as a map key. This offers good performance and works with native Go maps and +// has no chance for collisions (whereas a hash32 has a non-zero chance of +// collisions). However it means we have to arbitrarily set an upper limit on +// the maximum number of values. +type FastValues [maxGroupBys]Static + +// GroupingAggregator groups spans into series based on attribute values. +type GroupingAggregator struct { + // Config + by []Attribute // Original attributes: .foo + byLookups [][]Attribute // Lookups: span.foo resource.foo + innerAgg func() RangeAggregator + + // Data + series map[FastValues]RangeAggregator + buf FastValues +} + +var _ SpanAggregator = (*GroupingAggregator)(nil) + +func NewGroupingAggregator(aggName string, innerAgg func() RangeAggregator, by []Attribute) SpanAggregator { + if len(by) == 0 { + return &UngroupedAggregator{ + name: aggName, + innerAgg: innerAgg(), + } + } + + lookups := make([][]Attribute, len(by)) + for i, attr := range by { + if attr.Intrinsic == IntrinsicNone && attr.Scope == AttributeScopeNone { + // Unscoped attribute. Check span-level, then resource-level. + // TODO - Is this taken care of by span.AttributeFor now? + lookups[i] = []Attribute{ + NewScopedAttribute(AttributeScopeSpan, false, attr.Name), + NewScopedAttribute(AttributeScopeResource, false, attr.Name), + } + } else { + lookups[i] = []Attribute{attr} + } + } + + return &GroupingAggregator{ + series: map[FastValues]RangeAggregator{}, + by: by, + byLookups: lookups, + innerAgg: innerAgg, + } +} + +// Observe the span by looking up its group-by attributes, mapping to the series, +// and passing to the inner aggregate. This is a critical hot path. +func (g *GroupingAggregator) Observe(span Span) { + // Get grouping values + // Reuse same buffer + for i, lookups := range g.byLookups { + g.buf[i] = lookup(lookups, span) + } + + agg, ok := g.series[g.buf] + if !ok { + agg = g.innerAgg() + g.series[g.buf] = agg + } + + agg.Observe(span) +} + +// labelsFor gives the final labels for the series. Slower and not on the hot path. +// This is tweaked to match what prometheus does where possible with an exception. +// In the case of all values missing. +// (1) Standard case: a label is created for each group-by value in the series: +// +// Ex: rate() by (x,y) can yield: +// {x=a,y=b} +// {x=c,y=d} +// etc +// +// (2) Nils are dropped. A nil can be present for any label, so any combination +// of the remaining labels is possible. Label order is preserved. +// +// Ex: rate() by (x,y,z) can yield all of these combinations: +// {x=..., y=..., z=...} +// {x=..., z=...} +// {x=... } +// { y=..., z=...} +// { y=... } +// etc +// +// (3) Exceptional case: All Nils. Real Prometheus-style metrics have a name, so there is +// always at least 1 label. Not so here. We have to force at least 1 label or else things +// may not be handled correctly downstream. In this case we take the first label and +// make it the string "nil" +// +// Ex: rate() by (x,y,z) and all nil yields: +// {x="nil"} +func (g *GroupingAggregator) labelsFor(vals FastValues) labels.Labels { + b := labels.NewBuilder(nil) + + present := false + for i, v := range vals { + if v.Type != TypeNil { + b.Set(g.by[i].String(), v.EncodeToString(false)) + present = true + } + } + + if !present { + b.Set(g.by[0].String(), "") + } + + return b.Labels() +} + +func (g *GroupingAggregator) Series() SeriesSet { + ss := SeriesSet{} + + for vals, agg := range g.series { + l := g.labelsFor(vals) + + ss[l.String()] = TimeSeries{ + Labels: l, + Values: agg.Samples(), + } + } + + return ss +} + +// UngroupedAggregator builds a single series with no labels. e.g. {} | rate() +type UngroupedAggregator struct { + name string + innerAgg RangeAggregator +} + +var _ SpanAggregator = (*UngroupedAggregator)(nil) + +func (u *UngroupedAggregator) Observe(span Span) { + u.innerAgg.Observe(span) +} + +// Series output. +// This is tweaked to match what prometheus does. For ungrouped metrics we +// fill in a placeholder metric name with the name of the aggregation. +// rate() => {__name__=rate} +func (u *UngroupedAggregator) Series() SeriesSet { + l := labels.FromStrings(labels.MetricName, u.name) + return SeriesSet{ + l.String(): { + Labels: l, + Values: u.innerAgg.Samples(), + }, + } +} + +// ExecuteMetricsQueryRange - Execute the given metrics query. Just a wrapper around CompileMetricsQueryRange +func (e *Engine) ExecuteMetricsQueryRange(ctx context.Context, req *tempopb.QueryRangeRequest, fetcher SpansetFetcher) (results SeriesSet, err error) { + eval, err := e.CompileMetricsQueryRange(req, false) + if err != nil { + return nil, err + } + + err = eval.Do(ctx, fetcher) + if err != nil { + return nil, err + } + + return eval.Results() +} + +// CompileMetricsQueryRange returns an evalulator that can be reused across multiple data sources. +func (e *Engine) CompileMetricsQueryRange(req *tempopb.QueryRangeRequest, dedupeSpans bool) (*MetricsEvalulator, error) { + if req.Start <= 0 { + return nil, fmt.Errorf("start required") + } + if req.End <= 0 { + return nil, fmt.Errorf("end required") + } + if req.End <= req.Start { + return nil, fmt.Errorf("end must be greater than start") + } + if req.Step <= 0 { + return nil, fmt.Errorf("step required") + } + + eval, metricsPipeline, storageReq, err := e.Compile(req.Query) + if err != nil { + return nil, fmt.Errorf("compiling query: %w", err) + } + + if metricsPipeline == nil { + return nil, fmt.Errorf("not a metrics query") + } + + // This initializes all step buffers, counters, etc + metricsPipeline.init(req) + + me := &MetricsEvalulator{ + storageReq: storageReq, + metricsPipeline: metricsPipeline, + dedupeSpans: dedupeSpans, + } + + if req.ShardCount > 1 { + // Trace id sharding + // Select traceID if not already present. It must be in the first pass + // so that we only evalulate our traces. + storageReq.ShardID = req.ShardID + storageReq.ShardCount = req.ShardCount + traceID := NewIntrinsic(IntrinsicTraceID) + if !storageReq.HasAttribute(traceID) { + storageReq.Conditions = append(storageReq.Conditions, Condition{Attribute: traceID}) + } + } + + // Sharding algorithm + // In order to scale out queries like {A} >> {B} | rate() we need specific + // rules about the data is divided across time boundary shards. These + // spans can cross hours or days and the simple idea to just check span + // start time won't work. + // Therefore results are matched with the following rules: + // (1) Evalulate the query for any overlapping trace + // (2) For any matching spans: only include the ones that started in this time frame. + // This will increase redundant trace evalulation, but it ensures that matching spans are + // guaranteed to be found and included in the metrcs. + startTime := NewIntrinsic(IntrinsicSpanStartTime) + if !storageReq.HasAttribute(startTime) { + if storageReq.AllConditions { + // The most efficient case. We can add it to the primary pass + // without affecting correctness. And this lets us avoid the + // entire second pass. + storageReq.Conditions = append(storageReq.Conditions, Condition{Attribute: startTime}) + } else { + // Complex query with a second pass. In this case it is better to + // add it to the second pass so that it's only returned for the matches. + storageReq.SecondPassConditions = append(storageReq.SecondPassConditions, Condition{Attribute: startTime}) + } + } + + // Special optimization for queries like {} | rate() by (rootName) + // If first pass is only StartTime, then move any intrinsics to the first + // pass and try to avoid a second pass. It's ok and beneficial to move + // intrinsics because they exist for every span and are never nil. + // But we can't move attributes because that changes the handling of nils. + // Moving attributes to the first pass is like asserting non-nil on them. + // TODO + + if dedupeSpans { + // We dedupe based on trace ID and start time. Obviously this doesn't + // work if 2 spans have the same start time, but this doesn't impose any + // more data on the query when sharding is already present above (most cases) + traceID := NewIntrinsic(IntrinsicTraceID) + if !storageReq.HasAttribute(traceID) { + storageReq.Conditions = append(storageReq.Conditions, Condition{Attribute: traceID}) + } + } + + // (1) any overlapping trace + // TODO - Make this dynamic since it can be faster to skip + // the trace-level timestamp check when all or most of the traces + // overlap the window. + // storageReq.StartTimeUnixNanos = req.Start + // storageReq.EndTimeUnixNanos = req.End // Should this be exclusive? + // (2) Only include spans that started in this time frame. + // This is checked inside the evaluator + me.checkTime = true + me.start = req.Start + me.end = req.End + + // Avoid a second pass when not needed for much better performance. + // TODO - Is there any case where eval() needs to be called but AllConditions=true? + if !storageReq.AllConditions || len(storageReq.SecondPassConditions) > 0 { + storageReq.SecondPass = func(s *Spanset) ([]*Spanset, error) { + return eval([]*Spanset{s}) + } + } + + return me, nil +} + +func lookup(needles []Attribute, haystack Span) Static { + for _, n := range needles { + if v, ok := haystack.AttributeFor(n); ok { + return v + } + } + + return Static{} +} + +type MetricsEvalulator struct { + start, end uint64 + checkTime bool + dedupeSpans bool + deduper *SpanDeduper2 + storageReq *FetchSpansRequest + metricsPipeline metricsFirstStageElement + count int + deduped int + mtx sync.Mutex +} + +func (e *MetricsEvalulator) Do(ctx context.Context, f SpansetFetcher) error { + fetch, err := f.Fetch(ctx, *e.storageReq) + if errors.Is(err, util.ErrUnsupported) { + return nil + } + if err != nil { + return err + } + + if e.dedupeSpans && e.deduper == nil { + e.deduper = NewSpanDeduper2() + } + + defer fetch.Results.Close() + + for { + ss, err := fetch.Results.Next(ctx) + if err != nil { + return err + } + if ss == nil { + break + } + + for _, s := range ss.Spans { + if e.checkTime { + st := s.StartTimeUnixNanos() + if st < e.start || st >= e.end { + continue + } + } + + e.mtx.Lock() + if e.dedupeSpans && e.deduper.Skip(ss.TraceID, s.StartTimeUnixNanos()) { + e.deduped++ + e.mtx.Unlock() + continue + } + + e.count++ + e.metricsPipeline.observe(s) + e.mtx.Unlock() + } + + ss.Release() + } + + return nil +} + +func (e *MetricsEvalulator) SpanCount() { + fmt.Println(e.count, e.deduped) +} + +func (e *MetricsEvalulator) Results() (SeriesSet, error) { + return e.metricsPipeline.result(), nil +} + +// SpanDeduper2 is EXTREMELY LAZY. It attempts to dedupe spans for metrics +// without requiring any new data fields. It uses trace ID and span start time +// which are already loaded. This of course terrible, but did I mention that +// this is extremely lazy? Additionally it uses sharded maps by the lowest byte +// of the trace ID to reduce the pressure on any single map. Maybe it's good enough. Let's find out! +type SpanDeduper2 struct { + m []map[uint32]struct{} + h hash.Hash32 + buf []byte + traceID Attribute +} + +func NewSpanDeduper2() *SpanDeduper2 { + maps := make([]map[uint32]struct{}, 256) + for i := range maps { + maps[i] = make(map[uint32]struct{}, 1000) + } + return &SpanDeduper2{ + m: maps, + h: fnv.New32a(), + buf: make([]byte, 8), + traceID: NewIntrinsic(IntrinsicTraceID), + } +} + +func (d *SpanDeduper2) Skip(tid []byte, startTime uint64) bool { + d.h.Reset() + d.h.Write(tid) + binary.BigEndian.PutUint64(d.buf, startTime) + d.h.Write(d.buf) + + v := d.h.Sum32() + m := d.m[tid[len(tid)-1]] + + if _, ok := m[v]; ok { + return true + } + + m[v] = struct{}{} + return false +} diff --git a/pkg/traceql/engine_metrics_test.go b/pkg/traceql/engine_metrics_test.go new file mode 100644 index 00000000000..3bef2a21d39 --- /dev/null +++ b/pkg/traceql/engine_metrics_test.go @@ -0,0 +1,241 @@ +package traceql + +import ( + "fmt" + "testing" + "time" + + "github.com/grafana/tempo/pkg/tempopb" + "github.com/stretchr/testify/require" +) + +func TestDefaultQueryRangeStep(t *testing.T) { + tc := []struct { + start, end time.Time + expected time.Duration + }{ + {time.Unix(0, 0), time.Unix(100, 0), time.Second}, + {time.Unix(0, 0), time.Unix(600, 0), 2 * time.Second}, + {time.Unix(0, 0), time.Unix(3600, 0), 15 * time.Second}, + } + + for _, c := range tc { + require.Equal(t, c.expected, time.Duration(DefaultQueryRangeStep(uint64(c.start.UnixNano()), uint64(c.end.UnixNano())))) + } +} + +func TestStepRangeToIntervals(t *testing.T) { + tc := []struct { + start, end, step uint64 + expected int + }{ + { + start: 0, + end: 1, + step: 1, + expected: 2, // 0, 1, even multiple + }, + { + start: 0, + end: 10, + step: 3, + expected: 4, // 0, 3, 6, 9 + }, + } + + for _, c := range tc { + require.Equal(t, c.expected, IntervalCount(c.start, c.end, c.step)) + } +} + +func TestTimestampOf(t *testing.T) { + tc := []struct { + interval, start, step uint64 + expected uint64 + }{ + { + expected: 0, + }, + { + interval: 2, + start: 10, + step: 3, + expected: 16, + }, + } + + for _, c := range tc { + require.Equal(t, c.expected, TimestampOf(c.interval, c.start, c.step)) + } +} + +func TestIntervalOf(t *testing.T) { + tc := []struct { + ts, start, end, step uint64 + expected int + }{ + {expected: -1}, + { + ts: 0, + end: 1, + step: 1, + }, + { + ts: 10, + end: 10, + step: 1, + expected: 10, + }, + } + + for _, c := range tc { + require.Equal(t, c.expected, IntervalOf(c.ts, c.start, c.end, c.step)) + } +} + +func TestCompileMetricsQueryRange(t *testing.T) { + tc := map[string]struct { + q string + start, end uint64 + step uint64 + expectedErr error + }{ + "start": { + expectedErr: fmt.Errorf("start required"), + }, + "end": { + start: 1, + expectedErr: fmt.Errorf("end required"), + }, + "range": { + start: 2, + end: 1, + expectedErr: fmt.Errorf("end must be greater than start"), + }, + "step": { + start: 1, + end: 2, + expectedErr: fmt.Errorf("step required"), + }, + "notmetrics": { + start: 1, + end: 2, + step: 3, + q: "{}", + expectedErr: fmt.Errorf("not a metrics query"), + }, + "notsupported": { + start: 1, + end: 2, + step: 3, + q: "{} | rate() by (.a,.b,.c,.d,.e,.f)", + expectedErr: fmt.Errorf("compiling query: metrics group by 6 values not yet supported"), + }, + "ok": { + start: 1, + end: 2, + step: 3, + q: "{} | rate()", + }, + } + + for n, c := range tc { + t.Run(n, func(t *testing.T) { + _, err := NewEngine().CompileMetricsQueryRange(&tempopb.QueryRangeRequest{ + Query: c.q, + Start: c.start, + End: c.end, + Step: c.step, + }, false) + + if c.expectedErr != nil { + require.EqualError(t, err, c.expectedErr.Error()) + } + }) + } +} + +func TestCompileMetricsQueryRangeFetchSpansRequest(t *testing.T) { + tc := map[string]struct { + q string + shardID uint32 + shardCount uint32 + dedupe bool + expectedReq FetchSpansRequest + }{ + "minimal": { + q: "{} | rate()", + expectedReq: FetchSpansRequest{ + AllConditions: true, + Conditions: []Condition{ + { + // In this case start time is in the first pass + Attribute: NewIntrinsic(IntrinsicSpanStartTime), + }, + }, + }, + }, + "dedupe": { + q: "{} | rate()", + dedupe: true, + expectedReq: FetchSpansRequest{ + AllConditions: true, + Conditions: []Condition{ + { + Attribute: NewIntrinsic(IntrinsicSpanStartTime), + }, + { + Attribute: NewIntrinsic(IntrinsicTraceID), // Required for dedupe + }, + }, + }, + }, + "complex": { + q: "{duration > 10s} | rate() by (resource.service.name)", + shardID: 123, + shardCount: 456, + expectedReq: FetchSpansRequest{ + AllConditions: true, + ShardID: 123, + ShardCount: 456, + Conditions: []Condition{ + { + Attribute: NewIntrinsic(IntrinsicDuration), + Op: OpGreater, + Operands: Operands{NewStaticDuration(10 * time.Second)}, + }, + { + Attribute: NewIntrinsic(IntrinsicTraceID), // Required for sharding + }, + { + Attribute: NewIntrinsic(IntrinsicSpanStartTime), + }, + }, + SecondPassConditions: []Condition{ + { + // Group-by attributes (non-intrinsic) must be in the second pass + Attribute: NewScopedAttribute(AttributeScopeResource, false, "service.name"), + }, + }, + }, + }, + } + + for n, tc := range tc { + t.Run(n, func(t *testing.T) { + eval, err := NewEngine().CompileMetricsQueryRange(&tempopb.QueryRangeRequest{ + Query: tc.q, + ShardID: tc.shardID, + ShardCount: tc.shardCount, + Start: 1, + End: 2, + Step: 3, + }, tc.dedupe) + require.NoError(t, err) + + // Nil out func to Equal works + eval.storageReq.SecondPass = nil + require.Equal(t, tc.expectedReq, *eval.storageReq) + }) + } +} diff --git a/pkg/traceql/engine_test.go b/pkg/traceql/engine_test.go index afd9ce54f7a..38f6cf01771 100644 --- a/pkg/traceql/engine_test.go +++ b/pkg/traceql/engine_test.go @@ -460,7 +460,7 @@ func TestStatic_AsAnyValue(t *testing.T) { } for _, tc := range tt { t.Run(fmt.Sprintf("%v", tc.s), func(t *testing.T) { - assert.Equal(t, tc.expected, tc.s.asAnyValue()) + assert.Equal(t, tc.expected, tc.s.AsAnyValue()) }) } } diff --git a/pkg/traceql/enum_aggregates.go b/pkg/traceql/enum_aggregates.go index aca01289db1..82fde999cbe 100644 --- a/pkg/traceql/enum_aggregates.go +++ b/pkg/traceql/enum_aggregates.go @@ -28,3 +28,21 @@ func (a AggregateOp) String() string { return fmt.Sprintf("aggregate(%d)", a) } + +type MetricsAggregateOp int + +const ( + metricsAggregateRate MetricsAggregateOp = iota + metricsAggregateCountOverTime +) + +func (a MetricsAggregateOp) String() string { + switch a { + case metricsAggregateRate: + return "rate" + case metricsAggregateCountOverTime: + return "count_over_time" + } + + return fmt.Sprintf("aggregate(%d)", a) +} diff --git a/pkg/traceql/expr.y b/pkg/traceql/expr.y index 6d2030cb4e7..8cdffb6752b 100644 --- a/pkg/traceql/expr.y +++ b/pkg/traceql/expr.y @@ -13,7 +13,7 @@ import ( groupOperation GroupOperation coalesceOperation CoalesceOperation selectOperation SelectOperation - selectArgs []FieldExpression + attributeList []Attribute spansetExpression SpansetExpression spansetPipelineExpression SpansetExpression @@ -29,6 +29,7 @@ import ( wrappedScalarPipeline Pipeline scalarPipeline Pipeline aggregate Aggregate + metricsAggregation *MetricsAggregate fieldExpression FieldExpression static Static @@ -46,7 +47,7 @@ import ( %type groupOperation %type coalesceOperation %type selectOperation -%type selectArgs +%type attributeList %type spansetExpression %type spansetPipelineExpression @@ -55,6 +56,7 @@ import ( %type spansetFilter %type scalarFilter %type scalarFilterOperation +%type metricsAggregation %type scalarPipelineExpressionFilter %type scalarPipelineExpression @@ -80,6 +82,7 @@ import ( COUNT AVG MAX MIN SUM BY COALESCE SELECT END_ATTRIBUTE + RATE COUNT_OVER_TIME // Operators are listed with increasing precedence. %left PIPE @@ -97,7 +100,8 @@ import ( root: spansetPipeline { yylex.(*lexer).expr = newRootExpr($1) } | spansetPipelineExpression { yylex.(*lexer).expr = newRootExpr($1) } - | scalarPipelineExpressionFilter { yylex.(*lexer).expr = newRootExpr($1) } + | scalarPipelineExpressionFilter { yylex.(*lexer).expr = newRootExpr($1) } + | spansetPipeline PIPE metricsAggregation { yylex.(*lexer).expr = newRootExprWithMetrics($1, $3) } ; // ********************** @@ -144,12 +148,14 @@ coalesceOperation: ; selectOperation: - SELECT OPEN_PARENS selectArgs CLOSE_PARENS { $$ = newSelectOperation($3) } + SELECT OPEN_PARENS attributeList CLOSE_PARENS { $$ = newSelectOperation($3) } ; -selectArgs: - fieldExpression { $$ = []FieldExpression{$1} } - | selectArgs COMMA fieldExpression { $$ = append($1, $3) } +attributeList: + intrinsicField { $$ = []Attribute{$1} } + | attributeField { $$ = []Attribute{$1} } + | attributeList COMMA intrinsicField { $$ = append($1, $3) } + | attributeList COMMA attributeField { $$ = append($1, $3) } ; spansetExpression: // shares the same operators as scalarPipelineExpression. split out for readability @@ -241,6 +247,16 @@ aggregate: | SUM OPEN_PARENS fieldExpression CLOSE_PARENS { $$ = newAggregate(aggregateSum, $3) } ; +// ********************** +// Metrics +// ********************** +metricsAggregation: + RATE OPEN_PARENS CLOSE_PARENS { $$ = newMetricsAggregate(metricsAggregateRate, nil) } + | COUNT_OVER_TIME OPEN_PARENS CLOSE_PARENS { $$ = newMetricsAggregate(metricsAggregateCountOverTime, nil) } + | RATE OPEN_PARENS CLOSE_PARENS BY OPEN_PARENS attributeList CLOSE_PARENS { $$ = newMetricsAggregate(metricsAggregateRate, $6) } + | COUNT_OVER_TIME OPEN_PARENS CLOSE_PARENS BY OPEN_PARENS attributeList CLOSE_PARENS { $$ = newMetricsAggregate(metricsAggregateCountOverTime, $6) } + ; + // ********************** // FieldExpressions // ********************** diff --git a/pkg/traceql/expr.y.go b/pkg/traceql/expr.y.go index e44069347db..bcbe570cb14 100644 --- a/pkg/traceql/expr.y.go +++ b/pkg/traceql/expr.y.go @@ -18,7 +18,7 @@ type yySymType struct { groupOperation GroupOperation coalesceOperation CoalesceOperation selectOperation SelectOperation - selectArgs []FieldExpression + attributeList []Attribute spansetExpression SpansetExpression spansetPipelineExpression SpansetExpression @@ -34,6 +34,7 @@ type yySymType struct { wrappedScalarPipeline Pipeline scalarPipeline Pipeline aggregate Aggregate + metricsAggregation *MetricsAggregate fieldExpression FieldExpression static Static @@ -92,31 +93,33 @@ const BY = 57387 const COALESCE = 57388 const SELECT = 57389 const END_ATTRIBUTE = 57390 -const PIPE = 57391 -const AND = 57392 -const OR = 57393 -const EQ = 57394 -const NEQ = 57395 -const LT = 57396 -const LTE = 57397 -const GT = 57398 -const GTE = 57399 -const NRE = 57400 -const RE = 57401 -const DESC = 57402 -const ANCE = 57403 -const SIBL = 57404 -const NOT_CHILD = 57405 -const NOT_PARENT = 57406 -const NOT_DESC = 57407 -const NOT_ANCE = 57408 -const ADD = 57409 -const SUB = 57410 -const NOT = 57411 -const MUL = 57412 -const DIV = 57413 -const MOD = 57414 -const POW = 57415 +const RATE = 57391 +const COUNT_OVER_TIME = 57392 +const PIPE = 57393 +const AND = 57394 +const OR = 57395 +const EQ = 57396 +const NEQ = 57397 +const LT = 57398 +const LTE = 57399 +const GT = 57400 +const GTE = 57401 +const NRE = 57402 +const RE = 57403 +const DESC = 57404 +const ANCE = 57405 +const SIBL = 57406 +const NOT_CHILD = 57407 +const NOT_PARENT = 57408 +const NOT_DESC = 57409 +const NOT_ANCE = 57410 +const ADD = 57411 +const SUB = 57412 +const NOT = 57413 +const MUL = 57414 +const DIV = 57415 +const MOD = 57416 +const POW = 57417 var yyToknames = [...]string{ "$end", @@ -167,6 +170,8 @@ var yyToknames = [...]string{ "COALESCE", "SELECT", "END_ATTRIBUTE", + "RATE", + "COUNT_OVER_TIME", "PIPE", "AND", "OR", @@ -204,222 +209,228 @@ var yyExca = [...]int{ -1, 1, 1, -1, -2, 0, - -1, 223, - 13, 67, - -2, 75, + -1, 229, + 13, 70, + -2, 78, } const yyPrivate = 57344 -const yyLast = 752 +const yyLast = 756 var yyAct = [...]int{ - 82, 5, 221, 2, 6, 8, 7, 18, 201, 78, - 65, 55, 54, 162, 86, 28, 188, 189, 255, 190, - 191, 192, 201, 190, 191, 192, 201, 13, 259, 258, - 127, 161, 249, 128, 131, 129, 248, 58, 75, 76, - 77, 78, 247, 147, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 202, 203, 193, 194, 195, - 196, 197, 198, 200, 199, 73, 74, 28, 75, 76, - 77, 78, 188, 189, 168, 190, 191, 192, 201, 246, - 184, 186, 227, 228, 204, 205, 206, 62, 63, 64, - 65, 256, 66, 67, 68, 69, 70, 71, 254, 213, - 176, 178, 179, 180, 181, 182, 183, 73, 74, 165, - 75, 76, 77, 78, 60, 61, 220, 62, 63, 64, - 65, 169, 88, 161, 214, 215, 216, 217, 210, 17, - 135, 148, 126, 125, 218, 202, 203, 193, 194, 195, - 196, 197, 198, 200, 199, 19, 20, 21, 124, 17, - 218, 132, 188, 189, 123, 190, 191, 192, 201, 162, - 219, 122, 211, 212, 127, 80, 79, 128, 131, 129, - 223, 87, 225, 119, 120, 121, 253, 251, 57, 23, - 26, 24, 25, 27, 14, 133, 15, 166, 250, 229, - 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244, 219, 209, 22, 208, 207, - 16, 72, 4, 202, 203, 193, 194, 195, 196, 197, - 198, 200, 199, 59, 55, 12, 55, 225, 10, 257, - 188, 189, 185, 190, 191, 192, 201, 164, 56, 11, - 130, 73, 74, 1, 75, 76, 77, 78, 0, 0, - 58, 0, 58, 89, 90, 91, 95, 115, 0, 81, - 83, 0, 0, 94, 92, 93, 97, 96, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 111, 110, 112, 113, 114, 118, 116, 117, 0, 0, - 0, 60, 61, 0, 62, 63, 64, 65, 167, 170, - 171, 172, 173, 174, 175, 0, 252, 0, 89, 90, - 91, 95, 115, 0, 0, 83, 84, 85, 94, 92, - 93, 97, 96, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 111, 110, 112, 113, 114, - 118, 116, 117, 202, 203, 193, 194, 195, 196, 197, - 198, 200, 199, 245, 0, 0, 0, 0, 0, 0, - 188, 189, 0, 190, 191, 192, 201, 19, 20, 21, - 0, 84, 85, 177, 43, 0, 42, 226, 50, 0, - 44, 45, 47, 48, 49, 52, 51, 0, 0, 0, - 202, 203, 193, 194, 195, 196, 197, 198, 200, 199, - 187, 23, 26, 24, 25, 27, 0, 188, 189, 0, - 190, 191, 192, 201, 202, 203, 193, 194, 195, 196, - 197, 198, 200, 199, 0, 0, 0, 0, 0, 22, - 0, 188, 189, 0, 190, 191, 192, 201, 0, 202, - 203, 193, 194, 195, 196, 197, 198, 200, 199, 0, - 0, 0, 0, 0, 0, 0, 188, 189, 0, 190, - 191, 192, 201, 202, 203, 193, 194, 195, 196, 197, - 198, 200, 199, 166, 0, 0, 0, 0, 0, 0, - 188, 189, 0, 190, 191, 192, 201, 193, 194, 195, - 196, 197, 198, 200, 199, 0, 0, 0, 0, 0, - 0, 0, 188, 189, 0, 190, 191, 192, 201, 0, - 0, 0, 66, 67, 68, 69, 70, 71, 0, 66, - 67, 68, 69, 70, 71, 0, 0, 73, 74, 0, - 75, 76, 77, 78, 60, 61, 0, 62, 63, 64, - 65, 19, 20, 21, 0, 17, 0, 224, 0, 19, - 20, 21, 0, 17, 0, 222, 0, 19, 20, 21, - 31, 17, 30, 9, 40, 0, 32, 33, 35, 36, - 37, 38, 39, 0, 0, 23, 26, 24, 25, 27, - 14, 0, 15, 23, 26, 24, 25, 27, 14, 163, - 15, 23, 26, 24, 25, 27, 14, 0, 15, 0, - 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, - 0, 22, 19, 20, 21, 160, 17, 0, 132, 22, - 0, 0, 0, 0, 0, 0, 41, 46, 0, 0, - 43, 0, 42, 0, 50, 0, 44, 45, 47, 48, - 49, 52, 51, 0, 0, 0, 23, 26, 24, 25, - 27, 0, 29, 34, 0, 0, 31, 0, 30, 0, - 40, 0, 32, 33, 35, 36, 37, 38, 39, 41, - 46, 0, 0, 43, 22, 42, 0, 50, 0, 44, - 45, 47, 48, 49, 52, 51, 29, 34, 53, 3, - 31, 0, 30, 0, 40, 0, 32, 33, 35, 36, - 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 134, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 89, 90, 91, 95, 0, 0, 0, 169, 0, 0, + 5, 88, 6, 87, 8, 188, 7, 18, 227, 2, + 55, 205, 13, 82, 78, 261, 65, 165, 54, 28, + 192, 193, 58, 194, 195, 196, 205, 269, 268, 128, + 255, 129, 86, 132, 254, 130, 194, 195, 196, 205, + 253, 271, 150, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 206, 207, 197, 198, 199, 200, + 201, 202, 204, 203, 260, 75, 76, 77, 78, 252, + 270, 192, 193, 169, 194, 195, 196, 205, 62, 63, + 64, 65, 190, 264, 189, 179, 181, 182, 183, 184, + 185, 186, 171, 187, 169, 277, 234, 208, 209, 210, + 276, 234, 263, 206, 207, 197, 198, 199, 200, 201, + 202, 204, 203, 262, 66, 67, 68, 69, 70, 71, + 192, 193, 217, 194, 195, 196, 205, 164, 168, 73, + 74, 164, 75, 76, 77, 78, 224, 218, 219, 220, + 221, 73, 74, 259, 75, 76, 77, 78, 225, 273, + 73, 74, 224, 75, 76, 77, 78, 233, 234, 66, + 67, 68, 69, 70, 71, 265, 128, 272, 129, 165, + 132, 226, 130, 229, 73, 74, 223, 75, 76, 77, + 78, 231, 206, 207, 197, 198, 199, 200, 201, 202, + 204, 203, 17, 225, 151, 257, 167, 222, 214, 192, + 193, 172, 194, 195, 196, 205, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 60, 61, 138, 62, 63, 64, 65, 55, + 126, 55, 215, 216, 125, 124, 267, 123, 266, 231, + 122, 58, 80, 58, 197, 198, 199, 200, 201, 202, + 204, 203, 60, 61, 79, 62, 63, 64, 65, 192, + 193, 72, 194, 195, 196, 205, 128, 57, 129, 256, + 132, 213, 130, 59, 190, 190, 189, 189, 274, 275, + 89, 90, 91, 95, 115, 212, 81, 83, 211, 16, 94, 92, 93, 97, 96, 98, 99, 100, 101, 102, - 103, 104, + 103, 104, 105, 106, 107, 108, 109, 111, 110, 112, + 113, 114, 118, 116, 117, 41, 46, 4, 127, 43, + 12, 42, 10, 50, 131, 44, 45, 47, 48, 49, + 52, 51, 1, 258, 119, 120, 121, 89, 90, 91, + 95, 115, 0, 0, 83, 84, 85, 94, 92, 93, + 97, 96, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 111, 110, 112, 113, 114, 118, + 116, 117, 206, 207, 197, 198, 199, 200, 201, 202, + 204, 203, 251, 0, 0, 0, 0, 0, 0, 192, + 193, 0, 194, 195, 196, 205, 66, 67, 68, 69, + 70, 71, 84, 85, 0, 0, 232, 0, 0, 0, + 0, 60, 61, 0, 62, 63, 64, 65, 0, 0, + 0, 206, 207, 197, 198, 199, 200, 201, 202, 204, + 203, 191, 0, 0, 0, 0, 0, 0, 192, 193, + 0, 194, 195, 196, 205, 206, 207, 197, 198, 199, + 200, 201, 202, 204, 203, 0, 0, 0, 0, 0, + 0, 0, 192, 193, 0, 194, 195, 196, 205, 0, + 0, 0, 206, 207, 197, 198, 199, 200, 201, 202, + 204, 203, 19, 20, 21, 0, 17, 0, 135, 192, + 193, 0, 194, 195, 196, 205, 19, 20, 21, 0, + 17, 0, 135, 0, 19, 20, 21, 0, 17, 0, + 230, 0, 0, 0, 0, 0, 23, 26, 24, 25, + 27, 14, 136, 15, 166, 133, 134, 0, 0, 0, + 23, 26, 24, 25, 27, 14, 136, 15, 23, 26, + 24, 25, 27, 14, 0, 15, 22, 19, 20, 21, + 0, 17, 0, 228, 0, 19, 20, 21, 0, 17, + 22, 9, 0, 41, 46, 0, 0, 43, 22, 42, + 0, 50, 0, 44, 45, 47, 48, 49, 52, 51, + 0, 23, 26, 24, 25, 27, 14, 0, 15, 23, + 26, 24, 25, 27, 14, 0, 15, 19, 20, 21, + 163, 17, 0, 135, 0, 0, 43, 0, 42, 0, + 50, 22, 44, 45, 47, 48, 49, 52, 51, 22, + 0, 0, 19, 20, 21, 0, 0, 0, 180, 0, + 0, 23, 26, 24, 25, 27, 56, 11, 0, 29, + 34, 0, 0, 31, 0, 30, 0, 40, 0, 32, + 33, 35, 36, 37, 38, 39, 23, 26, 24, 25, + 27, 22, 29, 34, 0, 0, 31, 0, 30, 0, + 40, 0, 32, 33, 35, 36, 37, 38, 39, 53, + 3, 31, 0, 30, 0, 40, 22, 32, 33, 35, + 36, 37, 38, 39, 0, 0, 170, 173, 174, 175, + 176, 177, 178, 115, 0, 0, 0, 0, 0, 137, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 105, 106, 107, 108, 109, 111, 110, 112, 113, + 114, 118, 116, 117, 89, 90, 91, 95, 0, 0, + 0, 172, 0, 0, 94, 92, 93, 97, 96, 98, + 99, 100, 101, 102, 103, 104, } var yyPact = [...]int{ - 551, -1000, -34, 636, -1000, 619, -1000, -1000, -1000, 551, - -1000, 467, -1000, 40, 154, 153, -1000, 248, -1000, -1000, - -1000, -1000, 167, 149, 142, 136, 121, 120, 139, 118, - 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, - 118, 119, 119, 119, 119, 119, 119, 119, 119, 119, - 119, 119, 119, 602, 110, 576, 224, 96, 460, 725, - 109, 109, 109, 109, 109, 109, -1000, -1000, -1000, -1000, - -1000, -1000, 361, 361, 361, 361, 361, 361, 361, 303, - 303, -1000, 389, 303, 303, 303, -1000, -1000, -1000, -1000, + 549, -1000, -32, 610, -1000, 263, -1000, -1000, -1000, 549, + -1000, 342, -1000, 105, 242, 230, -1000, 275, -1000, -1000, + -1000, -1000, 328, 228, 225, 223, 222, 218, 476, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 587, 118, 511, 183, 115, 60, 729, + 189, 189, 189, 189, 189, 189, -1000, -1000, -1000, -1000, + -1000, -1000, 616, 616, 616, 616, 616, 616, 616, 332, + 694, -1000, 420, 332, 332, 332, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, 205, 204, 202, 124, -1000, - -1000, -1000, 86, 303, 303, 303, 303, 619, -1000, -1000, - -1000, -1000, 606, 104, 506, 543, -1000, -1000, -1000, -1000, - 506, -1000, -1000, -1000, -1000, -1000, -1000, 320, 119, -1000, - -1000, -1000, -1000, 320, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, 139, -1000, -1000, -1000, -1000, 47, -1000, 535, - 17, 17, -63, -63, -63, -63, -2, 361, -32, -32, - -64, -64, -64, -64, 364, 69, 413, -1000, 303, 303, - 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, - 303, 303, 303, 303, 340, -47, -47, 31, -6, -12, - -16, 184, 173, -1000, 293, 163, 85, 5, 576, 174, - 78, 18, 543, -1000, 535, -36, -1000, -1000, 303, -47, - -47, -65, -65, -65, -51, -51, -51, -51, -51, -51, - -51, -51, -65, 435, 435, -1000, -1000, -1000, -1000, -1000, - -19, -20, -1000, -1000, -1000, -1000, -1000, 413, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, 284, 281, 267, 194, -1000, + -1000, -1000, 109, 332, 332, 332, 332, -1000, 263, -1000, + -1000, -1000, -1000, 185, 164, 591, 159, 625, 541, -1000, + -1000, -1000, -1000, 625, -1000, -1000, -1000, -1000, -1000, -1000, + 550, 182, -1000, -1000, -1000, -1000, 550, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, 490, -1000, -1000, -1000, -1000, + 153, -1000, 498, 6, 6, -59, -59, -59, -59, 72, + 616, -7, -7, -61, -61, -61, -61, 393, 144, -1000, + -1000, -1000, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 332, 369, -36, + -36, 21, -8, -14, -18, 265, 191, -1000, 320, 130, + 51, 2, 100, 89, 511, 81, 70, 114, 541, -1000, + 498, -34, -1000, -1000, 694, -36, -36, -64, -64, -64, + -49, -49, -49, -49, -49, -49, -49, -49, -64, 190, + 190, -1000, -1000, -1000, -1000, -1000, -20, -21, -1000, -1000, + -1000, -1000, 25, -4, -1000, 490, -1000, -1000, -1000, -1000, + 155, 137, 694, 694, 87, 82, -1000, -1000, } var yyPgo = [...]int{ - 0, 243, 6, 240, 5, 232, 1, 688, 228, 2, - 225, 4, 211, 212, 238, 27, 210, 178, 7, 0, - 14, 171, 122, + 0, 332, 6, 324, 4, 5, 0, 679, 322, 8, + 320, 2, 261, 318, 317, 636, 12, 289, 267, 7, + 13, 32, 3, 1, } var yyR1 = [...]int{ - 0, 1, 1, 1, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 2, 3, - 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 10, 10, 11, - 12, 12, 12, 12, 12, 12, 13, 13, 14, 14, - 14, 14, 14, 14, 14, 14, 16, 17, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 18, 18, 18, 18, 18, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, + 0, 1, 1, 1, 1, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 2, + 3, 4, 5, 5, 5, 5, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 10, 10, 11, 12, 12, 12, 12, 12, 12, 14, + 14, 15, 15, 15, 15, 15, 15, 15, 15, 17, + 18, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 19, 19, 19, 19, 19, + 13, 13, 13, 13, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, - 22, + 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 23, 23, 23, 23, 23, 23, } var yyR2 = [...]int{ 0, 1, 1, 1, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 1, 3, 1, - 1, 1, 1, 3, 3, 3, 3, 3, 4, 3, - 4, 1, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 1, 2, 3, 3, - 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 1, 1, 1, 1, 2, - 2, 2, 3, 4, 4, 4, 4, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, + 1, 1, 1, 1, 3, 3, 3, 3, 3, 4, + 3, 4, 1, 1, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, + 2, 3, 3, 1, 1, 1, 1, 1, 1, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, + 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, + 3, 3, 7, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 2, 2, 1, 1, 1, 1, + 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 3, 3, 4, - 4, + 1, 1, 3, 3, 3, 3, 4, 4, } var yyChk = [...]int{ - -1000, -1, -9, -7, -13, -6, -11, -2, -4, 12, - -8, -14, -10, -15, 45, 47, -16, 10, -18, 6, - 7, 8, 68, 40, 42, 43, 41, 44, 49, 50, - 56, 54, 60, 61, 51, 62, 63, 64, 65, 66, - 58, 50, 56, 54, 60, 61, 51, 62, 63, 64, - 58, 66, 65, -7, -9, -6, -14, -17, -15, -12, - 67, 68, 70, 71, 72, 73, 52, 53, 54, 55, - 56, 57, -12, 67, 68, 70, 71, 72, 73, 12, - 12, 11, -19, 12, 68, 69, -20, -21, -22, 5, + -1000, -1, -9, -7, -14, -6, -11, -2, -4, 12, + -8, -15, -10, -16, 45, 47, -17, 10, -19, 6, + 7, 8, 70, 40, 42, 43, 41, 44, 51, 52, + 58, 56, 62, 63, 53, 64, 65, 66, 67, 68, + 60, 52, 58, 56, 62, 63, 53, 64, 65, 66, + 60, 68, 67, -7, -9, -6, -15, -18, -16, -12, + 69, 70, 72, 73, 74, 75, 54, 55, 56, 57, + 58, 59, -12, 69, 70, 72, 73, 74, 75, 12, + 12, 11, -20, 12, 70, 71, -21, -22, -23, 5, 6, 7, 16, 17, 15, 8, 19, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 32, 34, 35, 36, 9, 38, 39, 37, 6, - 7, 8, 12, 12, 12, 12, 12, -6, -11, -2, - -3, -4, 12, 46, -7, 12, -7, -7, -7, -7, - -7, -7, -7, -7, -7, -7, -7, -6, 12, -6, - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - 13, 13, 49, 13, 13, 13, 13, -14, -20, 12, - -14, -14, -14, -14, -14, -14, -15, 12, -15, -15, - -15, -15, -15, -15, -19, -5, -19, 11, 67, 68, - 70, 71, 72, 52, 53, 54, 55, 56, 57, 59, - 58, 73, 50, 51, -19, -19, -19, 4, 4, 4, - 4, 38, 39, 13, -19, -19, -19, -19, -6, -15, - 12, -9, 12, -18, 12, -9, 13, 13, 14, -19, - -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, - -19, -19, -19, -19, -19, 13, 48, 48, 48, 48, - 4, 4, 13, 13, 13, 13, 13, -19, 48, 48, + 7, 8, 12, 12, 12, 12, 12, -13, -6, -11, + -2, -3, -4, 49, 50, 12, 46, -7, 12, -7, + -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, + -6, 12, -6, -6, -6, -6, -6, -6, -6, -6, + -6, -6, -6, 13, 13, 51, 13, 13, 13, 13, + -15, -21, 12, -15, -15, -15, -15, -15, -15, -16, + 12, -16, -16, -16, -16, -16, -16, -20, -5, -22, + -23, 11, 69, 70, 72, 73, 74, 54, 55, 56, + 57, 58, 59, 61, 60, 75, 52, 53, -20, -20, + -20, 4, 4, 4, 4, 38, 39, 13, -20, -20, + -20, -20, 12, 12, -6, -16, 12, -9, 12, -19, + 12, -9, 13, 13, 14, -20, -20, -20, -20, -20, + -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, + -20, 13, 48, 48, 48, 48, 4, 4, 13, 13, + 13, 13, 13, 13, 13, 51, -22, -23, 48, 48, + 45, 45, 12, 12, -5, -5, 13, 13, } var yyDef = [...]int{ - 0, -2, 1, 2, 3, 19, 20, 21, 22, 0, - 17, 0, 46, 0, 0, 0, 65, 0, 75, 76, - 77, 78, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -2, 1, 2, 3, 20, 21, 22, 23, 0, + 18, 0, 49, 0, 0, 0, 68, 0, 78, 79, + 80, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 50, 51, 52, 53, - 54, 55, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 47, 0, 0, 0, 0, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 0, 0, 0, 0, 79, - 80, 81, 0, 0, 0, 0, 0, 23, 24, 25, - 26, 27, 0, 0, 5, 0, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 34, 0, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 4, 18, 0, 33, 58, 66, 68, 56, 57, 0, - 59, 60, 61, 62, 63, 64, 49, 0, 69, 70, - 71, 72, 73, 74, 0, 0, 31, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, - 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -2, 0, 0, 28, 30, 0, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 87, 135, 136, 137, 138, - 0, 0, 83, 84, 85, 86, 29, 32, 139, 140, + 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 53, 54, 55, 56, + 57, 58, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 50, 0, 0, 0, 0, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 0, 0, 0, 0, 82, + 83, 84, 0, 0, 0, 0, 0, 4, 24, 25, + 26, 27, 28, 0, 0, 0, 0, 6, 0, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 37, 0, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 5, 19, 0, 36, 61, 69, 71, + 59, 60, 0, 62, 63, 64, 65, 66, 67, 52, + 0, 72, 73, 74, 75, 76, 77, 0, 0, 32, + 33, 51, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, + 112, 0, 0, 0, 0, 0, 0, 85, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, + 0, 0, 29, 31, 0, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 94, 142, 143, 144, 145, 0, 0, 86, 87, + 88, 89, 90, 91, 30, 0, 34, 35, 146, 147, + 0, 0, 0, 0, 0, 0, 92, 93, } var yyTok1 = [...]int{ @@ -434,7 +445,7 @@ var yyTok2 = [...]int{ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, + 72, 73, 74, 75, } var yyTok3 = [...]int{ 0, @@ -779,841 +790,883 @@ yydefault: case 1: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:98 +//line pkg/traceql/expr.y:101 { yylex.(*lexer).expr = newRootExpr(yyDollar[1].spansetPipeline) } case 2: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:99 +//line pkg/traceql/expr.y:102 { yylex.(*lexer).expr = newRootExpr(yyDollar[1].spansetPipelineExpression) } case 3: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:100 +//line pkg/traceql/expr.y:103 { yylex.(*lexer).expr = newRootExpr(yyDollar[1].scalarPipelineExpressionFilter) } case 4: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:107 +//line pkg/traceql/expr.y:104 { - yyVAL.spansetPipelineExpression = yyDollar[2].spansetPipelineExpression + yylex.(*lexer).expr = newRootExprWithMetrics(yyDollar[1].spansetPipeline, yyDollar[3].metricsAggregation) } case 5: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:108 +//line pkg/traceql/expr.y:111 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetAnd, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = yyDollar[2].spansetPipelineExpression } case 6: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:109 +//line pkg/traceql/expr.y:112 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetChild, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetAnd, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 7: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:110 +//line pkg/traceql/expr.y:113 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetParent, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetChild, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 8: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:111 +//line pkg/traceql/expr.y:114 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetDescendant, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetParent, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 9: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:112 +//line pkg/traceql/expr.y:115 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetAncestor, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetDescendant, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 10: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:113 +//line pkg/traceql/expr.y:116 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetUnion, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetAncestor, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 11: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:114 +//line pkg/traceql/expr.y:117 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetSibling, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetUnion, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 12: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:115 +//line pkg/traceql/expr.y:118 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotChild, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetSibling, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 13: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:116 +//line pkg/traceql/expr.y:119 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotParent, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotChild, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 14: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:117 +//line pkg/traceql/expr.y:120 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotDescendant, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotParent, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 15: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:118 +//line pkg/traceql/expr.y:121 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotAncestor, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotDescendant, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 16: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:119 +//line pkg/traceql/expr.y:122 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotSibling, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotAncestor, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 17: - yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:120 + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:123 { - yyVAL.spansetPipelineExpression = yyDollar[1].wrappedSpansetPipeline + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotSibling, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 18: - yyDollar = yyS[yypt-3 : yypt+1] + yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:124 { - yyVAL.wrappedSpansetPipeline = yyDollar[2].spansetPipeline + yyVAL.spansetPipelineExpression = yyDollar[1].wrappedSpansetPipeline } case 19: - yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:127 + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:128 { - yyVAL.spansetPipeline = newPipeline(yyDollar[1].spansetExpression) + yyVAL.wrappedSpansetPipeline = yyDollar[2].spansetPipeline } case 20: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:128 +//line pkg/traceql/expr.y:131 { - yyVAL.spansetPipeline = newPipeline(yyDollar[1].scalarFilter) + yyVAL.spansetPipeline = newPipeline(yyDollar[1].spansetExpression) } case 21: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:129 +//line pkg/traceql/expr.y:132 { - yyVAL.spansetPipeline = newPipeline(yyDollar[1].groupOperation) + yyVAL.spansetPipeline = newPipeline(yyDollar[1].scalarFilter) } case 22: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:130 +//line pkg/traceql/expr.y:133 { - yyVAL.spansetPipeline = newPipeline(yyDollar[1].selectOperation) + yyVAL.spansetPipeline = newPipeline(yyDollar[1].groupOperation) } case 23: - yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:131 + yyDollar = yyS[yypt-1 : yypt+1] +//line pkg/traceql/expr.y:134 { - yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].spansetExpression) + yyVAL.spansetPipeline = newPipeline(yyDollar[1].selectOperation) } case 24: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:132 +//line pkg/traceql/expr.y:135 { - yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].scalarFilter) + yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].spansetExpression) } case 25: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:133 +//line pkg/traceql/expr.y:136 { - yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].groupOperation) + yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].scalarFilter) } case 26: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:134 +//line pkg/traceql/expr.y:137 { - yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].coalesceOperation) + yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].groupOperation) } case 27: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:135 +//line pkg/traceql/expr.y:138 { - yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].selectOperation) + yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].coalesceOperation) } case 28: - yyDollar = yyS[yypt-4 : yypt+1] + yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:139 { - yyVAL.groupOperation = newGroupOperation(yyDollar[3].fieldExpression) + yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].selectOperation) } case 29: - yyDollar = yyS[yypt-3 : yypt+1] + yyDollar = yyS[yypt-4 : yypt+1] //line pkg/traceql/expr.y:143 { - yyVAL.coalesceOperation = newCoalesceOperation() + yyVAL.groupOperation = newGroupOperation(yyDollar[3].fieldExpression) } case 30: - yyDollar = yyS[yypt-4 : yypt+1] + yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:147 { - yyVAL.selectOperation = newSelectOperation(yyDollar[3].selectArgs) + yyVAL.coalesceOperation = newCoalesceOperation() } case 31: - yyDollar = yyS[yypt-1 : yypt+1] + yyDollar = yyS[yypt-4 : yypt+1] //line pkg/traceql/expr.y:151 { - yyVAL.selectArgs = []FieldExpression{yyDollar[1].fieldExpression} + yyVAL.selectOperation = newSelectOperation(yyDollar[3].attributeList) } case 32: - yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:152 + yyDollar = yyS[yypt-1 : yypt+1] +//line pkg/traceql/expr.y:155 { - yyVAL.selectArgs = append(yyDollar[1].selectArgs, yyDollar[3].fieldExpression) + yyVAL.attributeList = []Attribute{yyDollar[1].intrinsicField} } case 33: - yyDollar = yyS[yypt-3 : yypt+1] + yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:156 { - yyVAL.spansetExpression = yyDollar[2].spansetExpression + yyVAL.attributeList = []Attribute{yyDollar[1].attributeField} } case 34: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:157 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetAnd, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.attributeList = append(yyDollar[1].attributeList, yyDollar[3].intrinsicField) } case 35: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:158 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetChild, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.attributeList = append(yyDollar[1].attributeList, yyDollar[3].attributeField) } case 36: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:159 +//line pkg/traceql/expr.y:162 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetParent, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = yyDollar[2].spansetExpression } case 37: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:160 +//line pkg/traceql/expr.y:163 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetDescendant, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetAnd, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 38: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:161 +//line pkg/traceql/expr.y:164 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetAncestor, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetChild, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 39: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:162 +//line pkg/traceql/expr.y:165 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetUnion, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetParent, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 40: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:163 +//line pkg/traceql/expr.y:166 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetSibling, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetDescendant, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 41: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:165 +//line pkg/traceql/expr.y:167 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotChild, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetAncestor, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 42: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:166 +//line pkg/traceql/expr.y:168 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotParent, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetUnion, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 43: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:167 +//line pkg/traceql/expr.y:169 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotSibling, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetSibling, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 44: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:168 +//line pkg/traceql/expr.y:171 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotAncestor, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotChild, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 45: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:169 +//line pkg/traceql/expr.y:172 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotDescendant, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotParent, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 46: + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:173 + { + yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotSibling, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + } + case 47: + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:174 + { + yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotAncestor, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + } + case 48: + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:175 + { + yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotDescendant, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + } + case 49: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:171 +//line pkg/traceql/expr.y:177 { yyVAL.spansetExpression = yyDollar[1].spansetFilter } - case 47: + case 50: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:175 +//line pkg/traceql/expr.y:181 { yyVAL.spansetFilter = newSpansetFilter(NewStaticBool(true)) } - case 48: + case 51: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:176 +//line pkg/traceql/expr.y:182 { yyVAL.spansetFilter = newSpansetFilter(yyDollar[2].fieldExpression) } - case 49: + case 52: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:180 +//line pkg/traceql/expr.y:186 { yyVAL.scalarFilter = newScalarFilter(yyDollar[2].scalarFilterOperation, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 50: + case 53: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:184 +//line pkg/traceql/expr.y:190 { yyVAL.scalarFilterOperation = OpEqual } - case 51: + case 54: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:185 +//line pkg/traceql/expr.y:191 { yyVAL.scalarFilterOperation = OpNotEqual } - case 52: + case 55: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:186 +//line pkg/traceql/expr.y:192 { yyVAL.scalarFilterOperation = OpLess } - case 53: + case 56: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:187 +//line pkg/traceql/expr.y:193 { yyVAL.scalarFilterOperation = OpLessEqual } - case 54: + case 57: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:188 +//line pkg/traceql/expr.y:194 { yyVAL.scalarFilterOperation = OpGreater } - case 55: + case 58: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:189 +//line pkg/traceql/expr.y:195 { yyVAL.scalarFilterOperation = OpGreaterEqual } - case 56: + case 59: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:196 +//line pkg/traceql/expr.y:202 { yyVAL.scalarPipelineExpressionFilter = newScalarFilter(yyDollar[2].scalarFilterOperation, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 57: + case 60: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:197 +//line pkg/traceql/expr.y:203 { yyVAL.scalarPipelineExpressionFilter = newScalarFilter(yyDollar[2].scalarFilterOperation, yyDollar[1].scalarPipelineExpression, yyDollar[3].static) } - case 58: + case 61: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:201 +//line pkg/traceql/expr.y:207 { yyVAL.scalarPipelineExpression = yyDollar[2].scalarPipelineExpression } - case 59: + case 62: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:202 +//line pkg/traceql/expr.y:208 { yyVAL.scalarPipelineExpression = newScalarOperation(OpAdd, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 60: + case 63: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:203 +//line pkg/traceql/expr.y:209 { yyVAL.scalarPipelineExpression = newScalarOperation(OpSub, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 61: + case 64: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:204 +//line pkg/traceql/expr.y:210 { yyVAL.scalarPipelineExpression = newScalarOperation(OpMult, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 62: + case 65: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:205 +//line pkg/traceql/expr.y:211 { yyVAL.scalarPipelineExpression = newScalarOperation(OpDiv, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 63: + case 66: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:206 +//line pkg/traceql/expr.y:212 { yyVAL.scalarPipelineExpression = newScalarOperation(OpMod, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 64: + case 67: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:207 +//line pkg/traceql/expr.y:213 { yyVAL.scalarPipelineExpression = newScalarOperation(OpPower, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 65: + case 68: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:208 +//line pkg/traceql/expr.y:214 { yyVAL.scalarPipelineExpression = yyDollar[1].wrappedScalarPipeline } - case 66: + case 69: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:212 +//line pkg/traceql/expr.y:218 { yyVAL.wrappedScalarPipeline = yyDollar[2].scalarPipeline } - case 67: + case 70: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:216 +//line pkg/traceql/expr.y:222 { yyVAL.scalarPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].aggregate) } - case 68: + case 71: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:220 +//line pkg/traceql/expr.y:226 { yyVAL.scalarExpression = yyDollar[2].scalarExpression } - case 69: + case 72: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:221 +//line pkg/traceql/expr.y:227 { yyVAL.scalarExpression = newScalarOperation(OpAdd, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 70: + case 73: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:222 +//line pkg/traceql/expr.y:228 { yyVAL.scalarExpression = newScalarOperation(OpSub, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 71: + case 74: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:223 +//line pkg/traceql/expr.y:229 { yyVAL.scalarExpression = newScalarOperation(OpMult, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 72: + case 75: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:224 +//line pkg/traceql/expr.y:230 { yyVAL.scalarExpression = newScalarOperation(OpDiv, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 73: + case 76: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:225 +//line pkg/traceql/expr.y:231 { yyVAL.scalarExpression = newScalarOperation(OpMod, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 74: + case 77: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:226 +//line pkg/traceql/expr.y:232 { yyVAL.scalarExpression = newScalarOperation(OpPower, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 75: + case 78: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:227 +//line pkg/traceql/expr.y:233 { yyVAL.scalarExpression = yyDollar[1].aggregate } - case 76: + case 79: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:228 +//line pkg/traceql/expr.y:234 { yyVAL.scalarExpression = NewStaticInt(yyDollar[1].staticInt) } - case 77: + case 80: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:229 +//line pkg/traceql/expr.y:235 { yyVAL.scalarExpression = NewStaticFloat(yyDollar[1].staticFloat) } - case 78: + case 81: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:230 +//line pkg/traceql/expr.y:236 { yyVAL.scalarExpression = NewStaticDuration(yyDollar[1].staticDuration) } - case 79: + case 82: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:231 +//line pkg/traceql/expr.y:237 { yyVAL.scalarExpression = NewStaticInt(-yyDollar[2].staticInt) } - case 80: + case 83: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:232 +//line pkg/traceql/expr.y:238 { yyVAL.scalarExpression = NewStaticFloat(-yyDollar[2].staticFloat) } - case 81: + case 84: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:233 +//line pkg/traceql/expr.y:239 { yyVAL.scalarExpression = NewStaticDuration(-yyDollar[2].staticDuration) } - case 82: + case 85: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:237 +//line pkg/traceql/expr.y:243 { yyVAL.aggregate = newAggregate(aggregateCount, nil) } - case 83: + case 86: yyDollar = yyS[yypt-4 : yypt+1] -//line pkg/traceql/expr.y:238 +//line pkg/traceql/expr.y:244 { yyVAL.aggregate = newAggregate(aggregateMax, yyDollar[3].fieldExpression) } - case 84: + case 87: yyDollar = yyS[yypt-4 : yypt+1] -//line pkg/traceql/expr.y:239 +//line pkg/traceql/expr.y:245 { yyVAL.aggregate = newAggregate(aggregateMin, yyDollar[3].fieldExpression) } - case 85: + case 88: yyDollar = yyS[yypt-4 : yypt+1] -//line pkg/traceql/expr.y:240 +//line pkg/traceql/expr.y:246 { yyVAL.aggregate = newAggregate(aggregateAvg, yyDollar[3].fieldExpression) } - case 86: + case 89: yyDollar = yyS[yypt-4 : yypt+1] -//line pkg/traceql/expr.y:241 +//line pkg/traceql/expr.y:247 { yyVAL.aggregate = newAggregate(aggregateSum, yyDollar[3].fieldExpression) } - case 87: + case 90: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:248 +//line pkg/traceql/expr.y:254 + { + yyVAL.metricsAggregation = newMetricsAggregate(metricsAggregateRate, nil) + } + case 91: + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:255 + { + yyVAL.metricsAggregation = newMetricsAggregate(metricsAggregateCountOverTime, nil) + } + case 92: + yyDollar = yyS[yypt-7 : yypt+1] +//line pkg/traceql/expr.y:256 + { + yyVAL.metricsAggregation = newMetricsAggregate(metricsAggregateRate, yyDollar[6].attributeList) + } + case 93: + yyDollar = yyS[yypt-7 : yypt+1] +//line pkg/traceql/expr.y:257 + { + yyVAL.metricsAggregation = newMetricsAggregate(metricsAggregateCountOverTime, yyDollar[6].attributeList) + } + case 94: + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:264 { yyVAL.fieldExpression = yyDollar[2].fieldExpression } - case 88: + case 95: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:249 +//line pkg/traceql/expr.y:265 { yyVAL.fieldExpression = newBinaryOperation(OpAdd, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 89: + case 96: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:250 +//line pkg/traceql/expr.y:266 { yyVAL.fieldExpression = newBinaryOperation(OpSub, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 90: + case 97: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:251 +//line pkg/traceql/expr.y:267 { yyVAL.fieldExpression = newBinaryOperation(OpMult, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 91: + case 98: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:252 +//line pkg/traceql/expr.y:268 { yyVAL.fieldExpression = newBinaryOperation(OpDiv, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 92: + case 99: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:253 +//line pkg/traceql/expr.y:269 { yyVAL.fieldExpression = newBinaryOperation(OpMod, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 93: + case 100: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:254 +//line pkg/traceql/expr.y:270 { yyVAL.fieldExpression = newBinaryOperation(OpEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 94: + case 101: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:255 +//line pkg/traceql/expr.y:271 { yyVAL.fieldExpression = newBinaryOperation(OpNotEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 95: + case 102: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:256 +//line pkg/traceql/expr.y:272 { yyVAL.fieldExpression = newBinaryOperation(OpLess, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 96: + case 103: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:257 +//line pkg/traceql/expr.y:273 { yyVAL.fieldExpression = newBinaryOperation(OpLessEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 97: + case 104: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:258 +//line pkg/traceql/expr.y:274 { yyVAL.fieldExpression = newBinaryOperation(OpGreater, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 98: + case 105: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:259 +//line pkg/traceql/expr.y:275 { yyVAL.fieldExpression = newBinaryOperation(OpGreaterEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 99: + case 106: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:260 +//line pkg/traceql/expr.y:276 { yyVAL.fieldExpression = newBinaryOperation(OpRegex, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 100: + case 107: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:261 +//line pkg/traceql/expr.y:277 { yyVAL.fieldExpression = newBinaryOperation(OpNotRegex, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 101: + case 108: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:262 +//line pkg/traceql/expr.y:278 { yyVAL.fieldExpression = newBinaryOperation(OpPower, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 102: + case 109: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:263 +//line pkg/traceql/expr.y:279 { yyVAL.fieldExpression = newBinaryOperation(OpAnd, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 103: + case 110: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:264 +//line pkg/traceql/expr.y:280 { yyVAL.fieldExpression = newBinaryOperation(OpOr, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 104: + case 111: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:265 +//line pkg/traceql/expr.y:281 { yyVAL.fieldExpression = newUnaryOperation(OpSub, yyDollar[2].fieldExpression) } - case 105: + case 112: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:266 +//line pkg/traceql/expr.y:282 { yyVAL.fieldExpression = newUnaryOperation(OpNot, yyDollar[2].fieldExpression) } - case 106: + case 113: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:267 +//line pkg/traceql/expr.y:283 { yyVAL.fieldExpression = yyDollar[1].static } - case 107: + case 114: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:268 +//line pkg/traceql/expr.y:284 { yyVAL.fieldExpression = yyDollar[1].intrinsicField } - case 108: + case 115: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:269 +//line pkg/traceql/expr.y:285 { yyVAL.fieldExpression = yyDollar[1].attributeField } - case 109: + case 116: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:276 +//line pkg/traceql/expr.y:292 { yyVAL.static = NewStaticString(yyDollar[1].staticStr) } - case 110: + case 117: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:277 +//line pkg/traceql/expr.y:293 { yyVAL.static = NewStaticInt(yyDollar[1].staticInt) } - case 111: + case 118: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:278 +//line pkg/traceql/expr.y:294 { yyVAL.static = NewStaticFloat(yyDollar[1].staticFloat) } - case 112: + case 119: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:279 +//line pkg/traceql/expr.y:295 { yyVAL.static = NewStaticBool(true) } - case 113: + case 120: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:280 +//line pkg/traceql/expr.y:296 { yyVAL.static = NewStaticBool(false) } - case 114: + case 121: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:281 +//line pkg/traceql/expr.y:297 { yyVAL.static = NewStaticNil() } - case 115: + case 122: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:282 +//line pkg/traceql/expr.y:298 { yyVAL.static = NewStaticDuration(yyDollar[1].staticDuration) } - case 116: + case 123: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:283 +//line pkg/traceql/expr.y:299 { yyVAL.static = NewStaticStatus(StatusOk) } - case 117: + case 124: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:284 +//line pkg/traceql/expr.y:300 { yyVAL.static = NewStaticStatus(StatusError) } - case 118: + case 125: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:285 +//line pkg/traceql/expr.y:301 { yyVAL.static = NewStaticStatus(StatusUnset) } - case 119: + case 126: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:286 +//line pkg/traceql/expr.y:302 { yyVAL.static = NewStaticKind(KindUnspecified) } - case 120: + case 127: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:287 +//line pkg/traceql/expr.y:303 { yyVAL.static = NewStaticKind(KindInternal) } - case 121: + case 128: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:288 +//line pkg/traceql/expr.y:304 { yyVAL.static = NewStaticKind(KindServer) } - case 122: + case 129: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:289 +//line pkg/traceql/expr.y:305 { yyVAL.static = NewStaticKind(KindClient) } - case 123: + case 130: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:290 +//line pkg/traceql/expr.y:306 { yyVAL.static = NewStaticKind(KindProducer) } - case 124: + case 131: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:291 +//line pkg/traceql/expr.y:307 { yyVAL.static = NewStaticKind(KindConsumer) } - case 125: + case 132: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:295 +//line pkg/traceql/expr.y:311 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicDuration) } - case 126: + case 133: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:296 +//line pkg/traceql/expr.y:312 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicChildCount) } - case 127: + case 134: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:297 +//line pkg/traceql/expr.y:313 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicName) } - case 128: + case 135: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:298 +//line pkg/traceql/expr.y:314 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicStatus) } - case 129: + case 136: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:299 +//line pkg/traceql/expr.y:315 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicStatusMessage) } - case 130: + case 137: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:300 +//line pkg/traceql/expr.y:316 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicKind) } - case 131: + case 138: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:301 +//line pkg/traceql/expr.y:317 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicParent) } - case 132: + case 139: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:302 +//line pkg/traceql/expr.y:318 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicTraceRootSpan) } - case 133: + case 140: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:303 +//line pkg/traceql/expr.y:319 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicTraceRootService) } - case 134: + case 141: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:304 +//line pkg/traceql/expr.y:320 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicTraceDuration) } - case 135: + case 142: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:308 +//line pkg/traceql/expr.y:324 { yyVAL.attributeField = NewAttribute(yyDollar[2].staticStr) } - case 136: + case 143: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:309 +//line pkg/traceql/expr.y:325 { yyVAL.attributeField = NewScopedAttribute(AttributeScopeResource, false, yyDollar[2].staticStr) } - case 137: + case 144: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:310 +//line pkg/traceql/expr.y:326 { yyVAL.attributeField = NewScopedAttribute(AttributeScopeSpan, false, yyDollar[2].staticStr) } - case 138: + case 145: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:311 +//line pkg/traceql/expr.y:327 { yyVAL.attributeField = NewScopedAttribute(AttributeScopeNone, true, yyDollar[2].staticStr) } - case 139: + case 146: yyDollar = yyS[yypt-4 : yypt+1] -//line pkg/traceql/expr.y:312 +//line pkg/traceql/expr.y:328 { yyVAL.attributeField = NewScopedAttribute(AttributeScopeResource, true, yyDollar[3].staticStr) } - case 140: + case 147: yyDollar = yyS[yypt-4 : yypt+1] -//line pkg/traceql/expr.y:313 +//line pkg/traceql/expr.y:329 { yyVAL.attributeField = NewScopedAttribute(AttributeScopeSpan, true, yyDollar[3].staticStr) } diff --git a/pkg/traceql/lexer.go b/pkg/traceql/lexer.go index 71ba43f73b3..107ca0d6201 100644 --- a/pkg/traceql/lexer.go +++ b/pkg/traceql/lexer.go @@ -78,6 +78,8 @@ var tokens = map[string]int{ "by": BY, "coalesce": COALESCE, "select": SELECT, + "rate": RATE, + "count_over_time": COUNT_OVER_TIME, } type lexer struct { diff --git a/pkg/traceql/parse_test.go b/pkg/traceql/parse_test.go index 81a8da5810f..a6abd2455a7 100644 --- a/pkg/traceql/parse_test.go +++ b/pkg/traceql/parse_test.go @@ -13,6 +13,7 @@ func TestPipelineErrors(t *testing.T) { in string err error }{ + {in: "", err: newParseError("syntax error: unexpected $end", 0, 0)}, {in: "{ .a } | { .b", err: newParseError("syntax error: unexpected $end", 1, 14)}, {in: "{ .a | .b }", err: newParseError("syntax error: unexpected |", 1, 6)}, {in: "({ .a } | { .b }", err: newParseError("syntax error: unexpected $end, expecting ) or |", 1, 17)}, @@ -97,7 +98,7 @@ func TestPipelineOperatorPrecedence(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -257,7 +258,7 @@ func TestPipelineSpansetOperators(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -339,7 +340,7 @@ func TestPipelineScalarOperators(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -379,7 +380,7 @@ func TestPipelines(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{tc.expected}, actual) + require.Equal(t, newRootExpr(tc.expected), actual) }) } } @@ -417,7 +418,7 @@ func TestGroupCoalesceOperation(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{tc.expected}, actual) + require.Equal(t, newRootExpr(tc.expected), actual) }) } } @@ -445,8 +446,8 @@ func TestSelectOperation(t *testing.T) { in string expected Pipeline }{ - {in: "select(.a)", expected: newPipeline(newSelectOperation([]FieldExpression{NewAttribute("a")}))}, - {in: "select(.a,.b)", expected: newPipeline(newSelectOperation([]FieldExpression{NewAttribute("a"), NewAttribute("b")}))}, + {in: "select(.a)", expected: newPipeline(newSelectOperation([]Attribute{NewAttribute("a")}))}, + {in: "select(.a,.b)", expected: newPipeline(newSelectOperation([]Attribute{NewAttribute("a"), NewAttribute("b")}))}, } for _, tc := range tests { @@ -454,7 +455,7 @@ func TestSelectOperation(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{tc.expected}, actual) + require.Equal(t, newRootExpr(tc.expected), actual) }) } } @@ -523,7 +524,7 @@ func TestSpansetExpressionPrecedence(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -554,7 +555,7 @@ func TestSpansetExpressionOperators(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -611,7 +612,7 @@ func TestScalarExpressionPrecedence(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -633,7 +634,7 @@ func TestScalarExpressionOperators(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -772,7 +773,7 @@ func TestSpansetFilterOperatorPrecedence(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(tc.expected))}, actual) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(tc.expected))), actual) }) } } @@ -815,7 +816,7 @@ func TestSpansetFilterStatics(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(tc.expected))}, actual) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(tc.expected))), actual) }) } } @@ -859,7 +860,7 @@ func TestSpansetFilterOperators(t *testing.T) { test := func(q string, expected FieldExpression) { actual, err := Parse(q) require.NoError(t, err, q) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(expected))}, actual, q) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(expected))), actual, q) } for _, tc := range tests { @@ -940,25 +941,25 @@ func TestAttributes(t *testing.T) { actual, err := Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(tc.expected))}, actual) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(tc.expected))), actual) s = "{" + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(tc.expected))}, actual) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(tc.expected))), actual) s = "{ (" + tc.in + ") }" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(tc.expected))}, actual) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(tc.expected))), actual) s = "{ " + tc.in + " + " + tc.in + " }" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(newBinaryOperation(OpAdd, tc.expected, tc.expected)))}, actual) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(newBinaryOperation(OpAdd, tc.expected, tc.expected)))), actual) }) } } @@ -987,65 +988,65 @@ func TestIntrinsics(t *testing.T) { actual, err := Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeNone, Parent: false, Name: tc.in, Intrinsic: tc.expected, - }))}, actual) + }))), actual) // as attribute e.g .duration s = "{ ." + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeNone, Parent: false, Name: tc.in, Intrinsic: IntrinsicNone, - }))}, actual) + }))), actual) // as span scoped attribute e.g span.duration s = "{ span." + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeSpan, Parent: false, Name: tc.in, Intrinsic: IntrinsicNone, - }))}, actual) + }))), actual) // as resource scoped attribute e.g resource.duration s = "{ resource." + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeResource, Parent: false, Name: tc.in, Intrinsic: IntrinsicNone, - }))}, actual) + }))), actual) // as parent scoped intrinsic e.g parent.duration s = "{ parent." + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeNone, Parent: true, Name: tc.in, Intrinsic: tc.expected, - }))}, actual) + }))), actual) // as nested parent scoped intrinsic e.g. parent.duration.foo // this becomes lookup on attribute named "duration.foo" @@ -1053,39 +1054,39 @@ func TestIntrinsics(t *testing.T) { actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeNone, Parent: true, Name: tc.in + ".foo", Intrinsic: IntrinsicNone, - }))}, actual) + }))), actual) // as parent resource scoped attribute e.g. parent.resource.duration s = "{ parent.resource." + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeResource, Parent: true, Name: tc.in, Intrinsic: IntrinsicNone, - }))}, actual) + }))), actual) // as parent span scoped attribute e.g. praent.span.duration s = "{ parent.span." + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeSpan, Parent: true, Name: tc.in, Intrinsic: IntrinsicNone, - }))}, actual) + }))), actual) }) } } @@ -1123,7 +1124,7 @@ func TestEmptyQuery(t *testing.T) { t.Run(tc.in, func(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err, tc.in) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(NewStaticBool(true)))}, actual, tc.in) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(NewStaticBool(true)))), actual, tc.in) }) } } diff --git a/pkg/traceql/storage.go b/pkg/traceql/storage.go index 97712bc30d9..65ba27cf9f1 100644 --- a/pkg/traceql/storage.go +++ b/pkg/traceql/storage.go @@ -54,6 +54,10 @@ type FetchSpansRequest struct { EndTimeUnixNanos uint64 Conditions []Condition + // mdisibio - Better to push trace by ID filtering into Conditions with a new between op? + ShardID uint32 + ShardCount uint32 + // Hints // By default the storage layer fetches spans meeting any of the criteria. @@ -76,6 +80,21 @@ func (f *FetchSpansRequest) appendCondition(c ...Condition) { f.Conditions = append(f.Conditions, c...) } +func (f *FetchSpansRequest) HasAttribute(a Attribute) bool { + for _, cc := range f.Conditions { + if cc.Attribute == a { + return true + } + } + for _, cc := range f.SecondPassConditions { + if cc.Attribute == a { + return true + } + } + + return false +} + type Span interface { // AttributeFor returns the attribute for the given key. If the attribute is not found then // the second return value will be false. diff --git a/pkg/traceql/test_examples.yaml b/pkg/traceql/test_examples.yaml index 6949f1b3aa8..75e3c7e45d7 100644 --- a/pkg/traceql/test_examples.yaml +++ b/pkg/traceql/test_examples.yaml @@ -157,6 +157,7 @@ parse_fails: # select - 'select(.a' - 'select()' + - 'select(1 + "string")' # Don't support arbitrary field expressions # pipelines - 'coalesce() | { true }' # pipelines can't start with coalesce - 'count() > 3 && { true }' # scalar filters have to be in pipeline @@ -230,8 +231,6 @@ validate_fails: - 'min(1) = max(2) + 3' - 'min(1.1 - 3) > 1' - 'max(1h + 2h) > 1' - # select - - 'select(1 + "string")' # by - will *not* be valid when supported - group expressions must reference the span - '{ true } | by(1)' - '{ true } | by("foo")' diff --git a/pkg/traceqlmetrics/metrics.go b/pkg/traceqlmetrics/metrics.go index ef9bc074a2e..dd343ee39e3 100644 --- a/pkg/traceqlmetrics/metrics.go +++ b/pkg/traceqlmetrics/metrics.go @@ -203,7 +203,7 @@ func GetMetrics(ctx context.Context, query, groupBy string, spanLimit int, start groupByKeys[i] = groupBys[i][0].String() } - eval, req, err := traceql.NewEngine().Compile(query) + eval, _, req, err := traceql.NewEngine().Compile(query) if err != nil { return nil, fmt.Errorf("compiling query: %w", err) } diff --git a/tempodb/encoding/vparquet3/block_traceql_meta_test.go b/tempodb/encoding/vparquet3/block_traceql_meta_test.go index cfdbbbb1991..acd147fb38e 100644 --- a/tempodb/encoding/vparquet3/block_traceql_meta_test.go +++ b/tempodb/encoding/vparquet3/block_traceql_meta_test.go @@ -373,16 +373,28 @@ func TestBackendBlockSearchFetchMetaData(t *testing.T) { ss = append(ss, spanSet) } - // equal will fail on the rownum mismatches. this is an internal detail to the - // fetch layer. just wipe them out here + // Clean up span internal details for consistent comparison. + // (1) Wipe out internal fields like rownum. + // (2) Wipe out empty leftover buffers from pooling. for _, s := range ss { for _, sp := range s.Spans { - sp.(*span).cbSpanset = nil - sp.(*span).cbSpansetFinal = false - sp.(*span).rowNum = parquetquery.RowNumber{} + spn := sp.(*span) + spn.cbSpanset = nil + spn.cbSpansetFinal = false + spn.rowNum = parquetquery.RowNumber{} + + if len(spn.traceAttrs) == 0 { + spn.traceAttrs = nil + } + if len(spn.resourceAttrs) == 0 { + spn.resourceAttrs = nil + } + if len(spn.spanAttrs) == 0 { + spn.spanAttrs = nil + } // sort actual attrs to get consistent comparisons - sortSpanAttrs(sp.(*span)) + sortSpanAttrs(spn) } s.ReleaseFn = nil } diff --git a/tempodb/tempodb_test.go b/tempodb/tempodb_test.go index 327a109e6df..44a410a7325 100644 --- a/tempodb/tempodb_test.go +++ b/tempodb/tempodb_test.go @@ -697,8 +697,9 @@ func testCompleteBlockHonorsStartStopTimes(t *testing.T, targetBlockVersion stri require.NoError(t, err, "unexpected error completing block") // Verify the block time was constrained to the slack time. - require.Equal(t, now.Unix(), complete.BlockMeta().StartTime.Unix()) - require.Equal(t, now.Unix(), complete.BlockMeta().EndTime.Unix()) + // Accept a couple seconds of slack time to ensure test reliability. + require.Less(t, complete.BlockMeta().StartTime.Sub(now).Seconds(), 2.0) + require.Less(t, complete.BlockMeta().EndTime.Sub(now).Seconds(), 2.0) } func writeTraceToWal(t require.TestingT, b common.WALBlock, dec model.SegmentDecoder, id common.ID, tr *tempopb.Trace, start, end uint32) { diff --git a/vendor/github.com/mattn/go-ieproxy/ieproxy_unix.go b/vendor/github.com/mattn/go-ieproxy/ieproxy_unix.go index 86682f441bc..c352546e23c 100644 --- a/vendor/github.com/mattn/go-ieproxy/ieproxy_unix.go +++ b/vendor/github.com/mattn/go-ieproxy/ieproxy_unix.go @@ -1,4 +1,4 @@ -//go:build (!windows && !darwin) || !cgo +//go:build !windows && (!darwin || !cgo) // +build !windows,!darwin !cgo package ieproxy diff --git a/vendor/github.com/mattn/go-ieproxy/pac_unix.go b/vendor/github.com/mattn/go-ieproxy/pac_unix.go index 94a48f0fb0d..d4613cff695 100644 --- a/vendor/github.com/mattn/go-ieproxy/pac_unix.go +++ b/vendor/github.com/mattn/go-ieproxy/pac_unix.go @@ -1,4 +1,4 @@ -//go:build (!windows && !darwin) || !cgo +//go:build !windows && (!darwin || !cgo) // +build !windows,!darwin !cgo package ieproxy diff --git a/vendor/modules.txt b/vendor/modules.txt index 62809af499c..7626d58e918 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -794,8 +794,8 @@ github.com/mailru/easyjson/jwriter # github.com/mattn/go-colorable v0.1.13 ## explicit; go 1.15 github.com/mattn/go-colorable -# github.com/mattn/go-ieproxy v0.0.9 -## explicit; go 1.14 +# github.com/mattn/go-ieproxy v0.0.11 +## explicit; go 1.17 github.com/mattn/go-ieproxy # github.com/mattn/go-isatty v0.0.19 ## explicit; go 1.15