-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
remove leading ~ from name when indexing metric names #2458
Conversation
f36cfc7
to
8b12425
Compare
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.
This doesn't match the actual implementation in the TaggedSeries class, which will reject tagged series with ~ in the value.
We want to keep TaggedSeries the same between graphite-web and carbon (ideally we'd break it out into a separate graphite-util package but if we're going to move toward a go implementation of carbon it doesn't make sense to put in the work required to do that vs just keeping the class in sync across the repos). If you can sync them up that would be great, I'd also suggest that the sanitize function should use https://docs.python.org/2/library/string.html#string.lstrip vs replace. |
Codecov Report
@@ Coverage Diff @@
## master #2458 +/- ##
==========================================
- Coverage 80.05% 79.13% -0.92%
==========================================
Files 85 85
Lines 8948 9150 +202
Branches 1914 1948 +34
==========================================
+ Hits 7163 7241 +78
- Misses 1511 1630 +119
- Partials 274 279 +5
Continue to review full report at Codecov.
|
I'm not sure which sanitize function you mean, the one in the carbon project, right? If so, then I've already updated that to use |
I didn't realize that the |
I've pushed a few more tests, so the test coverage report is happy |
Rebased onto the latest master |
Co-Authored-By: Dan Cech <dan@aussiedan.com>
* sanitize names when using them as tag value related: graphite-project/graphite-web#2458 * implement updated rules * copy tag and value validation from graphite * better error messages * add tests for tag validation * Better exception messages Co-Authored-By: Dan Cech <dan@aussiedan.com> Co-authored-by: Dan Cech <dan@aussiedan.com>
…ct#2458) * remove ~ from name when indexing metric names * better wording * update tag validation so it enforces the new rules as documented * add sanitize for metric name and handle exceptions * better error messages * adding tests for tag validation * Better exception messages Co-Authored-By: Dan Cech <dan@aussiedan.com> Co-authored-by: Dan Cech <dan@aussiedan.com>
* sanitize names when using them as tag value related: graphite-project/graphite-web#2458 * implement updated rules * copy tag and value validation from graphite * better error messages * add tests for tag validation * Better exception messages Co-Authored-By: Dan Cech <dan@aussiedan.com> Co-authored-by: Dan Cech <dan@aussiedan.com>
* sanitize names when using them as tag value related: graphite-project/graphite-web#2458 * implement updated rules * copy tag and value validation from graphite * better error messages * add tests for tag validation * Better exception messages Co-Authored-By: Dan Cech <dan@aussiedan.com> Co-authored-by: Dan Cech <dan@aussiedan.com>
* sanitize names when using them as tag value related: graphite-project/graphite-web#2458 * implement updated rules * copy tag and value validation from graphite * better error messages * add tests for tag validation * Better exception messages Co-Authored-By: Dan Cech <dan@aussiedan.com> Co-authored-by: Dan Cech <dan@aussiedan.com>
No description provided.