Commit 0e87dc1
committed
prometheus_text_format: Fix argument order for
The formatting function should take the state as the first argument and
new data as the second. See `format/1` which passes in the trailing
linefeed as the second argument. This doesn't make much difference when
calling `format/1` because the swapped arguments only caused the metrics
to be concatenated in reverse. But this fix is important for using
`format_into/3` correctly, for example with `cowboy_req:stream_body/3`.format_into/3 fun1 parent 566e985 commit 0e87dc1
File tree
2 files changed
+20
-1
lines changed- src/formats
- test/eunit/format
2 files changed
+20
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
115 | 134 | | |
116 | 135 | | |
117 | 136 | | |
| |||
0 commit comments