Skip to content

Commit 36aad1c

Browse files
beorn7davkal
andcommitted
Prometheus: improve tooltips (grafana#21247)
* Prometheus data source: Update tooltip for _Scrape interval_ The old tool tip was plainly wrong. The globally configured scrape interval is not necessarily the most used scrape interval, so the new wording is describing what actually matters. The evaluation interval wasn't even mentioned before. And finally, the configured value is not strictly a lower limit for the step query parameter as it can be overridden by the panel option _Min time interval_. I plan to explain the overriding intricacies in the tool tip for _Min time interval_. Signed-off-by: beorn7 <[email protected]> * Improve tooltip for _Min step_ The previous tool tip was mostly addressing aspects that are not specific to _Min step_ (and might be more appropriate to be added to the _Min time interval_ tool tip as that setting has a wider scope). The new version emphasizes the important gotchas: that this is an _additional_ lower limit, and that it is _not_ multiplied by the resolution factor. Signed-off-by: beorn7 <[email protected]> * Fixed snapshot Co-authored-by: David <[email protected]>
1 parent 45b7de1 commit 36aad1c

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,12 @@ export class PromQueryEditor extends PureComponent<Props, State> {
128128
<div className="gf-form">
129129
<FormLabel
130130
width={7}
131-
tooltip="Leave blank for auto handling based on time range and panel width.
132-
Note that the actual dates used in the query will be adjusted
133-
to a multiple of the interval step."
131+
tooltip={
132+
<>
133+
An additional lower limit for the step parameter of the Prometheus query and for the{' '}
134+
<code>$__interval</code> variable. The limit is absolute and not modified by the "Resolution" setting.
135+
</>
136+
}
134137
>
135138
Min step
136139
</FormLabel>

public/app/plugins/datasource/prometheus/components/__snapshots__/PromQueryEditor.test.tsx.snap

+10-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,16 @@ exports[`Render PromQueryEditor with basic options should render 1`] = `
4444
className="gf-form"
4545
>
4646
<Component
47-
tooltip="Leave blank for auto handling based on time range and panel width.
48-
Note that the actual dates used in the query will be adjusted
49-
to a multiple of the interval step."
47+
tooltip={
48+
<React.Fragment>
49+
An additional lower limit for the step parameter of the Prometheus query and for the
50+
51+
<code>
52+
$__interval
53+
</code>
54+
variable. The limit is absolute and not modified by the "Resolution" setting.
55+
</React.Fragment>
56+
}
5057
width={7}
5158
>
5259
Min step

public/app/plugins/datasource/prometheus/configuration/PromSettings.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ export const PromSettings = (props: Props) => {
3434
validationEvents={promSettingsValidationEvents}
3535
/>
3636
}
37-
tooltip="Set this to your global scrape interval defined in your Prometheus config file. This will be used as a lower limit for the
38-
Prometheus step query parameter."
37+
tooltip="Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s."
3938
/>
4039
</div>
4140
</div>

0 commit comments

Comments
 (0)