* Escape metric tree elements * * Dots are not allowed, e.g. in host names * * @param str Metric part name * @return Escape string */
| 419 | * @return Escape string |
| 420 | */ |
| 421 | String GraphiteWriter::EscapeMetric(const String& str) |
| 422 | { |
| 423 | String result = str; |
| 424 | |
| 425 | //don't allow '.' in metric prefixes |
| 426 | boost::replace_all(result, " ", "_"); |
| 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 label |
nothing calls this directly
no outgoing calls
no test coverage detected