Metrics in Heroku free tier - heroku

I'm a student and I have deployed a Telegram bot on Heroku's free tier which used by some students of my university. It would be better if I could see my bot's metrics to improve it more. I know I can upgrade to a paid Dyno to view metrics but currently I'm not in a position to do a such thing so is there a way to view app's metrics in Heroku's free tier?

I couldn't find a way to view metrics in Heroku's free tier but found an alternative which is Render.com. At the time of writing this render.com allows users' to view metrics in their free tier.

Related

Dyno Hours for paid account and Frequency to call app endpoint

I am new to Heroku, created an app and deployed on heroku free account. And I want use endpoint of that app as publicly accessible endpoint. In heroku documentation it is mentioned heroku API can be called for 4500/hour. I am confused that will this limitation will be applicable to publicly accessible endpoint also?
and how much dyno hours do we get for the standard account/paid account ?
The Platform API is meant for developers who want to programmatically manage the applications (create/destroy Dynos, etc...). Here the max 4500 calls per hour applies.
There is no rate limit on the endpoints (or applications) you develop and expose to the users. The only limitation is the quota in case you use the Heroku Free tier.
Paid plans do not have restrictions: Dynos are always running but they do restart every 24hrs anyway (see Heroku Restart policy)

How to implement auto stop for iddle or inactive applications on Google cloud platform like Heroku does?

Classic approach on GCP is rent a linux host with static monthly payment. It doesn't matter if your application is not running or users aren't consuming it, you will always pay the static monthly payment. I think this is acceptable for production environments but for development and testing not.
This does not happen on Heroku :
If an app has a free web dyno, and that dyno receives no web traffic in a 30-minute period, it will sleep. In addition to the web dyno sleeping, the worker dyno (if present) will also sleep.
Free web dynos do not consume free dyno hours while sleeping.
Question
How stop or delete app on google (gae, cloud run, cloud build, containers) if does not receive web traffic?
If it is possible using just google tools it would be great:
https://cloud.google.com/products
Idea
Developing a basic router with nodejs which works as minimal balancer. If web traffic is not detected for some apps, an instruction to google cloud platform api could stop the app or container. This would also apply to other clouds.
Any help is appreciated.
Update
I cannot find any solution yet. I will try to add that feature here https://github.com/jrichardsz/http-operator or a basic shell script to detect incoming request to a specific port like How to print incoming http request on specific port
GCP is offering several serverless products (like you mentioned) and they offer a pricing where you are only charged for the resources you use (when requests are processed).
In Cloud Run you are only billed when an instance is handling a
request using the autoscaling to know more. See their pricing as well for a better overview.
For Google App Engine the app.yaml configuration file contains several settings you can use to adjust the trade-off between performance and resource load for a specific version of your app. You
also check this link how to manage the auto scaling settings.
You can also check this Google Cloud blog for other strategies in auto scaling your applications.
To answer the Comment below:
This video can help you better understand their differences to be able to see the appropriate service for your use case.
To clarify, there's 2 variations of cloud run, the first is managed by google and the other runs on gke. As long as your classic application (api app) is stateless, you should be able to deploy it as a container and take advantage of being charged based on only the resources you use. Snippets would fall under Cloud function where it only runs functions based on triggers.
You can choose to deploy your Cloud Run app on fully managed infrastructure ("serverless", pay per use, auto-scaling up rapidly and down to 0 depending on traffic) or on a Google Kubernetes Engine cluster.
It is also possible to run Docker containers in Serverless using App Engine (Flexible). App Engine is always fully managed, with auto-scaling. App Engine Flex auto-scales gradually and down to 1. App Engine Second Generation auto-scales up rapidly and down to 0.
In your current use case I would recommend to use Cloud Run, check its limitations first before getting started. See the official documentation here and on Cloud Run How-To Guides

how to de-host a laravel app from google cloud platform?

I cannot access my heidisql database because my google cloud trial version is over so I want to de-host my laravel app from google cloud platform and want to develop only on localhost.
When a free trial ends, you have 30 days to restore your resources by upgrading to a paid account; otherwise, the data and resources are not longer available anymore. You can take a look on the End of the free trial section of the Billing FAQs to know more about this matter.
What happens when my free trial ends?
After your trial ends, the resources you created during the trial are stopped, but can
be restored if you upgrade to a paid account within 30 days.
Within that 30-day period, you can also contact Google Billing Support
to export any data you stored in Google GCP services (other than on
Compute Engine). After 30 days, your data and resources are not
available, even if you upgrade.
Caution: Because there is no automated way to export data from Compute
Engine, you are responsible for exporting any data stored on Compute
Engine before your free trial ends.

LUIS is no longer free?

Luis is no longer free ?
I didn't open LUIS dashboard for 10-11 days. I'm seeing this now. They changed a lot of things there.
I must get azure key to get my LUIS app works ?
According to the pricing details, LUIS is not free. You are able to make 10K calls per month without charge, after which you are charged $0.75 per 1000 calls. Without more detail I am unsure of your second question. An azure key may be used to link LUIS to your bot.
Just to clarify LUIS has the same model as before, the new portal just highlights this information in a different way that's a little more confusing (we're working on it).
No Azure Account; free for 1000 requests/month using programmatic api key
With Azure, free for 10,000 requests per month (F0 plan in Azure)
With Azure, $.75/1000 calls
The thing that's new and confusing is the programmatic key with the low quota isn't connected to your app by default. We're going to fix that shortly.
Same happened to me. I had to create LUIS app in Azure and then provide key to LUIS application on LUIS.ai. But in LUIS app on azure, you can select the pricing tier as free if 10k calls per month suffice your application usage or choose paid plan according to need.
A start-key is default available with each LUIS model which can be used upto 10k calls per month
LUIS is free for Testing and Educational use. It is about 10000 conversations per month. However in production environment it has to be paid.
The important this is you can access LUIS feature via Azure or can independently integrate it into your application. The method of costing will depend on that as well.

Heroku: how does "log-runtime-metrics" collect statistics,under the hood?

I'm looking into Heroku performance monitoring.
In particular I found "log-runtime-metrics", and was wondering how it collects statistics under the hood? Is there some heroku API that exposes the state of each dyno (memory, cpu etc)? Or is it some Amazon API? Linux API?
Thanks
I've recently asked the same question to Heroku directly.
Check out http://log2viz.herokuapp.com/
You should see your App(s) available in in a list and can view real-time metrics there. This link isn't documented from the lab page https://devcenter.heroku.com/articles/log-runtime-metrics

Resources