Closed Bug 1647348 Opened 6 years ago Closed 3 years ago

Implement a `shutdown` API for Glean

Categories

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

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Dexter, Unassigned)

References

Details

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

On mobile platform, the Glean SDK knows it could be killed at any time. Moreover, on mobile, there's no reliable way to know when the product is going to close.

On non-mobile platform the story is a bit different: most of the times products end cleanly or are able to at least clearly tell when is shutdown happening.

We should leverage this difference and implement a "shutdown" API. The Python, C# and Rust language bindings could call this for example to gracefully interrupt ping upload.

If you'll forgive me for documenting what you might already know about shutdown in nonmobile, I wish to raise some cautions about expecting that this will ever be called or promising that specific actions will or won't be taken. If this can be maintained at the level of just a hint, that could be better from a maintenance standpoint.

Best of course would be to remain blissfully ignorant of shutdown's rat's nest of interlocking dependencies and furious nonsense.

(In reply to Chris H-C :chutten from comment #1)

If you'll forgive me for documenting what you might already know about shutdown in nonmobile, I wish to raise some cautions about expecting that this will ever be called or promising that specific actions will or won't be taken. If this can be maintained at the level of just a hint, that could be better from a maintenance standpoint.

That's fair, thanks for doing that. I believe we should really incorporate all of our knowledge coming from Firefox Desktop when implementing this. You'll definitely be in the loop, as I believe this warrants a light design proposal.

Best of course would be to remain blissfully ignorant of shutdown's rat's nest of interlocking dependencies and furious nonsense.

:-D

Priority: P3 → P2
Whiteboard: [telemetry:glean-rs:m?]
See Also: → 1651340
See Also: → 1672956

Falsehoods Programmers Believe About Shutdown:

  • It happens after init.

(To Be Continued.)

See Also: → 1679426

Dropping priority for now. We have such an API in the RLB. It's not clear what else this API needs to do across all implementations and thus deserves to be in glean-core.

Priority: P2 → P3
Whiteboard: [telemetry:glean-rs:backlog]
Priority: P3 → P4

Has it been 3 years? Wow.
Anyway, we have that API, even though maybe not exposed everywhere. Closing this.

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