-
Notifications
You must be signed in to change notification settings - Fork 731
Backward compatibility for Prometheus metrics names #4955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5881736
78d4667
ffe6b4d
6864161
3f08333
a30f5ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,14 @@ let serviceConfigToJSON = | |
epHost = "127.0.0.1"; | ||
epPort = 3200; ## supervisord.portShiftPrometheus | ||
} // (cfg.prometheus or {}); | ||
# Just an example for metrics compatibility mapping. | ||
# An entry means the first entry has the second entry as alias. | ||
# The Metrics is then avalable, both with the original and the mapped name. | ||
# Only one mapping per message is supported. | ||
# metricsComp = { | ||
# "Mempool.TxsInMempool" = "Mempool.TxsInMempool.Mapped"; | ||
# "ChainDB.SlotNum" = "ChainDB.SlotNum.Mapped"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jutaro, just one thing -- can we change names in this example to make it more clear -- what metric already exists, and what will be created? If I didn't have the context, I'd be a bit confused by it. Also, another question -- can we flip the order? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What names to you think make it clearer. I thought adding the ".Mapped" postfix makes it clear. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is a mapping from current name to new name. I think this is pretty straightforward, and reversing it would not make it clearer in my view ?!? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It all hinges on how you read the assignment operator; its meaning for ("X" = "Y") being
right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a lot of mathematical baggage, where we define:
..which, on the surface might feel like it's imperative PL bullshit, but it actually runs deeper. Can you think of a single definition where the "new thing" appears on the right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are further reasons:
The status quo allows the strange thing and disallows the silly-but-meaningful thing. |
||
# }; | ||
}; | ||
in pkgs.commonLib.defServiceModule | ||
(lib: with lib; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has
metricsList
to be ordered somehow (e.g. identicalmv
s must be subsequent)?I was wondering about the
fold
...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one mapping per entry is supported, and then order doesn't matter.