exclude filter support and fix for not sending null string in groupby for aggregates API (#654)

* feat: add support to exclude filter params

* fix: null string in group by
This commit is contained in:
Vishal Sharma 2022-01-28 22:56:54 +05:30 committed by GitHub
parent e823987eb0
commit 16fbbf8a0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 132 additions and 397 deletions

View File

@ -1329,121 +1329,62 @@ func (r *ClickHouseReader) SearchSpans(ctx context.Context, queryParams *model.S
return &searchSpansResult, nil
}
func buildFilterArrayQuery(ctx context.Context, excludeMap map[string]struct{}, params []string, filter string, query *string, args []interface{}) []interface{} {
for i, e := range params {
if i == 0 && i == len(params)-1 {
if _, ok := excludeMap[filter]; ok {
*query += fmt.Sprintf(" AND NOT (%s=?)", filter)
} else {
*query += fmt.Sprintf(" AND (%s=?)", filter)
}
} else if i == 0 && i != len(params)-1 {
if _, ok := excludeMap[filter]; ok {
*query += fmt.Sprintf(" AND NOT (%s=?", filter)
} else {
*query += fmt.Sprintf(" AND (%s=?", filter)
}
} else if i != 0 && i == len(params)-1 {
*query += fmt.Sprintf(" OR %s=?)", filter)
} else {
*query += fmt.Sprintf(" OR %s=?", filter)
}
args = append(args, e)
}
return args
}
func (r *ClickHouseReader) GetSpanFilters(ctx context.Context, queryParams *model.SpanFilterParams) (*model.SpanFiltersResponse, *model.ApiError) {
var query string
excludeMap := make(map[string]struct{})
for _, e := range queryParams.Exclude {
excludeMap[e] = struct{}{}
}
args := []interface{}{strconv.FormatInt(queryParams.Start.UnixNano(), 10), strconv.FormatInt(queryParams.End.UnixNano(), 10)}
if len(queryParams.ServiceName) > 0 {
for i, e := range queryParams.ServiceName {
if i == 0 && i == len(queryParams.ServiceName)-1 {
query += " AND (serviceName=?)"
} else if i == 0 && i != len(queryParams.ServiceName)-1 {
query += " AND (serviceName=?"
} else if i != 0 && i == len(queryParams.ServiceName)-1 {
query += " OR serviceName=?)"
} else {
query += " OR serviceName=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.ServiceName, constants.ServiceName, &query, args)
}
if len(queryParams.HttpRoute) > 0 {
for i, e := range queryParams.HttpRoute {
if i == 0 && i == len(queryParams.HttpRoute)-1 {
query += " AND (httpRoute=?)"
} else if i == 0 && i != len(queryParams.HttpRoute)-1 {
query += " AND (httpRoute=?"
} else if i != 0 && i == len(queryParams.HttpRoute)-1 {
query += " OR httpRoute=?)"
} else {
query += " OR httpRoute=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpRoute, constants.HttpRoute, &query, args)
}
if len(queryParams.HttpCode) > 0 {
for i, e := range queryParams.HttpCode {
if i == 0 && i == len(queryParams.HttpCode)-1 {
query += " AND (httpCode=?)"
} else if i == 0 && i != len(queryParams.HttpCode)-1 {
query += " AND (httpCode=?"
} else if i != 0 && i == len(queryParams.HttpCode)-1 {
query += " OR httpCode=?)"
} else {
query += " OR httpCode=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpCode, constants.HttpCode, &query, args)
}
if len(queryParams.HttpHost) > 0 {
for i, e := range queryParams.HttpHost {
if i == 0 && i == len(queryParams.HttpHost)-1 {
query += " AND (httpHost=?)"
} else if i == 0 && i != len(queryParams.HttpHost)-1 {
query += " AND (httpHost=?"
} else if i != 0 && i == len(queryParams.HttpHost)-1 {
query += " OR httpHost=?)"
} else {
query += " OR httpHost=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpHost, constants.HttpHost, &query, args)
}
if len(queryParams.HttpMethod) > 0 {
for i, e := range queryParams.HttpMethod {
if i == 0 && i == len(queryParams.HttpMethod)-1 {
query += " AND (httpMethod=?)"
} else if i == 0 && i != len(queryParams.HttpMethod)-1 {
query += " AND (httpMethod=?"
} else if i != 0 && i == len(queryParams.HttpMethod)-1 {
query += " OR httpMethod=?)"
} else {
query += " OR httpMethod=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpMethod, constants.HttpMethod, &query, args)
}
if len(queryParams.HttpUrl) > 0 {
for i, e := range queryParams.HttpUrl {
if i == 0 && i == len(queryParams.HttpUrl)-1 {
query += " AND (httpUrl=?)"
} else if i == 0 && i != len(queryParams.HttpUrl)-1 {
query += " AND (httpUrl=?"
} else if i != 0 && i == len(queryParams.HttpUrl)-1 {
query += " OR httpUrl=?)"
} else {
query += " OR httpUrl=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpUrl, constants.HttpUrl, &query, args)
}
if len(queryParams.Component) > 0 {
for i, e := range queryParams.Component {
if i == 0 && i == len(queryParams.Component)-1 {
query += " AND (component=?)"
} else if i == 0 && i != len(queryParams.Component)-1 {
query += " AND (component=?"
} else if i != 0 && i == len(queryParams.Component)-1 {
query += " OR component=?)"
} else {
query += " OR component=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.Component, constants.Component, &query, args)
}
if len(queryParams.Operation) > 0 {
for i, e := range queryParams.Operation {
if i == 0 && i == len(queryParams.Operation)-1 {
query += " AND (name=?)"
} else if i == 0 && i != len(queryParams.Operation)-1 {
query += " AND (name=?"
} else if i != 0 && i == len(queryParams.Operation)-1 {
query += " OR name=?)"
} else {
query += " OR name=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.Operation, constants.Operation, &query, args)
}
if len(queryParams.MinDuration) != 0 {
@ -1499,6 +1440,7 @@ func (r *ClickHouseReader) GetSpanFilters(ctx context.Context, queryParams *mode
finalQuery += query
finalQuery += " GROUP BY httpCode"
var dBResponse []model.DBResponseHttpCode
fmt.Println(finalQuery)
err := r.db.Select(&dBResponse, finalQuery, args...)
if err != nil {
zap.S().Debug("Error in processing sql query: ", err)
@ -1643,119 +1585,36 @@ func (r *ClickHouseReader) GetFilteredSpans(ctx context.Context, queryParams *mo
baseQuery := fmt.Sprintf("SELECT timestamp, spanID, traceID, serviceName, name, durationNano, httpCode, httpMethod FROM %s WHERE timestamp >= ? AND timestamp <= ?", r.indexTable)
excludeMap := make(map[string]struct{})
for _, e := range queryParams.Exclude {
excludeMap[e] = struct{}{}
}
var query string
args := []interface{}{strconv.FormatInt(queryParams.Start.UnixNano(), 10), strconv.FormatInt(queryParams.End.UnixNano(), 10)}
if len(queryParams.ServiceName) > 0 {
for i, e := range queryParams.ServiceName {
if i == 0 && i == len(queryParams.ServiceName)-1 {
query += " AND (serviceName=?)"
} else if i == 0 && i != len(queryParams.ServiceName)-1 {
query += " AND (serviceName=?"
} else if i != 0 && i == len(queryParams.ServiceName)-1 {
query += " OR serviceName=?)"
} else {
query += " OR serviceName=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.ServiceName, constants.ServiceName, &query, args)
}
if len(queryParams.HttpRoute) > 0 {
for i, e := range queryParams.HttpRoute {
if i == 0 && i == len(queryParams.HttpRoute)-1 {
query += " AND (httpRoute=?)"
} else if i == 0 && i != len(queryParams.HttpRoute)-1 {
query += " AND (httpRoute=?"
} else if i != 0 && i == len(queryParams.HttpRoute)-1 {
query += " OR httpRoute=?)"
} else {
query += " OR httpRoute=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpRoute, constants.HttpRoute, &query, args)
}
if len(queryParams.HttpCode) > 0 {
for i, e := range queryParams.HttpCode {
if i == 0 && i == len(queryParams.HttpCode)-1 {
query += " AND (httpCode=?)"
} else if i == 0 && i != len(queryParams.HttpCode)-1 {
query += " AND (httpCode=?"
} else if i != 0 && i == len(queryParams.HttpCode)-1 {
query += " OR httpCode=?)"
} else {
query += " OR httpCode=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpCode, constants.HttpCode, &query, args)
}
if len(queryParams.HttpHost) > 0 {
for i, e := range queryParams.HttpHost {
if i == 0 && i == len(queryParams.HttpHost)-1 {
query += " AND (httpHost=?)"
} else if i == 0 && i != len(queryParams.HttpHost)-1 {
query += " AND (httpHost=?"
} else if i != 0 && i == len(queryParams.HttpHost)-1 {
query += " OR httpHost=?)"
} else {
query += " OR httpHost=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpHost, constants.HttpHost, &query, args)
}
if len(queryParams.HttpMethod) > 0 {
for i, e := range queryParams.HttpMethod {
if i == 0 && i == len(queryParams.HttpMethod)-1 {
query += " AND (httpMethod=?)"
} else if i == 0 && i != len(queryParams.HttpMethod)-1 {
query += " AND (httpMethod=?"
} else if i != 0 && i == len(queryParams.HttpMethod)-1 {
query += " OR httpMethod=?)"
} else {
query += " OR httpMethod=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpMethod, constants.HttpMethod, &query, args)
}
if len(queryParams.HttpUrl) > 0 {
for i, e := range queryParams.HttpUrl {
if i == 0 && i == len(queryParams.HttpUrl)-1 {
query += " AND (httpUrl=?)"
} else if i == 0 && i != len(queryParams.HttpUrl)-1 {
query += " AND (httpUrl=?"
} else if i != 0 && i == len(queryParams.HttpUrl)-1 {
query += " OR httpUrl=?)"
} else {
query += " OR httpUrl=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpUrl, constants.HttpUrl, &query, args)
}
if len(queryParams.Component) > 0 {
for i, e := range queryParams.Component {
if i == 0 && i == len(queryParams.Component)-1 {
query += " AND (component=?)"
} else if i == 0 && i != len(queryParams.Component)-1 {
query += " AND (component=?"
} else if i != 0 && i == len(queryParams.Component)-1 {
query += " OR component=?)"
} else {
query += " OR component=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.Component, constants.Component, &query, args)
}
if len(queryParams.Operation) > 0 {
for i, e := range queryParams.Operation {
if i == 0 && i == len(queryParams.Operation)-1 {
query += " AND (name=?)"
} else if i == 0 && i != len(queryParams.Operation)-1 {
query += " AND (name=?"
} else if i != 0 && i == len(queryParams.Operation)-1 {
query += " OR name=?)"
} else {
query += " OR name=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.Operation, constants.Operation, &query, args)
}
if len(queryParams.MinDuration) != 0 {
query = query + " AND durationNano >= ?"
@ -1880,121 +1739,37 @@ func (r *ClickHouseReader) GetFilteredSpans(ctx context.Context, queryParams *mo
func (r *ClickHouseReader) GetTagFilters(ctx context.Context, queryParams *model.TagFilterParams) (*[]model.TagFilters, *model.ApiError) {
excludeMap := make(map[string]struct{})
for _, e := range queryParams.Exclude {
excludeMap[e] = struct{}{}
}
var query string
args := []interface{}{strconv.FormatInt(queryParams.Start.UnixNano(), 10), strconv.FormatInt(queryParams.End.UnixNano(), 10)}
if len(queryParams.ServiceName) > 0 {
for i, e := range queryParams.ServiceName {
if i == 0 && i == len(queryParams.ServiceName)-1 {
query += " AND (serviceName=?)"
} else if i == 0 && i != len(queryParams.ServiceName)-1 {
query += " AND (serviceName=?"
} else if i != 0 && i == len(queryParams.ServiceName)-1 {
query += " OR serviceName=?)"
} else {
query += " OR serviceName=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.ServiceName, constants.ServiceName, &query, args)
}
if len(queryParams.HttpRoute) > 0 {
for i, e := range queryParams.HttpRoute {
if i == 0 && i == len(queryParams.HttpRoute)-1 {
query += " AND (httpRoute=?)"
} else if i == 0 && i != len(queryParams.HttpRoute)-1 {
query += " AND (httpRoute=?"
} else if i != 0 && i == len(queryParams.HttpRoute)-1 {
query += " OR httpRoute=?)"
} else {
query += " OR httpRoute=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpRoute, constants.HttpRoute, &query, args)
}
if len(queryParams.HttpCode) > 0 {
for i, e := range queryParams.HttpCode {
if i == 0 && i == len(queryParams.HttpCode)-1 {
query += " AND (httpCode=?)"
} else if i == 0 && i != len(queryParams.HttpCode)-1 {
query += " AND (httpCode=?"
} else if i != 0 && i == len(queryParams.HttpCode)-1 {
query += " OR httpCode=?)"
} else {
query += " OR httpCode=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpCode, constants.HttpCode, &query, args)
}
if len(queryParams.HttpHost) > 0 {
for i, e := range queryParams.HttpHost {
if i == 0 && i == len(queryParams.HttpHost)-1 {
query += " AND (httpHost=?)"
} else if i == 0 && i != len(queryParams.HttpHost)-1 {
query += " AND (httpHost=?"
} else if i != 0 && i == len(queryParams.HttpHost)-1 {
query += " OR httpHost=?)"
} else {
query += " OR httpHost=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpHost, constants.HttpHost, &query, args)
}
if len(queryParams.HttpMethod) > 0 {
for i, e := range queryParams.HttpMethod {
if i == 0 && i == len(queryParams.HttpMethod)-1 {
query += " AND (httpMethod=?)"
} else if i == 0 && i != len(queryParams.HttpMethod)-1 {
query += " AND (httpMethod=?"
} else if i != 0 && i == len(queryParams.HttpMethod)-1 {
query += " OR httpMethod=?)"
} else {
query += " OR httpMethod=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpMethod, constants.HttpMethod, &query, args)
}
if len(queryParams.HttpUrl) > 0 {
for i, e := range queryParams.HttpUrl {
if i == 0 && i == len(queryParams.HttpUrl)-1 {
query += " AND (httpUrl=?)"
} else if i == 0 && i != len(queryParams.HttpUrl)-1 {
query += " AND (httpUrl=?"
} else if i != 0 && i == len(queryParams.HttpUrl)-1 {
query += " OR httpUrl=?)"
} else {
query += " OR httpUrl=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpUrl, constants.HttpUrl, &query, args)
}
if len(queryParams.Component) > 0 {
for i, e := range queryParams.Component {
if i == 0 && i == len(queryParams.Component)-1 {
query += " AND (component=?)"
} else if i == 0 && i != len(queryParams.Component)-1 {
query += " AND (component=?"
} else if i != 0 && i == len(queryParams.Component)-1 {
query += " OR component=?)"
} else {
query += " OR component=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.Component, constants.Component, &query, args)
}
if len(queryParams.Operation) > 0 {
for i, e := range queryParams.Operation {
if i == 0 && i == len(queryParams.Operation)-1 {
query += " AND (name=?)"
} else if i == 0 && i != len(queryParams.Operation)-1 {
query += " AND (name=?"
} else if i != 0 && i == len(queryParams.Operation)-1 {
query += " OR name=?)"
} else {
query += " OR name=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.Operation, constants.Operation, &query, args)
}
if len(queryParams.MinDuration) != 0 {
query = query + " AND durationNano >= ?"
args = append(args, queryParams.MinDuration)
@ -2485,6 +2260,11 @@ func (r *ClickHouseReader) SearchSpansAggregate(ctx context.Context, queryParams
func (r *ClickHouseReader) GetFilteredSpansAggregates(ctx context.Context, queryParams *model.GetFilteredSpanAggregatesParams) (*model.GetFilteredSpansAggregatesResponse, *model.ApiError) {
excludeMap := make(map[string]struct{})
for _, e := range queryParams.Exclude {
excludeMap[e] = struct{}{}
}
SpanAggregatesDBResponseItems := []model.SpanAggregatesDBResponseItem{}
aggregation_query := ""
@ -2552,116 +2332,28 @@ func (r *ClickHouseReader) GetFilteredSpansAggregates(ctx context.Context, query
}
if len(queryParams.ServiceName) > 0 {
for i, e := range queryParams.ServiceName {
if i == 0 && i == len(queryParams.ServiceName)-1 {
query += " AND (serviceName=?)"
} else if i == 0 && i != len(queryParams.ServiceName)-1 {
query += " AND (serviceName=?"
} else if i != 0 && i == len(queryParams.ServiceName)-1 {
query += " OR serviceName=?)"
} else {
query += " OR serviceName=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.ServiceName, constants.ServiceName, &query, args)
}
if len(queryParams.HttpRoute) > 0 {
for i, e := range queryParams.HttpRoute {
if i == 0 && i == len(queryParams.HttpRoute)-1 {
query += " AND (httpRoute=?)"
} else if i == 0 && i != len(queryParams.HttpRoute)-1 {
query += " AND (httpRoute=?"
} else if i != 0 && i == len(queryParams.HttpRoute)-1 {
query += " OR httpRoute=?)"
} else {
query += " OR httpRoute=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpRoute, constants.HttpRoute, &query, args)
}
if len(queryParams.HttpCode) > 0 {
for i, e := range queryParams.HttpCode {
if i == 0 && i == len(queryParams.HttpCode)-1 {
query += " AND (httpCode=?)"
} else if i == 0 && i != len(queryParams.HttpCode)-1 {
query += " AND (httpCode=?"
} else if i != 0 && i == len(queryParams.HttpCode)-1 {
query += " OR httpCode=?)"
} else {
query += " OR httpCode=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpCode, constants.HttpCode, &query, args)
}
if len(queryParams.HttpHost) > 0 {
for i, e := range queryParams.HttpHost {
if i == 0 && i == len(queryParams.HttpHost)-1 {
query += " AND (httpHost=?)"
} else if i == 0 && i != len(queryParams.HttpHost)-1 {
query += " AND (httpHost=?"
} else if i != 0 && i == len(queryParams.HttpHost)-1 {
query += " OR httpHost=?)"
} else {
query += " OR httpHost=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpHost, constants.HttpHost, &query, args)
}
if len(queryParams.HttpMethod) > 0 {
for i, e := range queryParams.HttpMethod {
if i == 0 && i == len(queryParams.HttpMethod)-1 {
query += " AND (httpMethod=?)"
} else if i == 0 && i != len(queryParams.HttpMethod)-1 {
query += " AND (httpMethod=?"
} else if i != 0 && i == len(queryParams.HttpMethod)-1 {
query += " OR httpMethod=?)"
} else {
query += " OR httpMethod=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpMethod, constants.HttpMethod, &query, args)
}
if len(queryParams.HttpUrl) > 0 {
for i, e := range queryParams.HttpUrl {
if i == 0 && i == len(queryParams.HttpUrl)-1 {
query += " AND (httpUrl=?)"
} else if i == 0 && i != len(queryParams.HttpUrl)-1 {
query += " AND (httpUrl=?"
} else if i != 0 && i == len(queryParams.HttpUrl)-1 {
query += " OR httpUrl=?)"
} else {
query += " OR httpUrl=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.HttpUrl, constants.HttpUrl, &query, args)
}
if len(queryParams.Component) > 0 {
for i, e := range queryParams.Component {
if i == 0 && i == len(queryParams.Component)-1 {
query += " AND (component=?)"
} else if i == 0 && i != len(queryParams.Component)-1 {
query += " AND (component=?"
} else if i != 0 && i == len(queryParams.Component)-1 {
query += " OR component=?)"
} else {
query += " OR component=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.Component, constants.Component, &query, args)
}
if len(queryParams.Operation) > 0 {
for i, e := range queryParams.Operation {
if i == 0 && i == len(queryParams.Operation)-1 {
query += " AND (name=?)"
} else if i == 0 && i != len(queryParams.Operation)-1 {
query += " AND (name=?"
} else if i != 0 && i == len(queryParams.Operation)-1 {
query += " OR name=?)"
} else {
query += " OR name=?"
}
args = append(args, e)
}
args = buildFilterArrayQuery(ctx, excludeMap, queryParams.Operation, constants.Operation, &query, args)
}
if len(queryParams.MinDuration) != 0 {
query = query + " AND durationNano >= ?"
@ -2788,12 +2480,12 @@ func (r *ClickHouseReader) GetFilteredSpansAggregates(ctx context.Context, query
SpanAggregatesDBResponseItems[i].Value = float32(SpanAggregatesDBResponseItems[i].Value) / float32(queryParams.StepSeconds)
}
if responseElement, ok := GetFilteredSpansAggregatesResponse.Items[SpanAggregatesDBResponseItems[i].Timestamp]; !ok {
if queryParams.GroupBy != "" {
if queryParams.GroupBy != "" && SpanAggregatesDBResponseItems[i].GroupBy.String != "" {
GetFilteredSpansAggregatesResponse.Items[SpanAggregatesDBResponseItems[i].Timestamp] = model.SpanAggregatesResponseItem{
Timestamp: SpanAggregatesDBResponseItems[i].Timestamp,
GroupBy: map[string]float32{SpanAggregatesDBResponseItems[i].GroupBy.String: SpanAggregatesDBResponseItems[i].Value},
}
} else {
} else if queryParams.GroupBy == "" {
GetFilteredSpansAggregatesResponse.Items[SpanAggregatesDBResponseItems[i].Timestamp] = model.SpanAggregatesResponseItem{
Timestamp: SpanAggregatesDBResponseItems[i].Timestamp,
Value: SpanAggregatesDBResponseItems[i].Value,
@ -2801,7 +2493,7 @@ func (r *ClickHouseReader) GetFilteredSpansAggregates(ctx context.Context, query
}
} else {
if queryParams.GroupBy != "" {
if queryParams.GroupBy != "" && SpanAggregatesDBResponseItems[i].GroupBy.String != "" {
responseElement.GroupBy[SpanAggregatesDBResponseItems[i].GroupBy.String] = SpanAggregatesDBResponseItems[i].Value
}
GetFilteredSpansAggregatesResponse.Items[SpanAggregatesDBResponseItems[i].Timestamp] = responseElement

View File

@ -506,6 +506,7 @@ func parseSpanFilterRequest(r *http.Request) (*model.SpanFilterParams, error) {
Status: []string{},
Operation: []string{},
GetFilters: []string{},
Exclude: []string{},
}
params.ServiceName = fetchArrayValues("serviceName", r)
@ -528,6 +529,8 @@ func parseSpanFilterRequest(r *http.Request) (*model.SpanFilterParams, error) {
params.GetFilters = fetchArrayValues("getFilters", r)
params.Exclude = fetchArrayValues("exclude", r)
minDuration, err := parseTimestamp("minDuration", r)
if err == nil {
params.MinDuration = *minDuration
@ -565,6 +568,7 @@ func parseFilteredSpansRequest(r *http.Request) (*model.GetFilteredSpansParams,
Operation: []string{},
Limit: 100,
Order: "descending",
Exclude: []string{},
}
params.ServiceName = fetchArrayValues("serviceName", r)
@ -585,6 +589,8 @@ func parseFilteredSpansRequest(r *http.Request) (*model.GetFilteredSpansParams,
params.Component = fetchArrayValues("component", r)
params.Exclude = fetchArrayValues("exclude", r)
limitStr := r.URL.Query().Get("limit")
if len(limitStr) != 0 {
limit, err := strconv.ParseInt(limitStr, 10, 64)
@ -711,6 +717,7 @@ func parseFilteredSpanAggregatesRequest(r *http.Request) (*model.GetFilteredSpan
StepSeconds: stepInt,
Dimension: dimension,
AggregationOption: aggregationOption,
Exclude: []string{},
}
params.ServiceName = fetchArrayValues("serviceName", r)
@ -731,6 +738,8 @@ func parseFilteredSpanAggregatesRequest(r *http.Request) (*model.GetFilteredSpan
params.Component = fetchArrayValues("component", r)
params.Exclude = fetchArrayValues("exclude", r)
tags, err := parseTagsV2("tags", r)
if err != nil {
return nil, err
@ -805,6 +814,7 @@ func parseTagFilterRequest(r *http.Request) (*model.TagFilterParams, error) {
Component: []string{},
Status: []string{},
Operation: []string{},
Exclude: []string{},
}
params.ServiceName = fetchArrayValues("serviceName", r)
@ -825,6 +835,8 @@ func parseTagFilterRequest(r *http.Request) (*model.TagFilterParams, error) {
params.Component = fetchArrayValues("component", r)
params.Exclude = fetchArrayValues("exclude", r)
minDuration, err := parseTimestamp("minDuration", r)
if err == nil {
params.MinDuration = *minDuration

View File

@ -25,3 +25,14 @@ const MetricsTTL = "metrics"
const ALERTMANAGER_API_PREFIX = "http://alertmanager:9093/api/"
const RELATIONAL_DATASOURCE_PATH = "/var/lib/signoz/signoz.db"
const (
ServiceName = "serviceName"
HttpRoute = "httpRoute"
HttpCode = "httpCode"
HttpHost = "httpHost"
HttpUrl = "httpUrl"
HttpMethod = "httpMethod"
Component = "component"
Operation = "name"
)

View File

@ -4,19 +4,15 @@ go 1.14
require (
cloud.google.com/go v0.88.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/ClickHouse/clickhouse-go v1.4.5
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/OneOfOne/xxhash v1.2.8 // indirect
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect
github.com/aws/aws-sdk-go v1.27.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/containerd/containerd v1.4.12 // indirect
github.com/dhui/dktest v0.3.4 // indirect
github.com/docker/docker v20.10.12+incompatible // indirect
github.com/frankban/quicktest v1.13.0 // indirect
github.com/go-kit/log v0.1.0
github.com/golang-migrate/migrate/v4 v4.14.1
@ -41,6 +37,7 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/oklog/oklog v0.3.2
github.com/oklog/run v1.1.0 // indirect
github.com/onsi/gomega v1.14.0 // indirect
@ -60,7 +57,6 @@ require (
github.com/smartystreets/goconvey v1.6.4
github.com/soheilhy/cmux v0.1.4
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/pflag v1.0.3 // indirect
github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect
go.uber.org/zap v1.16.0
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
@ -74,6 +70,7 @@ require (
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
gopkg.in/segmentio/analytics-go.v3 v3.1.0
gotest.tools/v3 v3.1.0 // indirect
)

View File

@ -58,6 +58,7 @@ github.com/ClickHouse/clickhouse-go v1.3.12/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhH
github.com/ClickHouse/clickhouse-go v1.4.5 h1:FfhyEnv6/BaWldyjgT2k4gDDmeNwJ9C4NbY/MXxJlXk=
github.com/ClickHouse/clickhouse-go v1.4.5/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY=
github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
@ -105,12 +106,16 @@ github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292/go.mod h1:qRiX68m
github.com/cockroachdb/cockroach v0.0.0-20170608034007-84bc9597164f/go.mod h1:xeT/CQ0qZHangbYbWShlCGAx31aV4AjGswDUjhKS6HQ=
github.com/cockroachdb/cockroach-go v0.0.0-20190925194419-606b3d062051/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk=
github.com/containerd/containerd v1.4.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.4.1 h1:pASeJT3R3YyVn+94qEPk0SnU1OQ20Jd/T+SPKy9xehY=
github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.4.12 h1:V+SHzYmhng/iju6M5nFrpTTusrhidoxKTwdwLw+u4c4=
github.com/containerd/containerd v1.4.12/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@ -120,12 +125,15 @@ github.com/dgrijalva/jwt-go v3.0.1-0.20161101193935-9ed569b5d1ac+incompatible/go
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-bits v0.0.0-20160601073636-2ad8d707cc05/go.mod h1:/9UYwwvZuEgp+mQ4960SHWCU1FS+FgdFX+m5ExFByNs=
github.com/dhui/dktest v0.3.3 h1:DBuH/9GFaWbDRa42qsut/hbQu+srAQ0rPWnUoiGX7CA=
github.com/dhui/dktest v0.3.3/go.mod h1:EML9sP4sqJELHn4jV7B0TY8oF6077nk83/tz7M56jcQ=
github.com/dhui/dktest v0.3.4 h1:VbUEcaSP+U2/yUr9d2JhSThXYEnDlGabRSHe2rIE46E=
github.com/dhui/dktest v0.3.4/go.mod h1:4m4n6lmXlmVfESth7mzdcv8nBI5mOb5UROPqjM02csU=
github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible h1:iWPIG7pWIsCwT6ZtHnTUpoVMnete7O/pzd9HFE3+tn8=
github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v17.12.0-ce-rc1.0.20210128214336-420b1d36250f+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v20.10.12+incompatible h1:CEeNmFM0QZIsJCZKMkZx0ZcahTiewkrgiwfYD+dfl1U=
github.com/docker/docker v20.10.12+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
@ -171,8 +179,9 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg78
github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM=
github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0=
github.com/gogo/protobuf v0.0.0-20171123125729-971cbfd2e72b/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-migrate/migrate/v4 v4.14.1 h1:qmRd/rNGjM1r3Ve5gHd5ZplytrD02UcItYNxJ3iUHHE=
github.com/golang-migrate/migrate/v4 v4.14.1/go.mod h1:l7Ks0Au6fYHuUIxUhQ0rcVX1uLlJg54C/VvW7tvxSz0=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
@ -371,6 +380,7 @@ github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q
github.com/k0kubun/pp v2.3.0+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3tgzSScAn6HmfYukg=
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@ -413,6 +423,8 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc=
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@ -785,6 +797,7 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
@ -814,6 +827,7 @@ golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200806022845-90696ccdc692/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
@ -827,6 +841,7 @@ golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
@ -918,6 +933,7 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210207032614-bba0dbe2a9ea/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
@ -1006,6 +1022,9 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
gotest.tools/v3 v3.1.0 h1:rVV8Tcg/8jHUkPUorwjaMTtemIMVXfIPKiOqnhEhakk=
gotest.tools/v3 v3.1.0/go.mod h1:fHy7eyTmJFO5bQbUsEGQ1v4m2J3Jz9eWL54TP2/ZuYQ=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

View File

@ -135,6 +135,7 @@ type GetFilteredSpansParams struct {
Order string
Offset int64
Tags []TagQueryV2
Exclude []string
}
type GetFilteredSpanAggregatesParams struct {
@ -158,6 +159,7 @@ type GetFilteredSpanAggregatesParams struct {
AggregationOption string
GroupBy string
Function string
Exclude []string
}
type SpanFilterParams struct {
@ -171,6 +173,7 @@ type SpanFilterParams struct {
Component []string
Operation []string
GetFilters []string
Exclude []string
MinDuration string
MaxDuration string
Start *time.Time
@ -187,6 +190,7 @@ type TagFilterParams struct {
HttpMethod []string
Component []string
Operation []string
Exclude []string
MinDuration string
MaxDuration string
Start *time.Time