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

Add metrics for repository interactions to RemoteIndexBuildStrategy #2566

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jed326
Copy link
Contributor

@jed326 jed326 commented Feb 27, 2025

Description

This PR introduces some new metrics within the k-NN plugin related to remote index builds
New metrics:

      "remote_vector_index_build_stats" : {
        "repository_stats" : {
          "write_time_in_millis" : 15,
          "read_success_count" : 0,
          "read_failure_count" : 0,
          "write_success_count" : 1,
          "write_failure_count" : 0,
          "read_time_in_millis" : 0
        },
        "client_stats" : {
          "status_request_failure_count" : 0,
          "status_request_success_count" : 0,
          "index_build_success_count" : 0,
          "index_build_failure_count" : 0,
          "build_request_failure_count" : 1,
          "build_request_success_count" : 0,
          "waiting_time_in_ms" : 0
        },
        "build_stats" : {
          "remote_index_build_time_in_millis" : 23,
          "remote_index_build_current_size" : 0,
          "remote_index_build_current_operations" : 0
        }
      },

Complementary to these, existing repository implementations may also collect their own metrics. For example, repository-s3 collects metrics like so:
Existing repo metrics:

     "repositories" : [
        {
          "repository_name" : "vector-repo",
          "repository_type" : "s3",
          "repository_location" : {
            "bucket" : "gpu-acceleration",
            "base_path" : "vectors"
          },
          "request_time_in_millis" : {
            "ListObjects" : 49,
            "PutMultipartObject" : 0,
            "PutObject" : 199,
            "GetObject" : 38,
            "DeleteObjects" : 51
          },
          "request_retry_count_total" : {
            "ListObjects" : 0,
            "PutMultipartObject" : 0,
            "PutObject" : 0,
            "GetObject" : 0,
            "DeleteObjects" : 0
          },
          "request_failures_total" : {
            "ListObjects" : 0,
            "PutMultipartObject" : 0,
            "PutObject" : 0,
            "GetObject" : 0,
            "DeleteObjects" : 0
          },
          "generic_stats" : {
            "LowPriorityPermitsUtilization" : 0,
            "NormalPriorityPermitsUtilization" : 0,
            "LowPriorityQUtilization" : 0,
            "NormalPriorityQUtilization" : 0
          },
          "request_success_total" : {
            "ListObjects" : 1,
            "PutMultipartObject" : 0,
            "PutObject" : 6,
            "GetObject" : 3,
            "DeleteObjects" : 1
          }
        }
      ],

Related Issues

Relates #2391

Check List

  • New functionality includes testing.
    - [ ] New functionality has been documented.
    - [ ] API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
    - [ ] Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

// 4. Downloads index file and writes to indexOutput
stopWatch = new StopWatch().start();
try {
assert vectorRepositoryAccessor != null;
Copy link
Member

Choose a reason for hiding this comment

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

why would this be null? Is this just defensive?

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