Finding region and/or machine id from within an app

Is there a way via api or environment variables for an app to know which region it is in? Or even the machine id so that region can be determined via the api? I would like to be able to get the region/id from within the app for metrics purposes.

Yes! There are FLY_REGION and FLY_MACHINE_ID.

1 Like

awesome, thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.