-
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 endpoints to help debug refinery rules #500
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kentquirk
changed the title
Kent.debug config
Add endpoints to help debug refinery rules
Sep 5, 2022
MikeGoldsmith
approved these changes
Sep 6, 2022
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 - suggested small fix to return early when handling bad requests
MikeGoldsmith
added
type: enhancement
New feature or request
version: bump minor
A PR that adds behavior, but is backwards-compatible.
labels
Sep 6, 2022
kentquirk
added a commit
that referenced
this pull request
Sep 6, 2022
## Which problem is this PR solving? - Adds a local query token to allow the changes in #500 to be protected by a locally-defined token in a header. ## Short description of the changes - Before #500, there was a single /debug/trace endpoint, but there is also an optional /debug endpoint intended for use with a debugger and profiler. So I renamed /debug to /query for the trace and config. - I added to these new /query endpoints a local configuration value `QueryAuthToken` that can be specified in the config file or in the environment. If specified, the `X-Honeycomb-Refinery-Query` header must be specified on a query request. - If the QueryAuthToken is not specified in the configuration, the /query endpoints are not accessible. Note that because the `/debug/trace` request has been renamed and is now protected by a token, this is technically a breaking change (although `/debug/trace` isn't intended for regular operation and wasn't documented outside of the source code).
ghost
pushed a commit
to opsramp/tracing-proxy
that referenced
this pull request
Jul 5, 2024
## Which problem is this PR solving? There have been multiple reports of people not realizing their configs were not parsing the way they were intended. This adds two endpoints: - `/debug/allrules/$FORMAT` will retrieve the entire rules configuration - `/debug/rules/$FORMAT/$DATASET` will retrieve the rule set that refinery will use for the specified dataset. It comes back as a map of the sampler type to its rule set. ## Short description of the changes - Add the endpoints - Add a feature to config to return the full rule set - Extend existing config feature to return the sampler name along with its rules struct - Add/expand tests for it all
ghost
pushed a commit
to opsramp/tracing-proxy
that referenced
this pull request
Jul 5, 2024
## Which problem is this PR solving? - Adds a local query token to allow the changes in honeycombio#500 to be protected by a locally-defined token in a header. ## Short description of the changes - Before honeycombio#500, there was a single /debug/trace endpoint, but there is also an optional /debug endpoint intended for use with a debugger and profiler. So I renamed /debug to /query for the trace and config. - I added to these new /query endpoints a local configuration value `QueryAuthToken` that can be specified in the config file or in the environment. If specified, the `X-Honeycomb-Refinery-Query` header must be specified on a query request. - If the QueryAuthToken is not specified in the configuration, the /query endpoints are not accessible. Note that because the `/debug/trace` request has been renamed and is now protected by a token, this is technically a breaking change (although `/debug/trace` isn't intended for regular operation and wasn't documented outside of the source code).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
type: enhancement
New feature or request
version: bump minor
A PR that adds behavior, but is backwards-compatible.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
There have been multiple reports of people not realizing their configs were not parsing the way they were intended. This adds two endpoints:
/debug/allrules/$FORMAT
will retrieve the entire rules configuration/debug/rules/$FORMAT/$DATASET
will retrieve the rule set that refinery will use for the specified dataset. It comes back as a map of the sampler type to its rule set.Short description of the changes