@cross-deck/buckets 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -302,11 +302,29 @@ await bucket("nightly-export", async () => {
|
|
|
302
302
|
});
|
|
303
303
|
```
|
|
304
304
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
**
|
|
308
|
-
|
|
309
|
-
|
|
305
|
+
From the next read on, that path reports as `nightly-export` instead of `col:events`.
|
|
306
|
+
|
|
307
|
+
> **Tagging applies going forward, not backward.** Buckets never rewrites counts
|
|
308
|
+
> that already happened — a count is a fact at the moment it occurs. So after you
|
|
309
|
+
> ship a tag you will **not** see the old `col:events` bucket rename itself. You'll
|
|
310
|
+
> see a **new `nightly-export` bucket appear and grow** as fresh reads land, while
|
|
311
|
+
> the unnamed bucket stops climbing. The next full day shows the path named from its
|
|
312
|
+
> first hour. (Watch for the *new* name appearing — not the old bar changing colour.)
|
|
313
|
+
|
|
314
|
+
> **Tagged it, but it's *still* showing untagged? You tagged the wrong path.** The
|
|
315
|
+
> check after you ship is one thing: did your new name start growing while the
|
|
316
|
+
> `col:*` / `unknown` bucket stopped climbing? If instead the **untagged bucket keeps
|
|
317
|
+
> climbing and your name never grows**, the reads aren't flowing through the code you
|
|
318
|
+
> wrapped. Remember the collection tells you *what* is read, not *where* — and the
|
|
319
|
+
> same collection is usually read from several places. Re-evaluate which path actually
|
|
320
|
+
> issues those reads and tag *that* one. A tell: a smooth, constant rhythm (especially
|
|
321
|
+
> with nobody using the app) is a **machine** — a scheduled job or per-event
|
|
322
|
+
> processing — not a person; a spiky, daytime pattern is user-driven. Let the shape
|
|
323
|
+
> point you at the right path.
|
|
324
|
+
|
|
325
|
+
See an `unknown` bucket you can't explain? **Drill in, wrap that path in a
|
|
326
|
+
`bucket()`, ship, look again** — and keep going, coarse to fine, until the read is
|
|
327
|
+
named all the way down to the line you care about. Two grains:
|
|
310
328
|
|
|
311
329
|
- **Tag a bucket** (coarse) — a whole handler or job: `bucket("pulse-map", handler)`
|
|
312
330
|
- **Tag a single read** (fine) — one query: `bucket("owner-lookup", () => db.doc(id).get())`
|
|
@@ -327,7 +345,8 @@ it all going?" to the exact line, one ship at a time.
|
|
|
327
345
|
|
|
328
346
|
`unknown` is never a dead end. It's a to-do with a one-line fix — exactly like a
|
|
329
347
|
custom analytics event you haven't named yet. You tag until you've found your
|
|
330
|
-
source;
|
|
348
|
+
source; the new names appear as fresh reads land, and the next full day starts
|
|
349
|
+
fully named.
|
|
331
350
|
|
|
332
351
|
---
|
|
333
352
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cross-deck/buckets",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Know exactly what every database read costs you — and who caused it. A tiny, never-throws read-cost collector for Firestore, server AND browser.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Crossdeck",
|