mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-15 02:35:55 +08:00
fix: fixed the step interval which was being perculated to list view (#6260)
* fix: fixed the step interval which was being perculated to list view * fix: fixed the step interval which was being perculated to list view * fix: fixed the step interval which was being perculated to list view * fix: fixed the step interval which was being perculated to list view * fix: fixed the step interval which was being perculated to list view * fix: fixed the step interval which was being perculated to list view * chore: bump signoz-otel-collector version (#6290) * Chore: bump signoz otel collector dependency to 0.111.5 (#6302) * chore: bump signoz-otel-collector dependency version to 0.111.5 * chore: logs filter suggestions: update import for ResourceHierarchy from signoz-otel-collector * fix: fixed the step interval which was being perculated to list view --------- Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com> Co-authored-by: Raj Kamal Singh <1133322+raj-k-singh@users.noreply.github.com>
This commit is contained in:
parent
4e26189778
commit
bdcae62bf9
@ -753,7 +753,7 @@ func TestQueryRangeValueType(t *testing.T) {
|
||||
// No caching
|
||||
expectedTimeRangeInQueryString := []string{
|
||||
fmt.Sprintf("unix_milli >= %d AND unix_milli < %d", 1675115520000, 1675115580000+120*60*1000),
|
||||
fmt.Sprintf("timestamp >= '%d' AND timestamp <= '%d'", (1675115580000+60*60*1000)*int64(1000000), (1675115580000+180*60*1000)*int64(1000000)),
|
||||
fmt.Sprintf("timestamp >= '%d' AND timestamp <= '%d'", 1675119196722000000, 1675126396722000000),
|
||||
}
|
||||
|
||||
for i, param := range params {
|
||||
|
@ -800,7 +800,7 @@ func TestV2QueryRangeValueType(t *testing.T) {
|
||||
expectedTimeRangeInQueryString := []string{
|
||||
fmt.Sprintf("unix_milli >= %d AND unix_milli < %d", 1675115520000, 1675115580000+120*60*1000), // 31st Jan, 03:23:00 to 31st Jan, 05:23:00
|
||||
fmt.Sprintf("unix_milli >= %d AND unix_milli < %d", 1675115580000+120*60*1000, 1675115580000+180*60*1000), // 31st Jan, 05:23:00 to 31st Jan, 06:23:00
|
||||
fmt.Sprintf("timestamp >= '%d' AND timestamp <= '%d'", (1675115580000+60*60*1000)*int64(1000000), (1675115580000+180*60*1000)*int64(1000000)), // 31st Jan, 05:23:00 to 31st Jan, 06:23:00
|
||||
fmt.Sprintf("timestamp >= '%d' AND timestamp <= '%d'", (1675119196722)*int64(1000000), (1675126396722)*int64(1000000)), // 31st Jan, 05:23:00 to 31st Jan, 06:23:00
|
||||
}
|
||||
|
||||
for i, param := range params {
|
||||
|
@ -501,8 +501,12 @@ func addOffsetToQuery(query string, offset uint64) string {
|
||||
// step is in seconds
|
||||
func PrepareTracesQuery(start, end int64, panelType v3.PanelType, mq *v3.BuilderQuery, options v3.QBOptions) (string, error) {
|
||||
// adjust the start and end time to the step interval
|
||||
start = start - (start % (mq.StepInterval * 1000))
|
||||
end = end - (end % (mq.StepInterval * 1000))
|
||||
if panelType == v3.PanelTypeGraph {
|
||||
// adjust the start and end time to the step interval for graph panel types
|
||||
start = start - (start % (mq.StepInterval * 1000))
|
||||
end = end - (end % (mq.StepInterval * 1000))
|
||||
}
|
||||
|
||||
if options.GraphLimitQtype == constants.FirstQueryGraphLimit {
|
||||
// give me just the group by names
|
||||
query, err := buildTracesQuery(start, end, mq.StepInterval, mq, constants.SIGNOZ_SPAN_INDEX_TABLENAME, panelType, options)
|
||||
|
Loading…
x
Reference in New Issue
Block a user