Skip to content
Snippets Groups Projects

Add Ml Experiment Tracking metrics

Merged Eduardo Bonet requested to merge 372063-add-serviceping-metrics into master
All threads resolved!

What does this MR do and why?

Adds database metrics to track usage of Ml Experiment Tracking. This change is wrapped by :ml_experiment_tracking feature flag

Database

CountMlCandidatesMetric

Main

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52653

SELECT
    COUNT("ml_candidates"."id")
FROM
    "ml_candidates"
WHERE
    "ml_candidates"."id" >= 1
    AND "ml_candidates"."id" < 163

Max

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52654

SELECT
    MAX("ml_candidates"."id")
FROM
    "ml_candidates"

min

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52655

SELECT
    MIN("ml_candidates"."id")
FROM
    "ml_candidates"

CountMlExperimentsMetric

Main

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52656

SELECT
    COUNT("ml_experiments"."id")
FROM
    "ml_experiments"
WHERE
    "ml_experiments"."id" >= 1
    AND "ml_experiments"."id" < 17

Max

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52657

SELECT
    MAX("ml_experiments"."id")
FROM
    "ml_experiments"

min

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52658

SELECT
    MIN("ml_experiments"."id")
FROM
    "ml_experiments"

CountProjectsWithMlCandidatesMetric

Main

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52659

SELECT
    COUNT(DISTINCT "ml_experiments"."project_id")
FROM
    "ml_candidates"
    INNER JOIN "ml_experiments" ON "ml_experiments"."id" = "ml_candidates"."experiment_id"
WHERE
    "ml_experiments"."project_id" >= 20
    AND "ml_experiments"."project_id" < 23

Max

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52660

SELECT
    MAX("ml_experiments"."project_id")
FROM
    "ml_candidates"
    INNER JOIN "ml_experiments" ON "ml_experiments"."id" = "ml_candidates"."experiment_id"

min

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52661

SELECT
    MIN("ml_experiments"."project_id")
FROM
    "ml_candidates"
    INNER JOIN "ml_experiments" ON "ml_experiments"."id" = "ml_candidates"."experiment_id"

CountUsersWithMlCandidatesMetric

Main

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52662

SELECT
    COUNT(DISTINCT "ml_candidates"."user_id")
FROM
    "ml_candidates"
WHERE
    "ml_candidates"."user_id" >= 1
    AND "ml_candidates"."user_id" < 49

Max

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52663

SELECT MAX("ml_candidates"."user_id") FROM "ml_candidates”

min

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52664

SELECT MIN("ml_candidates"."user_id") FROM "ml_candidates"

CountProjectsWithMlExperimentsMetric

Main

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52665

SELECT
    COUNT(DISTINCT "ml_experiments"."project_id")
FROM
    "ml_experiments"
WHERE
    "ml_experiments"."project_id" >= 20
    AND "ml_experiments"."project_id" < 23

Max

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52666

SELECT MAX("ml_experiments"."project_id") FROM "ml_experiments"

min

 https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52667

SELECT MIN("ml_experiments"."project_id") FROM "ml_experiments"

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #372063 (closed)

Edited by Eduardo Bonet

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Eduardo Bonet added 1 commit

    added 1 commit

    • ae78871b - Fixes product stage and category

    Compare with previous version

  • Eduardo Bonet added 1 commit

    added 1 commit

    • e194ee20 - Fixes instrumentation class names

    Compare with previous version

  • Eduardo Bonet changed the description

    changed the description

  • Eduardo Bonet requested review from @euko

    requested review from @euko

  • Eduardo Bonet requested review from @dbalexandre

    requested review from @dbalexandre

  • removed review request for @dbalexandre

  • Eduardo Bonet added 1 commit

    added 1 commit

    Compare with previous version

  • Eduardo Bonet requested review from @dbalexandre

    requested review from @dbalexandre

  • removed review request for @dbalexandre

  • Eduardo Bonet added 1 commit

    added 1 commit

    Compare with previous version

  • euko
  • euko approved this merge request

    approved this merge request

  • added databasereviewed label and removed databasereview pending label

  • euko removed review request for @euko

    removed review request for @euko

  • Mikołaj Wawrzyniak approved this merge request

    approved this merge request

  • removed review request for @mikolaj_wawrzyniak

  • Eduardo Bonet added 1 commit

    added 1 commit

    • 5c4e4f3b - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Eduardo Bonet requested review from @a_akgun

    requested review from @a_akgun

  • Alper Akgun approved this merge request

    approved this merge request

  • added databaseapproved label and removed databasereviewed label

  • Alper Akgun removed review request for @a_akgun

    removed review request for @a_akgun

  • Eduardo Bonet added 1 commit

    added 1 commit

    Compare with previous version

  • requested review from @mikolaj_wawrzyniak

  • Mikołaj Wawrzyniak approved this merge request

    approved this merge request

  • removed review request for @mikolaj_wawrzyniak

  • Eduardo Bonet requested review from @dbalexandre

    requested review from @dbalexandre

  • Douglas Barbosa Alexandre approved this merge request

    approved this merge request

  • resolved all threads

  • Douglas Barbosa Alexandre enabled an automatic merge when the pipeline for d3b0ce6e succeeds

    enabled an automatic merge when the pipeline for d3b0ce6e succeeds

  • mentioned in commit c12c2869

  • added workflowstaging label and removed workflowcanary label

  • Please register or sign in to reply
    Loading