-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Labels
type: bugSomething isn't workingSomething isn't working
Description
Issue description
Lines 48 to 50 in c61f956
| public String scrape() { | |
| return prometheusMeterRegistry.scrape(); | |
| } |
This code transforms the entire meter registry into a String for the scrape endpoint. If there are a lot of metrics, this can use a bunch of memory. Additionally, micronaut-http-server-netty allocates a buffer for the full string, which is slow for multi-MB strings.
It would be better to stream the response using the scrape(OutputStream) method. I don't think it's a straight-forward change though.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: bugSomething isn't workingSomething isn't working