Skip to content

Conversation

@ktuite
Copy link
Member

@ktuite ktuite commented May 23, 2023

Backend portion of getodk/central#410
Needs the frontend translation change and the central config version change and the new version of the form to be uploaded.

odk-analytics.xlsx

What has been done to verify that this works as intended?

Integration Test +

Tried sending local analytics to test server.

image

Why is this the best possible solution? Were any other approaches considered?

NA

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

No

Does this change require updates to the API documentation? If so, please update docs/api.md as part of this PR.

No

Before submitting this PR, please make sure you have:

  • run make test-full and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code from external sources are properly credited in comments or that everything is internally sourced

"recent": 0,
"total": 0
},
"num_updated_entities": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this name has the potential to be slightly confusing. We're measuring the number of entity updates, where each entity can be counted multiple times (once for each update). However, the name of the metric seems to imply that we're measuring a subset of all entities. Put another way, it's possible for num_updated_entities > num_entities.

@sadiqkhoja, I'll let you decide whether to use the existing name or a different name like num_entity_updates. The name isn't shown in Frontend (text is shown instead), so it's just a question of whether we could end up getting confused internally.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to count "Number of Entities Updated" or "Number of Updates across all Entities"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure actually. getodk/central#410 suggests the latter. "Number of Entities Updated" would never exceed "Number of Entities", but I think it'd be interesting if we saw a very high "Number of Updates across all Entities". It'd be nice to have some sense of how often updates happen.

@sadiqkhoja sadiqkhoja requested a review from matthew-white May 25, 2023 15:34
Copy link
Member

@matthew-white matthew-white left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @sadiqkhoja did the primary review. I took a quick look at the new query. I also confirmed that num_updated_entities has been renamed to num_entity_updates.

) AS errors ON ds.id = errors."datasetId"
LEFT JOIN (
SELECT
COUNT (a.details -> 'entityId'::TEXT) total,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this just be COUNT(1)?

@sadiqkhoja sadiqkhoja merged commit 7dbe29e into master May 25, 2023
@matthew-white matthew-white deleted the ktuite/usage-metrics branch May 26, 2023 02:08
@matthew-white
Copy link
Member

matthew-white commented May 26, 2023

@sadiqkhoja, I see that you updated the XLSForm as well for the metric rename. Thanks for doing that! I've uploaded it to data.getodk.cloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants