Skip to content

How to escape commas, colons, and equals in tag names and values? #17

Open
@mcandre

Description

@mcandre

How should statsd users escape tag elements that contain characters used for tag syntax?

Common strings that users may wish to include in tag names and/or values:

  • localhost:80 (network address colon conflicts with InfluxDB and Datadog formats)
  • 192.168.1.2,192.168.1.3,192.168.1.4 (comma conflicts with comma tag separator)
  • YQ== (base64 trailing equals conflicts with InfluxDB format)
  • #general (IRC channel name sharp conflicts with Datadog format)
  • cat README.txt | less (pipe in command conflicts with statsd base format)

How should these characters be escaped? Should statsd users try to use the C escape convention, like localhost\:80 and YQ\=\=?

Could alexcesaro/statsd provide standard functions for escaping and unescaping strings that contain these special characters?

Could the statsd Go API automatically escape tag names and values on the user's behalf?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions