-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add Environment & Services support #403
Conversation
looks good, just some optimization suggestions. I checked it out locally and did a cursory test with legacy key + dataset-based rules, and new key + environment-based rules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My review was mostly limited to looking over the cache stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to do a couple of tidy up things before merging
Co-authored-by: Vera Reynolds <verareynolds@honeycomb.io>
Which problem is this PR solving?
Adds Environments & Services support to Refinery. This enables users to define environments in their rules configurations, much like a dataset, with custom sampler, sample rate, etc.
Environment names are defined in the rules configuration using the slugified version of the environment name, eg the Environment name "My Cool Company-Production" would become "my_cool_company_production".
Environment names are looked up in the Honeycomb API using the request's API key and then cached for subsequent requests. Environment names are cached for 1 hour.
TODO:
Future:
Review & add default environment to allow env. and dataset with same name in rules file
Add slugify logic so non-slugified names can be used in rules config, or update Honeycomb API to return un-slugified environment name
Closes Add support for environment & services #401
Short description of the changes
/1/auth
Honeycomb API endpoint and result is cached"1h"