Closed ns3777k closed 4 years ago
@denisvmedia
Well, how about registering AppMetrics
just like every custom metrics generator instead of doing this in bundle's services.xml
?
Artprima\PrometheusMetricsBundle\Metrics\AppMetrics:
tags:
- { name: prometheus_metrics_bundle.metrics_generator }
Adding this in flex recipe will let it be on automatically(or follow README
if flex is missing). Hence it'll be on for everyone by default and can be removed if necessary.
@denisvmedia what do you think ? :-)
I'll get back to this issue in a couple of days, I need to think on it, and I didn't have a chance to devote enough time to this issue. Stay tuned ;)
ok :-) thx
Ok, so... Let's divide it to two steps. First of all, I agree to remove the service by default. Also, I agree to include that in readme. This would be the first step. As soon as we done it, we can release a new version. After that, we can make a recipe that would get back the defaults. Why would we do that split into two steps? Simply because I think it is only possible to submit the recipes only after you have a version released, otherwise they will decline a pull request.
The only problem, however, is that I don't have time to do the stuff (I can make a pull request for the recipe, but that's it). Would you be eager to provide a pull request to the prometheus metrics bundle repo according to the agreed conditions? I would then release both of your changes so that we could speed up the process.
cc @ns3777k
Hey! Actually I found out that this bundle has more disadvantages for me than I thought, so I wrote another one for my project. Things I needed:
I created only 1 listener to collect metrics from request and response and made a decorator service to wrap CollectorRegistry so I always have a namespace injected.
Is metricsGenerator is a really need feature? Most of the time you use only one to record request and response metrics.
Well, no, record and request metrics are not the only ones that are required. At least in a generic case.
Hey! I've a couple of questions: