Closed Bug 1514336 Opened 6 years ago Closed 4 years ago

Separate, or disable, telemetry recorded during UI/integration testing on release builds

Categories

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

enhancement
Points:
3

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mcomella, Unassigned)

References

Details

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

When testing release candidate builds, applications ideally want to run UI/integration tests on the exact build they'll be releasing. Additionally, some projects test their release configuration every time a PR opens or code merges to master. However, this creates a problem: telemetry logged during testing on release builds will be added to the release telemetry dashboard, injecting unrealistic data. If this happens often enough (e.g. we run the release tests on multiple devices of various configurations multiple times a day and each time there's a new telemetry ID), our data will be skewed.

Ideally, Glean would provide an easy way to configure it to disable telemetry under these conditions and document this as recommended behavior. Presumably, we wouldn't want to modify the builds so this would likely be a start-up flag. The start-up flag should probably persist beyond this application's lifecycle (i.e. if the application is restarted during the test, we wouldn't want to have telemetry be re-enabled).
We see two possible approaches here:
1) Provide a way to (persistently) disable all Telemetry uploads for an apps installation.
2) Provide a way to (persistently) set a "dummy telemetry endpoint" for an apps installation.

I assume tests depending on external services is probably not a good idea anyway.
Option 1) seems like the most straight-forward version.
Whiteboard: [telemetry:mobilesdk:m?]
(In reply to Georg Fritzsche [:gfritzsche] from comment #1)
> Option 1) seems like the most straight-forward version.

Does that sound reasonable? Should we proceed with that option?

For timing, we should solve this in Q1.
Flags: needinfo?(sdaswani)
Flags: needinfo?(michael.l.comella)
(In reply to Georg Fritzsche [:gfritzsche] from comment #1)
> We see two possible approaches here:
> 1) Provide a way to (persistently) disable all Telemetry uploads for an apps
> installation.

This is orthogonal, but we're also adding a way to dump pings to logcat in bug 1513563
1) seems fine to me. Would this mean we set a flag in the SDK (that we can then expose as a command line startup option)?
Flags: needinfo?(sdaswani)
Yes, that's probably a flag in the SDK that we'd expose in some way that's convenient for the teams to use.

If you have suggestions on which mechanism works well, please leave them here.
Otherwise we'll reach out when we're picking up this bug.
(In reply to Georg Fritzsche [:gfritzsche] from comment #1)
> 2) Provide a way to (persistently) set a "dummy telemetry endpoint" for an
> apps installation.

I see a few use cases related to 2:
- Automated tests that upload to a non-production server (hosted locally?) and the server can verify the received pings. That being said, these are fragile and may never get written
- Allowing QA to upload to production server and separate out their pings for manual verification (like bug 1507921)

If these are addressable with 1) then 1) sounds good to me!
Flags: needinfo?(michael.l.comella)
(In reply to Michael Comella (:mcomella) [needinfo or I won't see it] from comment #6)
> (In reply to Georg Fritzsche [:gfritzsche] from comment #1)
> > 2) Provide a way to (persistently) set a "dummy telemetry endpoint" for an
> > apps installation.
> 
> I see a few use cases related to 2:
> - Automated tests that upload to a non-production server (hosted locally?)
> and the server can verify the received pings. That being said, these are
> fragile and may never get written
> - Allowing QA to upload to production server and separate out their pings
> for manual verification (like bug 1507921)
> 
> If these are addressable with 1) then 1) sounds good to me!

Yes, we can address those use cases separately of 1). I think these are better addressed separately as well.
Points: --- → 3
Priority: -- → P3
Whiteboard: [telemetry:mobilesdk:m?] → [telemetry:mobilesdk:m4]
Whiteboard: [telemetry:mobilesdk:m4] → [telemetry:mobilesdk:m5]
Whiteboard: [telemetry:mobilesdk:m5] → [telemetry:mobilesdk:m8]
Whiteboard: [telemetry:mobilesdk:m8] → [telemetry:mobilesdk:m?]
Whiteboard: [telemetry:mobilesdk:m?] → [telemetry:mobilesdk:m8]
Whiteboard: [telemetry:mobilesdk:m8] → [telemetry:mobilesdk:m9]
Component: Telemetry → Glean: SDK
Product: Toolkit → Data Platform and Tools
Whiteboard: [telemetry:mobilesdk:m9] → [telemetry:glean-rs:m?]
Whiteboard: [telemetry:glean-rs:m?] → [telemetry:glean-rs:m9]
Whiteboard: [telemetry:glean-rs:m9] → [telemetry:glean-rs:m10]

We're deprioritizing this bug on Fenix FYI.

(In reply to Chenxia Liu [:liuche] from comment #8)

We're deprioritizing this bug on Fenix FYI.

Please note that most of the use-cases in this bug are now addressed:

  • the GleanTestRule (for unit and integration tests) allows for specifying a custom endpoint for tests;
  • QA can inspect pings using the glean debug ping viewer;
Whiteboard: [telemetry:glean-rs:m10] → [telemetry:glean-rs:m11]

Closing this bug as WORKSFORME: the Glean SDK offers an API to disable metric upload. Fenix can provide a startup parameter that ends up calling that API to disable upload.

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