Saving Three Months of Latency with a Single OpenTelemetry Trace
checklyhq.com
checklyhq.com
Here's the PR that got merged earlier in the year: https://github.com/open-telemetry/opentelemetry-js-contrib/p...
The env var config is `OTEL_NODE_ENABLED_INSTRUMENTATIONS`
Anyways, love Opentelemetry success stories. Been working hard on it at my current company and yielding fruits already :)
instrumentations: [getNodeAutoInstrumentations({
'@opentelemetry/instrumentation-fs': {
enabled: false,
},
'@opentelemetry/instrumentation-net': {
enabled: false,
},
'@opentelemetry/instrumentation-dns': {
enabled: false,
},That only makes sense if the instrumentation overhead itself is significant. But, for a efficient recording implementation that should only really start being a problem when your average span is ~1 us.
This is all noise when you are trying to debug more common issues than your FS being too slow.
+ also storage cost. Most vendors charge by Mb stored or span recorded.
For that matter, why are a few hundred spans a problem? Are the visualizers that poor? I usually use function tracing where hundreds of millions to billions of spans per second are the norm and there is no difficulty managing or understanding those.
I do not do cloud or web development, so this is just totally alien. I generate multi-gigabyte logs with billions of events for just seconds of execution and get to slice them however I want when doing performance analysis. The inability to even process your own logs seems crazy.
So you moved from a mature but expensive storage solution to a younger currently subsidized storage solution? What happens when R2 jacks up pricing?
Enter a new product feature we launched (Visual Regression Testing) which requires us to fetch an image from storage on every "run" we do. These could be every 10sec. This is where R2 shines. No egress cost for us. It's been rock solid and saved us about 60x compared to AWS. Still, we run most of our infra on AWS.
Interesting, do you have a source on the subsidized nature of R2?
My concern is that as a newer product (R2 in 2022 [1] compared to S3 2006 [2]) R2 has deliberately priced itself to compete with egress pricing of S3 in order to gain market share and developer mindshare. I am not confident Cloudflare will maintain this competitive pricing indefinitely as I expect it to follow well established industry trends of jacking up prices once a walled garden has been sufficiently establed.
Further its my opinion cloud costs have grown at an absurd level as engineers and executives made poor and frankly lazy technology choices for the last decade.
Ultimately I like cloudflare a lot but I think we need more discipline and lower operational overhead if we want infrastructure development to remain practical to individuals and small businesses versus mega-corps. Cloudflare with its free pricing tiers is often a default choice for these organizational sizes but it should not be viewed as a panacea and carries tradeoffs as with everything in life.
[1] https://www.cloudflare.com/press-releases/2022/cloudflare-ma...
[2] https://hidekazu-konishi.com/entry/aws_history_and_timeline_...
Does this translate to any tangible savings? I'm not sure what the checkly backend looks like but if tasks are running on a cluster of hosts vs invoked per-task it seems hard to realize savings. Even per-task, 40 ms can only be realized on a service like Lambda—ECS minimum billing unit is 1 second afaik.
edit: Do you have an affiliation with the blog? I ask because you have submitted several articles from checkly in the past.
It seems tiny, but in aggregate this will have an impact on our COGS. You are correct that if we had a fixed fleet of instances, the impact would have been not super interesting.
But still, for a couple of hours spent, this saves us quite some $1Ks per year.
If we think about the business impact, we don't usually think of compute expenditure per-day, so you might reasonably say, the fix saved 90 years of annual compute. Looks better in your promotion packet, too.
This one is also interesting; written in 2012, it claims that Amazon could lose 1b+ from a 1 sec slowdown: https://www.fastcompany.com/1825005/how-one-second-could-cos.... I imagine people are even less tolerant of slow pages today.
Fixing website performance can be one of the cheapest ways to increase conversion because it's hard to figure out what else moves the needle.
Over-optimizing is not going to help you at all but if you ignore it eventually it will all seize up.
You have to keep that stuff in check.
(Long time happy Checkly user here, the service is fantastic)
I, for example, like to dive more on insights like the relative savings vs absolut to learn the approaches other engineers take! It's all about metrics we should take care.
(I'll put this service on my list to try someday, looks like fantastic indeed)