News for hackers. Stuff that matters.
Re:Launch HN: OpenMeter (YC W23) – Real-Time, Open Source Us... by hekike on Thursday June 22, 2023 @11:26AM (#36433615)
That's a great insight, thanks for sharing. Would it be the ideal solution code / config driven, something like: SELECT user, SUM(runtime) FROM usage => invoice_template(Z) Wdyt?

Btw how do you handle idempotency with time series? I think replays and least-once delivery in distributed systems can be challenging around usage collection if you don't have a key to deduplicate by.

Re:Launch HN: OpenMeter (YC W23) – Real-Time, Open Source Us... by mrkurt on Thursday June 22, 2023 @11:38AM (#36433828)
I may not be interpreting your question right, but most of our metrics are counters. It doesn't matter how often they get scraped, or if they get scraped twice, because we only care about the increase. Almost everything we track is aggregated with `increase()`: https://prometheus.io/docs/prometheus/latest/querying/functi...

I'm fond of SQL, but I'd be ok with some other way to express "aggregate my usage into an invoice".

Re:Launch HN: OpenMeter (YC W23) – Real-Time, Open Source Us... by andrastoth on Thursday June 22, 2023 @11:45AM (#36433961)
Have you encountered any challenges related to metric aggregation? To the best of my understanding, such issues often stem from inherent inaccuracies due to sampling (https://www.youtube.com/watch?v=67Ulrq6DxwA&t=175s). I'm curious if using a smaller window for metric aggregation and routing these events to a stream aggregator could provide a possible solution.
Re:Launch HN: OpenMeter (YC W23) – Real-Time, Open Source Us... by mrkurt on Thursday June 22, 2023 @01:17PM (#36435507)
Not really, but we might've just implicitly designed around it.

Continuously aggregating smaller windows and sending them off is roughly how we send usage to Stripe right now (which, let's be clear, is not working for us AT ALL). We've resigned ourselves to having to do the same thing if we want to use a billing SaaS, but I don't love it.

Re:Launch HN: OpenMeter (YC W23) – Real-Time, Open Source Us... by jmacd on Friday June 23, 2023 @05:41AM (#36444685)
We’ve built https://GitHub.com/tierrun/tier with a local sidecar that can talk directly to stripe to help simplify situations like this.

A pure SaaS model for billing doesn’t do much more for you at then end of the day other than to apply billing ratings and generate an invoice (which Stripe can and is doing for you already).

I’d love to learn more about what you’d like to do with Stripe and how you are handling entitlements, plan versioning, etc

Re:Launch HN: OpenMeter (YC W23) – Real-Time, Open Source Us... by hekike on Thursday July 06, 2023 @10:37AM (#36616562)
In the meantime, we looked more into metering and metrics and shared some thoughts here: Usage Data: Auditable or Operational https://news.ycombinator.com/item?id=36616364