Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DISCO-3228] Add metrics and logging for curated recommendations favicons #804

Merged
merged 7 commits into from
Feb 26, 2025

Conversation

Herraj
Copy link
Contributor

@Herraj Herraj commented Feb 21, 2025

References

JIRA: DISCO-3228

Description

Add metrics and logging for curated recommendations favicons hits and misses. This will allow us to better understand the success percentage and be able to add the missing icon urls manually for the urls that had a miss.

PR Review Checklist

Put an x in the boxes that apply

  • This PR conforms to the Contribution Guidelines
  • The PR title starts with the JIRA issue reference, format example [DISCO-####], and has the same title (if applicable)
  • [load test: (abort|skip|warn)] keywords are applied to the last commit message (if applicable)
  • Documentation has been updated (if applicable)
  • Functional and performance test coverage has been expanded and maintained (if applicable)

@Herraj Herraj self-assigned this Feb 21, 2025

logger.info(
f"Curated Recommendations with missing icon urls: {len(corpus_items_no_icons)}, {corpus_items_no_icons}"
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

1- Should we do a separate log for each missed item or logging an array / list is fine?

2- Naming of the metric. This function already emits metrics but those are prefixed corpus_api.... Since this isn't related with the corpus api itself, thought I'd go with this.

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 logging the list and the naming is fine. The only thing I am thinking of - Will we emit the same metrics over and over again? AFAIK, the cache is by date? So new feeds/items could be from the same URL, and therefore we would list the URLs again. But I guess this doesn't matter. And for the count: We would always count the same URLs, which I guess is also fine, because we want to know each day how many items we cannot serve.

@Herraj Herraj marked this pull request as ready for review February 25, 2025 16:25
@Herraj Herraj requested review from gruberb, mmiermans and a team February 25, 2025 16:26
@Herraj Herraj added this pull request to the merge queue Feb 26, 2025
Merged via the queue into main with commit 6c1afb6 Feb 26, 2025
11 checks passed
@Herraj Herraj deleted the disco-3228-add-metrics-and-logging-for-partner-favicons branch February 26, 2025 16:31
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.

2 participants