-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add bridge_app_version metric #362
Conversation
src/components/prometheusmetrics.ts
Outdated
help: "Version number of the bridge", | ||
labels: ["version"], | ||
}); | ||
// This may change, so we need to refresh this. |
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.
This can change without the bridge restarting entirely??
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.
It's more that it's possible it may be set after this component has been loaded, .e.g. bridges that set the after loading metrics. Maybe it's leaning on the side of being too nice though, and we should make this immutable.
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.
I've changed this to only check the value once, and just warn in the docs that you should set the version before instantiating the bridge.
…ervice-bridge into hs/version-metric
src/utils/package-info.ts
Outdated
return BridgeVersion; | ||
} | ||
|
||
console.log(getBridgeVersion(".")); |
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.
Is this intentionally left in?
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.
No, I am a stupid.
This PR adds a
bridge_app_version
metric, which is already present in the IRC bridge (essentially this PR is upstreaming that code).