Closed Bug 1591556 Opened 6 years ago Closed 6 years ago

Consider a Nice Rust API for the Glean SDK General Control Surface

Categories

(Data Platform and Tools :: Glean: SDK, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: chutten, Assigned: janerik)

References

Details

(Whiteboard: [telemetry:glean-rs:m15])

Attachments

(1 file)

The FOGotype is our first Rust customer, so we should try out a nice Rust API.

It could be that the existing General API is nice enough, but it could also be a good opportunity to try something new if there's an opportunity to be nicer.

"nice" here might mean things like

  • maybe not having to do singleton and threading things in-product
  • dealing with higher-level abstractions (objects, not handles)
  • friendly names
Blocks: 1591559

This might end up being a subset of the work needed for bug 1579146, depending on whether the control API in the prototype ends up being nice enough to keep. (or whether we burn it to the ground after the FOGotype is done)

See Also: → 1579146
Type: defect → enhancement
Priority: -- → P3
Whiteboard: [telemetry:glean-rs:m?]
Whiteboard: [telemetry:glean-rs:m?] → [telemetry:glean-rs:backlog]

Taking this bug as part of the API preview.

Assignee: nobody → jrediger
Priority: P3 → P1
Whiteboard: [telemetry:glean-rs:backlog] → [telemetry:glean-rs:m15]
Attached file GitHub Pull Request

The linked PR provides the API preview based on the FFI (that is: it works without any changes to the internals of Glean right now)

let cfg = Configuration {
    data_path,
    application_id: "org.mozilla.glean_core.example".into(),
    upload_enabled: true,
    max_events: None,
};
glean::initialize(cfg)?;
glean::register_ping_type(&PrototypePing);

if glean::send_ping_by_name("prototype") {
    log::info!("Successfully collected a prototype ping");
} else {
    log::info!("Prototype ping failed");
}

the preview landed and is about to land in m-c.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: