Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Deal with dev vs staging vs prod environments #114

Open
mikenikles opened this issue Aug 16, 2020 · 0 comments
Open

Deal with dev vs staging vs prod environments #114

mikenikles opened this issue Aug 16, 2020 · 0 comments
Labels

Comments

@mikenikles
Copy link
Owner

mikenikles commented Aug 16, 2020

Users who have the ya.js script installed have to make sure it doesn't get executed in non-prod environments. Figure out a way to make this as seamless as possible.

Some thoughts:

  • Use the domain attribute on the script tag to specify.
    • Pros:
      • Simple implementation on my side
    • Cons:
      • It still requires users to set that depending on their environment
      • The developer experience is not as smooth as I'd prefer
  • Set the domain attribute to the prod value always and use the HTTP request info (e.g. origin) in the events-api. Display all origins for a given domain attribute and let the user define environments. If origin and domain attribute match, we know it's production traffic. Flag every other origin as test.
    • Pros:
      • The simplest developer experience
    • Cons
      • Requires a setting in the UI and educating the users to configure environments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant