r/snowflake • • 9h ago

How are you tracking what each Streamlit app in your account costs?

8 Upvotes

A while back in a thread here someone from Snowflake's App Runtime team said two things that stuck with me: apps run until you stop them, and you see usage per account, not per app. That was exactly our problem.

Disclosure: I work at Websson and we make StreamGen, so take this with that in mind.

Before building anything we just did it in SQL. Every query a Streamlit app runs has the app name in its query tag, so you can add up QUERY_ATTRIBUTION_HISTORY per app and get credits for the last 30 days. Same trick on QUERY_HISTORY gives you who actually opened each app. I put both queries up here, free, no sign-up: https://streamgen.io/guides/streamlit-app-cost/

Two things that SQL doesn't cover: warehouse idle time (no single query carries it) and App Runtime apps, which don't have the Streamlit tag.

We ended up turning it into a Native App that keeps that list every day and switches apps off out of hours or when nobody has opened them for a while. It got through Marketplace review this week (they sent our SQL examples back once because they were setup steps, not usage, fair enough): https://app.snowflake.com/marketplace/listing/GZSYZ1QF5MJ/streamgen-streamgen

Mostly curious how others handle this. Do you track cost per app at all, or just per warehouse?


r/snowflake • • 5m ago

Studying Snowflake and can't afford it

Thumbnail gallery
• Upvotes