Skip to content

Spaces aren't unsupported chars too (undocumented) #36300

@mems

Description

@mems

Documentation Page

Getting Started with Feature Flags

Issue Description

**Note**: The following special characters are not supported for Feature Flag Tracking: `.`, `:`, `+`, `-`, `=`, `&&`, `||`, `>`, `<`, `!`, `(`, `)`, `{`, `}`, `[`, `]`, `^`, `"`, ``, ``, `~`, `*`, `?`, `\`. Datadog recommends avoiding these characters when possible in your feature flag names. If you are required to use one of these characters, replace the character before sending the data to Datadog. For example:

The documentation specify some chars aren't supported in feature name. But it look like spaces ( ) are problematic too. And those chars (maybe not all) aren't supported on feature variant name too. When spaces are used, the feature flag tracking view show feature flags, but with no variants (top views is given, the rest is empty).

Image

Also, the provided snippet should reflect all chars sanitization and for name and variant name :

datadogRum.addFeatureFlagEvaluation(...[name, variant].map(v => v.replaceAll(/[.:+\-=><!(){}[\]^"~*?\\]|[&|]{2,2}|\s/g, "_")));

When implementing Datadog RUM client side, it take time and efforts to detect there is some chars that aren't supported and not documented. Especially when code snippets (custom and integration) doesn't sanitize chars.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions