-
Notifications
You must be signed in to change notification settings - Fork 527
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 scope parameter to /api/search/tags #2282
Conversation
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.
Thank you for adding documentation! Changes look good. One minor suggestion for a missing comma.
Did you consider a new version of the endpoint where you return a list of available scopes for each tag? For example:
The main advantage is that the client only needs to make one request to get all the information about the available tags and what their scopes are. With the solution from this PR a client would always have to perform three requests to get the full picture, one for each scope. |
I did, but I liked not revving the endpoint b/c then I had to write less code :). If I did create a v2 it would likely return something like this though:
would you all prefer this? |
Yes, that also works! Is it possible for a tag to be in more than one scope? |
Yup, but this would likely occur rarely. |
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
fe2e80d
to
b9395ab
Compare
Signed-off-by: Joe Elliott <number101010@gmail.com>
@adrapereira added a v2 endpoint. Example:
|
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.
Doc addition looks good. Thank you.
Signed-off-by: Joe Elliott <number101010@gmail.com>
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.
Looks good to me, just a couple comments.
Signed-off-by: Joe Elliott <number101010@gmail.com>
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.
Nice work. Looks good to me.
What this PR does:
This PR
?scope
parameter to the/api/search/tags
endpoint. This parameter can currently take 3 values (resource, span, and intrinsic) as well as no value which defaults to the old behavior of returning both span and resource tags./api/v2/search/tags
that returns all tags organized by scope.Note that this PR is blocked by #2244. Marking this as draft until that is merged.Which issue(s) this PR fixes:
Fixes #2233
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]