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 analytics on the get / fetch document route #3737

Closed
2 tasks
irevoire opened this issue May 9, 2023 · 1 comment · Fixed by #3738
Closed
2 tasks

Add analytics on the get / fetch document route #3737

irevoire opened this issue May 9, 2023 · 1 comment · Fixed by #3738
Assignees
Labels
enhancement New feature or improvement impacts docs This issue involves changes in the Meilisearch's documentation v1.2.0 PRs/issues solved in v1.2.0 released on 2023-06-05
Milestone

Comments

@irevoire
Copy link
Member

irevoire commented May 9, 2023

Related spec: meilisearch/specifications#234

Motivation

We didn't have the time to implement the analytics before the end of the sprint on the get documents route.

Add the analytics for the following routes:

  • GET - /indexes/:uid/documents
  • GET - /indexes/:uid/documents/:doc_id
  • POST - /indexes/:uid/documents/fetch

These analytics are aggregated between two events:

  • Documents Fetched GET
  • Documents Fetched POST

That shares the same payload:

Property name Description Example
requests.total_received Total number of request received in this batch 325
per_document_id false false
per_filter true if POST /indexes/:indexUid/documents/fetch endpoint was used with a filter in this batch, otherwise false false
pagination.max_limit Highest value given for the limit parameter in this batch 60
pagination.max_offset Highest value given for the offset parameter in this batch 1000

TODO

  • Merge
  • Update the spec

Impacted teams

@meilisearch/docs-team

@irevoire irevoire added this to the v1.2.0 milestone May 9, 2023
@irevoire irevoire self-assigned this May 9, 2023
@curquiza curquiza added impacts docs This issue involves changes in the Meilisearch's documentation enhancement New feature or improvement labels May 9, 2023
meili-bors bot added a commit that referenced this issue May 16, 2023
3738: Add analytics on the get documents resource r=irevoire a=irevoire

# Pull Request

## Related issue
Fixes #3737
Related spec meilisearch/specifications#234

## What does this PR do?
Add the analytics for the following routes:
- `GET` - `/indexes/:uid/documents`
- `GET` - `/indexes/:uid/documents/:doc_id`
- `POST` - `/indexes/:uid/documents/fetch`

These analytics are aggregated between two events:
- `Documents Fetched GET`
- `Documents Fetched POST`

That shares the same payload:
 Property name | Description | Example |
|---------------|-------------|---------|
| `requests.total_received` | Total number of request received in this batch | 325 |
| `per_document_id` | `false` | false |
| `per_filter` | `true` if `POST /indexes/:indexUid/documents/fetch` endpoint was used with a filter in this batch, otherwise `false` | false |
| `pagination.max_limit` | Highest value given for the `limit` parameter in this batch | 60 |
| `pagination.max_offset` | Highest value given for the `offset` parameter in this batch | 1000 |

Co-authored-by: Tamo <tamo@meilisearch.com>
meili-bors bot added a commit that referenced this issue May 16, 2023
3738: Add analytics on the get documents resource r=dureuill a=irevoire

# Pull Request

## Related issue
Fixes #3737
Related spec meilisearch/specifications#234

## What does this PR do?
Add the analytics for the following routes:
- `GET` - `/indexes/:uid/documents`
- `GET` - `/indexes/:uid/documents/:doc_id`
- `POST` - `/indexes/:uid/documents/fetch`

These analytics are aggregated between two events:
- `Documents Fetched GET`
- `Documents Fetched POST`

That shares the same payload:
 Property name | Description | Example |
|---------------|-------------|---------|
| `requests.total_received` | Total number of request received in this batch | 325 |
| `per_document_id` | `false` | false |
| `per_filter` | `true` if `POST /indexes/:indexUid/documents/fetch` endpoint was used with a filter in this batch, otherwise `false` | false |
| `pagination.max_limit` | Highest value given for the `limit` parameter in this batch | 60 |
| `pagination.max_offset` | Highest value given for the `offset` parameter in this batch | 1000 |

Co-authored-by: Tamo <tamo@meilisearch.com>
@curquiza curquiza linked a pull request May 17, 2023 that will close this issue
@curquiza
Copy link
Member

Fixed by #3738
Will be released this week in rc1

@meili-bot meili-bot added the v1.2.0 PRs/issues solved in v1.2.0 released on 2023-06-05 label Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement impacts docs This issue involves changes in the Meilisearch's documentation v1.2.0 PRs/issues solved in v1.2.0 released on 2023-06-05
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants