Get current snap channel from inside the app

my question is how to check if the app is being executed from the beta channel or stable channel…

is there a environment variable set by snapd or something else?

Not quite the same, but I include the SNAP_REVISION environment variable in my application’s feedback form since the actual channel doesn’t matter as much as which revision is used.