Skip to content

Firebase Performance doesn't accept spaces inside attribute names #10384

Open
@sp-jordi-vilalta

Description

@sp-jordi-vilalta

Description

According to the Firebase Performance documentation, these are the requirements for the name of the custom attributes:

Names for custom attributes must meet the following requirements: no leading or trailing whitespace, no leading underscore (_) character, and max length is 32 characters.

Trying to set an attribute with a space in its name (like my attribute) fails with these log messages:

[FirebasePerformance][I-PRF500004] Illegal characters used for attribute name, characters allowed are alphanumeric or underscore.
[FirebasePerformance][I-PRF500001] Failed to initialize because of a nil or zero length attribute name.

The code doesn't match the documentation:

  • it only allows alphanumeric characters and underscores
  • it allows underscores at the beginning of the name

Ideally I would like to be able to use spaces inside attribute names (as the documentation implies), since those names are user-visible in the dashboard and it would make them much more readable by non-technical people

Reproducing the issue

No response

Firebase SDK Version

9.4.0

Xcode Version

13.4.1

Installation Method

CocoaPods

Firebase Product(s)

Performance

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

No response

If using CocoaPods, the project's Podfile.lock

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions