Meteor deploy to Galaxy with Optics?

Hi, I’m just getting started performance benchmarking my Meteor app, which is hosted with Galaxy. I’ve got Optics working when I meteor run locally in dev mode, but when I deploy to Galaxy by replacing run with deploy (keeping more or less the same environment variables), I’m not able to see Optics past the “awaiting connection” phase. Is is even possible to run Optics on a production app?

(:wave:)

Hmm… It is definitely possible to run Optics on a production application (in fact, highly recommended and we do this ourselves!).

You’re using optics-agent npm? And, if so, are you using the OPTICS_API_KEY environment variable or the OpticsAgent.configureAgent approach?

If you’re using the environment variable, are you passing the --settings your_file.json to meteor deploy and is your_file.json formatted as:

{"galaxy.meteor.com": {"env": { "OPTICS_API_KEY": "service:xyz:zzzzzzzzzz-yyyy-xxxxxxx" }}

Ultimately, it may be easier to file an issue with support who would be able to look directly at your accounts, but I hope this helps. :wink:

Rad, thanks for the quick reply! I set OPTICS_API_KEY in my shell (which worked on localhost) but not in the settings file used to deploy. I just redeployed with it there and it looks like Optics just kicked in!
I’ll submit a PR to add that to the docs at http://galaxy-guide.meteor.com/environment-variables.html :wink:
cheers

1 Like

Yeah, for security reasons, the only environment variables passed through to the actual deployment are those specified in the --settings JSON file.

You can always view specifically which environment variables are active in the “Settings” tab of the Galaxy deployment on galaxy.meteor.com. :slight_smile:

Makes total sense. Thanks again!