Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling on specific stages only #16

Open
kbariotis opened this issue Feb 6, 2018 · 3 comments
Open

Enabling on specific stages only #16

kbariotis opened this issue Feb 6, 2018 · 3 comments

Comments

@kbariotis
Copy link

It would be handy if we could pass a stage variable into this plugin to be enabled only at that stage. Currently, I have to reference an external file in order to check the current stage and return true/false for the tracing property.

@alex-murashkin
Copy link
Owner

Hi @kbariotis

Could you point me to any examples of how this is done in other plugins? If I get a chance to implement this, wondering what good practice are.

@kbariotis
Copy link
Author

kbariotis commented Feb 16, 2018

Hmm no not really, I don't have any concrete examples but I have implement such a feature on a plugin we use internally in my current company. You are passing an array of strings and the plugin is being enabled only if the current stage is inside that array. So for example, I want to enable tracing only on DEVELOPMENT and STAGING environments

@murtyjones
Copy link

@alex-murashkin serverless-plugin-warmup has a nice pattern for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants