Skip to content

Commit 2f3946f

Browse files
committed
Make query look back configurable.
Rather than a fixed query lookback interval of 15m, make the lookback configurable with a reasonable default.
1 parent 74e84e7 commit 2f3946f

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

config.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ type Config struct {
1515
MetricPatterns []string `mapstructure:"metric_patterns"`
1616
ScrapeConcurrency int `mapstructure:"scrape_concurrency"`
1717

18-
// AddLabels configures the receiver to add human-readable labels to metrics using the Oxide API.
18+
// QueryLookback configures the lookback interval of queries
19+
// sent to the Oxide API.
20+
QueryLookback string `mapstructure:"query_lookback"`
21+
22+
// AddLabels configures the receiver to add human-readable labels to
23+
// metrics using the Oxide API.
1924
AddLabels bool `mapstructure:"add_labels"`
2025
}
2126

factory.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ func createDefaultConfig() component.Config {
2525
return &Config{
2626
MetricPatterns: []string{".*"},
2727
ScrapeConcurrency: 25,
28+
QueryLookback: "5m",
2829
}
2930
}
3031

0 commit comments

Comments
 (0)