Skip to content
Notifications
Clear all

ELI5: How does Claw's 'data processing' cost actually work?

4 Posts
4 Users
0 Reactions
3 Views
(@cloud_ops_amy)
Estimable Member
Joined: 5 months ago
Posts: 128
Topic starter   [#12328]

Hey folks, I've been neck-deep in our observability bills lately, and I keep circling back to the same question that tripped me up initially: **Claw's "Data Processing" line item.**

We all know the basics: ingest, query, retention. But "Data Processing" feels like the mysterious middle child. I finally spent some time with their docs and our own Terraform configs to piece it together. Here's my attempt to break it down like I would for a junior engineer on my team.

Think of it as the "assembly line" cost *after* your data is accepted (ingest) but *before* it's stored (retention). It's the work Claw does to make your data usable. The main operations are:

* **Parsing & Structuring:** Taking your raw log line or span and extracting fields (like turning `status=404` into a field `http.status_code: 404`).
* **Enrichment:** Adding context, like looking up an IP address to add a `country` field.
* **Indexing:** Building the data structures that allow fast querying. This is a big one – high cardinality (lots of unique values) means more indexing work.

So, if you have a log line with 10 parsed fields, that's less processing than one with 50. If you add a custom unique request ID to every span, you're increasing cardinality and, therefore, processing effort.

Here's a real-world Terraform snippet from our config that directly impacts this cost. See the `processing_services` block? This is where you can control it.

```hcl
resource "claw_pipeline" "app_logs" {
name = "my-app-logs"
filter = "service:my-app"

parsing {
type = "json"
}

processing_services {
# Enrichment adds processing cost
geoip {
field = "client_ip"
}
# Each lookup adds a bit more
user_agent {
field = "user_agent"
}
# This is a custom processing step - it runs your own code on the data.
custom_processor {
name = "add_important_field"
source_code = file("${path.module}/processors/enrich.js")
}
}
}
```

The key takeaway? **Processing cost is driven by the *complexity* of your data pipeline, not just volume.** Turning off unnecessary enrichment, simplifying overly verbose logs, and being mindful of high-cardinality fields you parse can directly reduce this part of the bill.

Has anyone else done a deep dive here? I'm curious about the cost trade-off between, say, doing enrichment in Claw versus in our own application code before sending the data.

-- Amy


Cloud cost nerd. No, I don't use Reserved Instances.


   
Quote
(@karenm)
Trusted Member
Joined: 1 week ago
Posts: 48
 

You're on the right track, especially with indexing being a significant cost driver. A crucial nuance you've touched on is that processing cost is a function of *parsed field cardinality*, not just the raw byte count from ingest.

You mentioned a custom unique request ID - that's a prime example of a cardinality bomb. Every unique value creates another entry in the inverted indexes for that field. If you have a high-throughput service, that field alone can multiply your indexing costs. This is why structured logging with predictable, lower-cardinality fields is so critical for cost control.

The enrichment piece also has a hidden multiplier. If you're adding a geo-IP lookup for every log line with an IP, you're paying for the compute cycle of that lookup on every single event, not just once per IP. It's a per-event operation.


—KM


   
ReplyQuote
(@dianar)
Trusted Member
Joined: 7 days ago
Posts: 72
 

You've got the core. The devil is in the cardinality details.

> indexing cost is a function of *parsed field cardinality*
This is correct and the biggest bill shock. People think adding a field is free if it's already in the log line. It's not. If you parse `user_id` and have 1 million unique users, you're building an index for 1 million values. That's the processing cost.

Also, don't forget about sampling. If you sample before parsing/enrichment, you reduce processing cost. Sample after, and you're paying to process data you'll immediately throw away.


Five nines? Prove it.


   
ReplyQuote
(@data_diver_43)
Reputable Member
Joined: 2 months ago
Posts: 119
 

Oh, the indexing and cardinality point hits home. I was just trying to parse a `session_id` field from all our web logs last week and our estimated processing cost spiked. It made no sense until I realized we have like 500k unique sessions a day. So every single one of those becomes an index entry?

That feels like a hidden tax for bad logging design. If you log a high-cardinality field, you pay for it twice - once at processing and then again in storage for the index, right? Is there a rule of thumb for when a field is "too unique" to parse?



   
ReplyQuote