Commit 2c84c2a
authored
* docs: clarify collect() generator usage and API Reference snippet context
Add a note to the collect() protocol section explaining that yield is idiomatic
(generator iterates lazily, no state between scrapes) and a preamble to the API
Reference section clarifying that code snippets belong inside a collect() method.
Follows up on review feedback in #1169.
Signed-off-by: k1chik <kkukdia@gmail.com>
* docs: split InfoMetricFamily example into two separate blocks
The single block with two yield statements looked like one collect() yielding
both patterns. Split into labelled prose + code pairs to make clear they are
alternatives, not sequential yields.
Signed-off-by: k1chik <kkukdia@gmail.com>
---------
Signed-off-by: k1chik <kkukdia@gmail.com>
1 parent 482656c commit 2c84c2a
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
79 | 88 | | |
80 | 89 | | |
81 | 90 | | |
| |||
232 | 241 | | |
233 | 242 | | |
234 | 243 | | |
| 244 | + | |
| 245 | + | |
235 | 246 | | |
236 | | - | |
237 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
238 | 251 | | |
239 | | - | |
| 252 | + | |
240 | 253 | | |
241 | 254 | | |
242 | 255 | | |
| |||
0 commit comments