gquintana / metrics-sql

Yammer|Codahale|Dropwizard Metrics for SQL and JDBC
Apache License 2.0
26 stars 9 forks source link

sqls shoud have sanatized names #1

Open davidkarlsen opened 9 years ago

davidkarlsen commented 9 years ago

sql contains . (tablename.colname) - this does not play well with metrics/graphite where . is used to separate/name metrics - hence the namingstrategy should replace dots with something else like dot

See https://github.com/dropwizard/metrics/issues/637 for related issue.

davidkarlsen commented 9 years ago

WDYT?

gquintana commented 7 years ago

You can do that implementing your own naming strategy. We could integrate it in Metrics SQL library if you do PR.

gquintana commented 7 years ago

The more I think about it, the more I think removing unwanted chars from metric names should be done in the Graphite reporter.

Though I added a "strict" metric naming strategy which remove most special chars from SQL query id.

davidkarlsen commented 7 years ago

We've stopped using graphite and now use prometheus - at any rate we only poll for datasource level metrics (e.g. not down at the query level) - so not so much of a need for me any longer - but are you still interested in a PR for the NamingStrategy or have you already fixed it - https://github.com/gquintana/metrics-sql/blob/master/src/main/java/com/github/gquintana/metrics/sql/StrictMetricNamingStrategy.java seems to cut it?

gquintana commented 7 years ago

Yes a I tried to fix it. Your feedback and PRs are welcome.