Closed Bug 1799509 Opened 3 years ago Closed 3 years ago

Missing columns with "." in names showing up

Categories

(Data Platform and Tools :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ascholtz, Assigned: janerik)

Details

(Whiteboard: [dataquality])

Attachments

(4 files)

During the health check we noticed missing columns with "." in their field names showing up for multiple Glean apps. For example: metrics.timespan.extensions.startup_cache_load_time.time_unit or metrics.memory_distribution.glean.upload.pending_pings_directory_size.count This indicates a potential problem with either the schema generator or the way these fields are sent from the clients. Usually dots within field names get transformed to underscores.

I did some investigating and noticed that none of these fields actually appear in any of the schemas. Since these fields appear across all Glean applications, I wonder if this is more of a client SDK issue?
:chutten maybe you have some insight? We are seeing a bunch of metrics being sent from all kinds of Glean applications that are not part of the schemas. Some of these metrics are:

  • metrics.timespan.extensions.startup_cache_load_time.time_unit
  • metrics.memory_distribution.glean.upload.pending_pings_directory_size.count
  • metrics.timing_distribution.wr.renderer_time.count
  • metrics.timing_distribution.javascript.gc.minor_time.count
  • metrics.timing_distribution.geckoview.content_process_lifetime.count
  • metrics.string.geckoview.validation.build_id
  • metrics.string.search.engine.defatlt.engine_id
  • metrics.timing_distribution.perf.startup.home_fragment_on_view_created.count
Flags: needinfo?(chutten)

The payload is expected to have nested structures with identifiers that are sometimes permitted to have . characters like

"metrics": {
  "timespan": {
    "extensions.startup_cache_load_time": {
      "value": 1,
      "time_unit": "minute"
    }
  }
}

I'm not sure what would result in a decoding that assumes there'd be a column that contains the . between extensions.startup_cache_load_time. I'm not sure what you mean by "Since these fields appear across all Glean applications, I wonder if this is more of a client SDK issue?" -- the nested time_unit field is present in schemas. (the count field is not (or is at least not documented as such), though it is present in test APIs).

Naively I'd assume there's something that translates extensions.startup_cache_load_time to its column name extensions_startup_cache_load_time and maybe therein lies the fault?

Flags: needinfo?(chutten)

The majority (ca. 90%) of the missing columns seems to be related to the count field. Is there a reason why this should not be part of the schemas? Can we just add it?

Flags: needinfo?(chutten)

That one I don't know anything about. Might be related to bug 1790501 if it only started happening with Glean v51.5.0+

Flags: needinfo?(jrediger)
Flags: needinfo?(chutten)
Flags: needinfo?(brosa)

We indeed accidentally added count to the payload of distributions.
I'll work on removing that again.
Nonetheless we should allow it in the schema, as we will receive it for all those clients indefinitely.

Flags: needinfo?(jrediger)
Assignee: nobody → jrediger
Priority: -- → P1

Anna, can you help with the schema part?
I don't fully understand where these things show up.
And thus I don't really know where we would need to fix this.

Flags: needinfo?(ascholtz)

Talked with Jan-Erik about this. I am going to check today if Glean.js is doing the same thing, if so I will work on getting that fixed.

Flags: needinfo?(brosa)

I believe Glean.js is ok. I don't see count showing up in distribution metrics for pings. I will confirm with Jan-Erik tomorrow.

Here is an example of a ping I sent using Glean.js - https://debug-ping-preview.firebaseapp.com/rawPing/8e0927a3-0d2b-40c9-b211-b49a7f0f6d4f

Attached file GitHub Pull Request
Flags: needinfo?(ascholtz)

With the above PRs merged this should be fixed now.

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

Attachment

General

Creator:
Created:
Updated:
Size: