TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

For RoR, see every method call, parameter and return value in production

122 pointsby puuushover 1 year ago

20 comments

jmhollaover 1 year ago
The calculator at the bottom of the page is doing some weird calculations. If you have no incidents a year, it still costs you money. So do incidents that take zero minutes to resolve. I took apart the code, and this seems to be the equation in use:<p><pre><code> (revenueTarget &#x2F; 8760) * resolutionTimeTarget * numIncidentsTarget * resolutionTimeTarget + numEmployeesTarget * avgEmployeeTargeRate </code></pre> This means revenue lost is correlated to the square of the lost time and the cost from employees is a static yearly cost.<p>There are a couple things wrong with it. The third * should be switched with a + and the last term need to be multiplied by the number of incidents.<p><pre><code> (revenueTarget &#x2F; 8760) * resolutionTimeTarget * numIncidentsTarget + resolutionTimeTarget * numEmployeesTarget * avgEmployeeTargeRate * numIncidentsTarget </code></pre> Which if anyone at Call Stacking is here, just means changing<p><pre><code> o = (n &#x2F; 8760) * e * t * e + i * r; </code></pre> to<p><pre><code> o = (n &#x2F; 8760) * e * t + e * i * r * t; </code></pre> or more succinctly<p><pre><code> o = t * e * (n &#x2F; 8760 + i * r) </code></pre> I&#x27;m assuming that&#x27;s minified, so<p><pre><code> numIncidentsTarget * resolutionTimeTarget * (revenueTarget &#x2F; 8760 + numEmployeesTarget * avgEmployeeRateTarget) </code></pre> Edit: With the correct math, the example is wildly different. It should be $37,277.81, not $87,991.23.
评论 #38391884 未加载
aantixover 1 year ago
If someone is up for writing a Call Stacking client for the language platform of their choice, please email me.<p>This would be your reference implementation.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;callstacking&#x2F;callstacking-rails">https:&#x2F;&#x2F;github.com&#x2F;callstacking&#x2F;callstacking-rails</a><p>I&#x27;m sure we could work out an arrangement.<p>jim@callstacking.com
aantixover 1 year ago
Here&#x27;s the client code for those that would like to inspect.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;callstacking&#x2F;callstacking-rails">https:&#x2F;&#x2F;github.com&#x2F;callstacking&#x2F;callstacking-rails</a>
stevepikeover 1 year ago
How does this work on the backend? Does it only trace method calls when an exception is thrown, or does it profile the call stack of every request?<p>Something I&#x27;ve been interested in is the performance impact of using <a href="https:&#x2F;&#x2F;docs.ruby-lang.org&#x2F;en&#x2F;3.2&#x2F;Coverage.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;docs.ruby-lang.org&#x2F;en&#x2F;3.2&#x2F;Coverage.html</a> to find unused code by profiling production. Particularly using that to figure out any gems that are never called in production. Seems like it could be made fast.
评论 #38385495 未加载
crystalnover 1 year ago
This is very cool and useful.<p>Also it is only necessary because of the lack of type enforcement which means no code can be relied and on and all code has to be constantly inspected for new bugs. Ugh.
评论 #38388451 未加载
评论 #38388366 未加载
评论 #38391151 未加载
theonethingover 1 year ago
This is advertised as a tool for production. Seems like it would be useful in development too.
评论 #38386212 未加载
ilamparithiover 1 year ago
Recently did something similar for a java project using AOP. Basically adding an annotation to each method and logging the parameters before the method call and return values after the method call. Whenever there is an exception, a mail will be sent with the stacktrace along with the entire request path(including method calls, parameters and return values). Extremely useful for debugging and to proactively fix the issues.
评论 #38390898 未加载
mediumsmartover 1 year ago
After signup I see a typo in :<p><i>The trace URL will also be outut via the Rails log.</i><p>And the local usage section is hard to read white text on light blue background in this safari browser.
评论 #38390017 未加载
progneover 1 year ago
This is a product where the SaaS doesn&#x27;t seem to add much that couldn&#x27;t be done as easily locally, other than monetizing the process.
评论 #38385124 未加载
评论 #38385830 未加载
maz1bover 1 year ago
Pretty cool. Not sure what pricing is, seems like it&#x27;s focused for enterprise.
block_daggerover 1 year ago
Typo on front page: &quot;What&#x27;s does an hour of downtime cost you?&quot;
ysavirover 1 year ago
Would this mean that any data I happened to have in memory during the flow now permanently lives in callstacking&#x27;s data stores? How does it handle all the data flowing through from a security perspective?
评论 #38385676 未加载
评论 #38385635 未加载
kayodelycaonover 1 year ago
Some of this already exists to some degree: <a href="https:&#x2F;&#x2F;github.com&#x2F;MiniProfiler&#x2F;rack-mini-profiler">https:&#x2F;&#x2F;github.com&#x2F;MiniProfiler&#x2F;rack-mini-profiler</a>
评论 #38385455 未加载
CPLXover 1 year ago
This seems ridiculously useful. What’s the catch?
评论 #38384927 未加载
评论 #38385158 未加载
评论 #38384896 未加载
mrinterwebover 1 year ago
How does this product handle sensitive data? I&#x27;m guessing this is not a HIPAA compliant service.
评论 #38387671 未加载
saaspirantover 1 year ago
Does similar tool exist for Django &#x2F; Python?
评论 #38388675 未加载
deliriousferretover 1 year ago
Does it work for background jobs as well?
n3stormover 1 year ago
I would love to see this for Laravel.
评论 #38389954 未加载
theonethingover 1 year ago
Does this handle multithreading?
berkesover 1 year ago
The irony is that the issues this helps with <i>could</i> be solved far before production. Compile time, or some local runtime even. Just not in Ruby.<p>Nearly all the issues this shows you quickly are issues that static typing would prevent compile time, or type-hints would show you in dev-time.<p>I&#x27;ve been doing fulltime Rails for 12+ years now, PHP before that, C before that. But always I developed side-gigs in Java, C# and other typed languages and now, finally fulltime over to Rust. They solve this.<p>Before production. You want this solved before production. Really.
评论 #38386011 未加载
评论 #38386273 未加载
评论 #38388000 未加载
评论 #38388167 未加载