Skip to content

Conversation

@yngvar-antonsson
Copy link
Contributor

@yngvar-antonsson yngvar-antonsson commented Aug 23, 2021

Luajit metrics should be gauge, because they're set in Tarantool, not metrics module.
I also refactor metrics.utils module and remove unused internal function prefix_name from it's API.

@DifferentialOrange, will it affect Grafana dashboard?

I didn't forget about

  • Tests

Close #277

@@ -1,30 +1,9 @@
local metrics = require('metrics')
Copy link
Contributor

Choose a reason for hiding this comment

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

I hope you considered this thread when push this changes #128 (comment)

local lj_metrics = misc.getmetrics()
collectors_list.gc_freed =
set_counter('gc_freed', 'Total amount of freed memory', lj_metrics.gc_freed)
utils.set_gauge('gc_freed', 'Total amount of freed memory', lj_metrics.gc_freed, nil, LJ_PREFIX)
Copy link
Member

@DifferentialOrange DifferentialOrange Aug 24, 2021

Choose a reason for hiding this comment

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

There was some ideas on reset/inc counter approach for monotonic metrics here: #128 (comment) . Maybe we should use this approach when #288 (review) instead of the current one? For example, when using prometheus the type of metric is shown in Grafana UI.

@yngvar-antonsson yngvar-antonsson force-pushed the refactor-luajit-metrics branch from eb44fe3 to 2b31488 Compare August 25, 2021 11:27
Copy link
Member

@DifferentialOrange DifferentialOrange left a comment

Choose a reason for hiding this comment

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

Missing changelog (or is it intended since rework is purely internal?)

@yngvar-antonsson yngvar-antonsson merged commit fa39a05 into master Aug 26, 2021
@yngvar-antonsson yngvar-antonsson deleted the refactor-luajit-metrics branch August 26, 2021 10:55
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.

Refactor metrics.utils to avoid duplicate code

4 participants