Skip to content

Conversation

@cristiangreco
Copy link
Contributor

@cristiangreco cristiangreco commented Feb 10, 2025

Fix issue introduced in #862

Only query SUM_LOCK_TIME and SUM_CPU_TIME when using MySQL >= 8.0.28.

Fixes #905

…8.0.28

Fix issue introduced in prometheus#862

Only query SUM_LOCK_TIME and SUM_CPU_TIME when using MySQL >= 8.0.28.

Fixes prometheus#905

Signed-off-by: Cristian Greco <[email protected]>
@cristiangreco cristiangreco marked this pull request as ready for review February 10, 2025 21:23
@cristiangreco cristiangreco requested a review from SuperQ February 11, 2025 17:33
@SuperQ
Copy link
Member

SuperQ commented Feb 14, 2025

I think we typically version the whole query rather than try and do string manipulation.

Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +44 to +46
if pb.Summary != nil {
return MetricResult{labels: labels, value: pb.GetSummary().GetSampleSum(), metricType: dto.MetricType_SUMMARY}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally would add quantiles as well, but that seems too much refactoring for this PR.

@cristiangreco cristiangreco merged commit 9bddc1a into prometheus:main Feb 14, 2025
13 checks passed
@cristiangreco cristiangreco deleted the cristian/issue-905 branch February 14, 2025 13:41
cristiangreco added a commit that referenced this pull request Feb 21, 2025
Followup of #916,
where I wrongly deleted query params formatting.
cristiangreco added a commit that referenced this pull request Feb 21, 2025
Followup of #916,
where I wrongly deleted query params formatting.

Signed-off-by: Cristian Greco <[email protected]>
cristiangreco added a commit that referenced this pull request Feb 24, 2025
Followup of #916 and #920. These columns are not available in MariaDB.
cristiangreco added a commit that referenced this pull request Feb 24, 2025
Followup of #916 and #920. These columns are not available in MariaDB.

Signed-off-by: Cristian Greco <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unknown column 'SUM_CPU_TIME' in 'SELECT'"

3 participants