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

Crons: Support user defined org-unique slug per monitor #45166

Closed
7 tasks done
Tracked by #42881
evanpurkhiser opened this issue Feb 27, 2023 · 6 comments
Closed
7 tasks done
Tracked by #42881

Crons: Support user defined org-unique slug per monitor #45166

evanpurkhiser opened this issue Feb 27, 2023 · 6 comments
Assignees

Comments

@evanpurkhiser
Copy link
Member

evanpurkhiser commented Feb 27, 2023

To support #42881 we need to allow users to specify a unique slug for their monitor. The same way they can specify a slug for their org or project. This will allow for creation of monitors (via upsert) without the client needing to maintain a mapping of GUIDs.

We will be removing GUIDs from monitors and only using slugs. Existing GUIDs will be migrated to become slugs. This means all monitor lookups will need to have organization context now.

URLs will have two flavors due to Hybrid Cloud

https://sentry.io/api/0/organizations/:org_slug/monitor/:monitor_slug/
https://org_slug.sentry.io/api/0/monitor/:monitor_slug/

Checkins however, will still need to support the orgless routes

https://sentry.io/api/0/monitors/:monitor_slug/checkin/:checkin_uuid/
https://org_slug.sentry.io/api/0/monitors/:monitor_slug/checkin/:checkin_uuid/

Tasks

Preview Give feedback
  1. Scope: Backend
  2. Scope: Backend
  3. Scope: Backend
  4. Scope: Backend
  5. Scope: Backend
  6. Scope: Backend
  7. Scope: Backend

Open questions about slugs

  • Should we allow monitor slugs to be edited (I assume yes) but we should indicate that it will break any usages they have using that slug at the moment

Followups

@getsantry
Copy link
Contributor

getsantry bot commented Feb 27, 2023

Routing to @getsentry/crons for triage, due by Wednesday, March 1st at 2:26 pm (sfo). ⏲️

@dcramer
Copy link
Member

dcramer commented Feb 28, 2023

If we're going to talk about removing GUIDs lets talk about that as a separate thing. To support slugs we dont need to remove GUIDs, and they may still be needed for a variety of reasons. You can still use the same URLs if you want and just make it so a monitor slug or a GUID is a usable key.

I would allow slugs to be editable - its up to the user if they want to break their system, but if they name a slug incorrectly and want to fix it (e.g. before its even used), why stop them?

@gaprl gaprl moved this to In Progress in Crons Roadmap Feb 28, 2023
@evanpurkhiser
Copy link
Member Author

We can keep around GUIDs, but that does add some complexity that is worth being aware of.

We can dual lookup on the slug and GUID, this means we'll try and parse the UUID first, and if that fails we'll query on the slug. In the case of the checkin endpoint which has a orgless route we'll only allow the GUID to be used.

We should decide if we want to expose slugs in the UI at all in this case, we don't need them yet so we can get away with keeping all of that functionality hidden for now.

We can definitely follow up with removing GUIDs after the fact

@evanpurkhiser
Copy link
Member Author

evanpurkhiser commented Mar 2, 2023

We should decide if we want to expose slugs in the UI at all in this case, we don't need them yet so we can get away with keeping all of that functionality hidden for now.

For now I am leaving slugs out of the UI, but it will be part of the API. They default to whatever the GUID is set to.

@evanpurkhiser
Copy link
Member Author

@gaprl Let's spin out the two [FUTURE WORK] tasks into a new ticket that we'll track for improving the slugs / names / GUIDs UX in the UI

@evanpurkhiser evanpurkhiser moved this from In Progress to Beta Availability in Crons Roadmap Mar 3, 2023
@evanpurkhiser
Copy link
Member Author

This is complete.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2023
@evanpurkhiser evanpurkhiser self-assigned this Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Beta Availability
Development

No branches or pull requests

2 participants