Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions adrs/015-observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Head sampling decides per request before the outcome is known, so it can't keep

Production traces are sampled at 1%, about 330k traced requests a day. That's ample for understanding latency and what a request is made of.

Staging keeps every `WARN` and `ERROR` line and has no invocation logs, like production. Its traces are sampled at 10%: staging serves about 150k requests a day, so 1% would leave too few traces to debug with. That comes to about 5 GB a month.

To trace a particular request, the intended mechanism is a zone **Trace Rule** that samples 100% of requests carrying a debug header. `coolnewgeo.com` is on the Free plan, and whether Trace Rules are available there is unverified.

### Query strings are redacted
Expand Down
9 changes: 6 additions & 3 deletions wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ name = "STS_EXCHANGE_LIMIT"
namespace_id = "1002"
simple = { limit = 100, period = 60 }

# Staging is ~2M requests/month, so capturing everything costs ~5 GB/month.
# Staging serves ~150k requests/day. Capturing every invocation log and trace
# came to ~4 GB/day (~125 GB/month), as much as production. Invocation logs are
# off, as in production; traces are 10% (production is 1%), because at staging's
# volume 1% is too few traces to debug with. Together ~5 GB/month.
[env.staging.observability]
enabled = true
head_sampling_rate = 1
Expand All @@ -143,10 +146,10 @@ enabled = false
[env.staging.observability.logs]
enabled = true
head_sampling_rate = 1
invocation_logs = true
invocation_logs = false
persist = true

[env.staging.observability.traces]
enabled = true
head_sampling_rate = 1
head_sampling_rate = 0.1
persist = true
Loading