Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: minor issues found in development and enhancements #2542

Merged
merged 4 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: add setpInterval
  • Loading branch information
srikanthccv committed Apr 6, 2023
commit ecbc0bdfb601f85990034e40e7f0f344be78f1af
6 changes: 3 additions & 3 deletions pkg/query-service/app/query_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,19 +139,19 @@ func (qb *queryBuilder) prepareQueries(params *v3.QueryRangeParamsV3) (map[strin
if query.Expression == queryName {
switch query.DataSource {
case v3.DataSourceTraces:
queryString, err := qb.options.BuildTraceQuery(params.Start, params.End, params.Step, compositeQuery.QueryType, compositeQuery.PanelType, query)
queryString, err := qb.options.BuildTraceQuery(params.Start, params.End, query.StepInterval, compositeQuery.QueryType, compositeQuery.PanelType, query)
srikanthccv marked this conversation as resolved.
Show resolved Hide resolved
if err != nil {
return nil, err
}
queries[queryName] = queryString
case v3.DataSourceLogs:
queryString, err := qb.options.BuildLogQuery(params.Start, params.End, params.Step, compositeQuery.QueryType, compositeQuery.PanelType, query)
queryString, err := qb.options.BuildLogQuery(params.Start, params.End, query.StepInterval, compositeQuery.QueryType, compositeQuery.PanelType, query)
if err != nil {
return nil, err
}
queries[queryName] = queryString
case v3.DataSourceMetrics:
queryString, err := qb.options.BuildMetricQuery(params.Start, params.End, params.Step, compositeQuery.QueryType, compositeQuery.PanelType, query)
queryString, err := qb.options.BuildMetricQuery(params.Start, params.End, query.StepInterval, compositeQuery.QueryType, compositeQuery.PanelType, query)
if err != nil {
return nil, err
}
Expand Down
1 change: 1 addition & 0 deletions pkg/query-service/model/v3/v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ func (c *CompositeQuery) Validate() error {

type BuilderQuery struct {
QueryName string `json:"queryName"`
StepInterval int64 `json:"stepInterval"`
DataSource DataSource `json:"dataSource"`
AggregateOperator AggregateOperator `json:"aggregateOperator"`
AggregateAttribute AttributeKey `json:"aggregateAttribute,omitempty"`
Expand Down