Comments (7)
Turns out it's possible to specify labels in the push URL:
/metrics/job/<JOBNAME>{/<LABEL_NAME>/<LABEL_VALUE>}
This ties nicely with #6.
from nexogen.libraries.metrics.
Thanks for the feedback! Let me get back to you with this issue early next week!
from nexogen.libraries.metrics.
This looks like a simple fix, so I can submit a PR if you're willing to accept it.
from nexogen.libraries.metrics.
Thanks! Yes, it is very much appreciated! Submit the PR and we can review & accept it on Monday!
from nexogen.libraries.metrics.
Hi Alexander,
Can't you use it like this?
ILabelledGauge labelledGauge = metrics.Gauge()
.Name("test")
.Help("Test.")
.LabelNames("robot")
.Register();
IGauge wallyGuage = labelledGauge.Labels("WALL-E");
IGauge johnyGauge = labelledGauge.Labels("Johnny-5");
ILabelledGauge is a builder which assigns the label value to the metric and returns a IGauge .
Or do you have something different in mind?
from nexogen.libraries.metrics.
@ahoka , yes, I'm thinking about static labels which do not change during the lifetime of the instance (in our case this is a container running on AWS ECS) and should be applied seamlessly to all metrics. Some examples - AWS region, ECS task version, ECS task id, ECS host instance id. All these values can be grabbed from environment variables, but it's quite tedious to remember to do this for dozens of metrics, would be much better to just set them once.
I think using the push URL is a good solution to this, I just need to find time to prepare the PR.
from nexogen.libraries.metrics.
This is roughly what I was thinking about: #9
from nexogen.libraries.metrics.
Related Issues (20)
- Build NuGet packages HOT 1
- AddPrometheus is not chainable
- ASP.Net Core endpoint response time collecting middleware uses actual path as labels HOT 12
- Use middleware for both http metrics collection and for metrics endpoint
- Label values are not escaped HOT 1
- Sync repository contents with private NEXOGEN master repository HOT 1
- Protobuf exposition format should be added to the Prometheus exporter HOT 1
- Provide a way to create IMetrics outside of ```AddPrometheus()``` extension method HOT 3
- .net framework compatibility HOT 2
- Nexogen.Libraries.Metrics.Prometheus.PushGateway project contains inconsistent namespaces
- Remove deprecated metric with a specific label. HOT 1
- Issue with CoreCLR metric HOT 1
- Support disabling builtin metrics
- .net framework nuget library missing HOT 3
- Allow using CollectionMiddleware without exposing metrics endpoint HOT 2
- Add .Labels(IEnumerable<string>)
- Nexogen.Libraries.Metrics.Prometheus.Standalone package missing HOT 1
- Attaching `instance` to PushGateway payload HOT 1
- Setting up contribution guidelines.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nexogen.libraries.metrics.