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

Disconnect between input and query schema when transforms #1

Open
awestendorf opened this issue Apr 9, 2013 · 0 comments
Open

Disconnect between input and query schema when transforms #1

awestendorf opened this issue Apr 9, 2013 · 0 comments

Comments

@awestendorf
Copy link
Member

Transforms are very powerful and allow for turning unique stat names into histograms. For example:

'auth_counts' : {
  'type': 'histogram',
  'match' : '^stats_counts\.auth\.[a-zA-Z0-9]+$',
  'transform' : lambda k,v: ('.'.join(k.split('.')[:-1]), k.split('.')[-1]) if int(v) else (None,None),
  ...
}

Turns stats of the form:
stats_counts.auth.abcd0987 1 1234567890

Into a histogram of {"abcd0987":+1} under the key stats_counts.auth. The problem is that you'd query that stat as stats_counts.auth which does not match the regular expression. One could add a second regex to match on that, but that would be capture incorrect data on the input side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant