Wiki: Need to add parameter in labels
See original GitHub issueWhat is recommended way for adding Parameter in metrics… ?
I mean, Currently we have:
invocation_by_type_created{item_type="hey"} 1.5603457069620097e+09
Which can be achieved by:
@metrics.counter('invocation_by_type', 'Number of invocations by type',
labels={'item_type': "hey"})
def echo_status(status):
return 'Status: %s' % status, status
Now, We need to have some timedelta included in output metrics,
something like:
invocation_by_type_created{item_type="hey", timedelta=52} 1.5603457069620097e+09
which is ofcause the function execution time…
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Help:Template - Wikipedia
A template is a Wikipedia page created to be included in other pages. Templates usually contain repetitive material that might need to show...
Read more >Template:Expert needed - Wikipedia
This template flags an article for the badly-needed attention of an expert or experts in the subject(s) specified (please use {{Expert needed talk}}...
Read more >Wikipedia:TemplateData/Tutorial
The "label" entry is a human-readable title for the parameter that will be displayed within the template editor. · Enter the parameter's "description"...
Read more >Template:Template parameter usage - Wikipedia
The Template Parameters tool is available for viewing template parameter usage in articles. It works with TemplateData to show the frequency of parameter...
Read more >Template:Note label - Wikipedia
The first parameter of {{ref}} is a label that has to be used for the parameter of the corresponding {{note}}. The label is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks! It helped
You can have more than one labels, and they accept functions or lambdas for values that are evaluated in the request context. See usage at https://github.com/rycus86/prometheus_flask_exporter/blob/master/README.md#usage
Is this what you’re after?