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 repo sync analytics #1122

Merged
merged 4 commits into from
Nov 15, 2023
Merged

add repo sync analytics #1122

merged 4 commits into from
Nov 15, 2023

Conversation

oppiliappan
Copy link
Collaborator

tracks repo metadata on first index, or on full reindex (when the tantivy index hash is updated, for example), includes the following info:

  • repo ref
  • repo provider
  • size in bytes
  • number of qdrant chunks
  • time taken to index

sample event:

RepoEvent {
    name: "index",
    payload: [
        ("repo_ref", String("nerdypepper/dijo")),
        ("provider", String("github")),
        ("file_count", Number(35)),
        ("chunk_count", Number(236)),
        ("bytes", String("116.59KB")),
        ("sync_time", String("4.957807429s")),
    ],
}

to test this changeset, set the following values in local_config.json:

{
    "analytics_key": "..",
    "analytics_data_plane": ".."
}

run rudderstack in "live event stream" mode, and index a repository.

tracks repo metadata on first index, or on full reindex (when the
tantivy index hash is updated, for example), includes the following
info:

- repo ref
- repo provider
- size in bytes
- number of qdrant chunks
- time taken to index

sample event:

    RepoEvent {
        name: "index",
        payload: [
            ("repo_ref", String("nerdypepper/dijo")),
            ("provider", String("github")),
            ("file_count", Number(35)),
            ("chunk_count", Number(236)),
            ("bytes", String("116.59KB")),
            ("sync_time", String("4.957807429s")),
        ],
    }

---

to test this changeset, set the following values in `local_config.json`:

    {
        "analytics_key": "..",
        "analytics_data_plane": ".."
    }

run rudderstack in "live event stream" mode, and index a repository.
@oppiliappan oppiliappan requested a review from rsdy November 9, 2023 15:58
- marks full index resets as `SchemaUpgrade`s
- marks periodic reindex jobs as `PeriodicSync`s
server/bleep/src/indexes/file.rs Outdated Show resolved Hide resolved
server/bleep/src/indexes/file.rs Outdated Show resolved Hide resolved
server/bleep/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@rsdy rsdy left a comment

Choose a reason for hiding this comment

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

The fact that this patch is interwoven with the indexing logic so much makes it slightly difficult to track. I'd prefer containing this logic a bit more, and preferably separating it out to another module from file as much as we can.

server/bleep/src/lib.rs Outdated Show resolved Hide resolved
server/bleep/src/indexes/file.rs Outdated Show resolved Hide resolved
server/bleep/src/indexes/file.rs Outdated Show resolved Hide resolved
server/bleep/src/cache.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@rsdy rsdy left a comment

Choose a reason for hiding this comment

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

This looks a lot cleaner. Thanks

@ggordonhall ggordonhall merged commit c66e99a into main Nov 15, 2023
1 check passed
@ggordonhall ggordonhall deleted the nerdypepper/indexing-analytics branch November 15, 2023 12:00
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.

None yet

3 participants