Closed Bug 1676508 Opened 5 years ago Closed 5 years ago

JS categories should be snake_case not dotted.snake_case

Categories

(Toolkit :: Telemetry, task, P1)

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: chutten, Assigned: janerik)

References

Details

(Whiteboard: [telemetry:fog:m6])

Attachments

(1 file)

If you go to about:telemetry, open the console, and look at the categories offered by the global Glean, you'll see:

GleanImpl { "test_only.ipc": GleanCategory, test_only: GleanCategory, fog: GleanCategory, "fog.ipc": GleanCategory }

Using dotted.snake_case categories isn't the most ergonomic:

Glean["fog.ipc"].replay_failures.add(1);

Instead, the categories should be transformed to snake_case:

Glean.fog_ipc.replay_failures.add(1);

This'll be a little trickier than just filtering through snake_case in the template like our Rust outputter does since JS also has the string tables to think about.

Be sure to update the pytests.

Assignee: nobody → jrediger
Priority: P3 → P1
Pushed by jrediger@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cd2a8ee2c844 Use snake_case naming for categories in the JS API. r=chutten
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Blocks: 1680803
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: