Files
Joe ElliottandGitHub 6cf682ca9e [TraceQL] Add Support for Kind (#2217)
* kind added to the language

Signed-off-by: Joe Elliott <[email protected]>

* added to fetch layer

Signed-off-by: Joe Elliott <[email protected]>

* todo

Signed-off-by: Joe Elliott <[email protected]>

* todos

Signed-off-by: Joe Elliott <[email protected]>

* combined status, kind and int preds

Signed-off-by: Joe Elliott <[email protected]>

* todos

Signed-off-by: Joe Elliott <[email protected]>

* changelog

Signed-off-by: Joe Elliott <[email protected]>

* Added kind to tempodb search tests. Fixed false duration condition

Signed-off-by: Joe Elliott <[email protected]>

* improve docs

Signed-off-by: Joe Elliott <[email protected]>

---------

Signed-off-by: Joe Elliott <[email protected]>
2023-03-20 15:23:09 -04:00

36 lines
811 B
Go

package trace
import v1trace "github.com/grafana/tempo/pkg/tempopb/trace/v1"
func StatusToString(s v1trace.Status_StatusCode) string {
var status string
switch s {
case v1trace.Status_STATUS_CODE_UNSET:
status = "unset"
case v1trace.Status_STATUS_CODE_OK:
status = "ok"
case v1trace.Status_STATUS_CODE_ERROR:
status = "error"
}
return status
}
func KindToString(k v1trace.Span_SpanKind) string {
var kind string
switch k {
case v1trace.Span_SPAN_KIND_UNSPECIFIED:
kind = "unspecified"
case v1trace.Span_SPAN_KIND_INTERNAL:
kind = "internal"
case v1trace.Span_SPAN_KIND_SERVER:
kind = "server"
case v1trace.Span_SPAN_KIND_CLIENT:
kind = "client"
case v1trace.Span_SPAN_KIND_PRODUCER:
kind = "producer"
case v1trace.Span_SPAN_KIND_CONSUMER:
kind = "consumer"
}
return kind
}