* Escape tags for OpenTSDB * http://opentsdb.net/docs/build/html/user_guide/query/timeseries.html#precisions-on-metrics-and-tags * * @param str Tag name * @return Escaped tag */
| 421 | * @return Escaped tag |
| 422 | */ |
| 423 | String OpenTsdbWriter::EscapeTag(const String& str) |
| 424 | { |
| 425 | String result = str; |
| 426 | |
| 427 | boost::replace_all(result, " ", "_"); |
| 428 | boost::replace_all(result, "\\", "_"); |
| 429 | boost::replace_all(result, ":", "_"); |
| 430 | |
| 431 | return result; |
| 432 | } |
| 433 | |
| 434 | /** |
| 435 | * Escape metric name for OpenTSDB |
nothing calls this directly
no outgoing calls
no test coverage detected