Go to file
meili-bors[bot] ecb5c506b3
Merge #4619
4619: Use http path pattern instead of full path in metrics r=irevoire a=gh2k

# Pull Request

## Related issue

Fixes #3983 

## What does this PR do?

- This records only the HTTP pattern in metrics instead of the full path

An alternative solution was proposed in #4145, but this doesn't really fix the root cause of the issue. The problem I'm experiencing at my end is that by using the full path, the number of labels is far too high to be useful. It is normal practice to use the path with variable placeholders, instead of the fully-expanded path.

The example given in the ticket was endpoints under `/tasks`, but this can also be a very significant problem under `/indexes/{index-uid}/documents`. e.g.:
<img width="1510" alt="Screenshot 2024-05-03 at 12 14 36" src="https://github.com/meilisearch/meilisearch/assets/6530014/1df2ec19-5f69-4164-90d2-f65c59f9b544">

This patch replaces the fully-expanded path with the matched pattern.

The linked PR also mentions paths under other routes, e.g. `/static`, but this feels like a separate concern and these can be stripped out at the Prometheus end by filters if they are unwanted. The most important thing is to make the paths usable so that we can still get stats on e.g. the number of document deletes we see.

## PR checklist

Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: Simon Detheridge <s@sd.ai>
Co-authored-by: Tamo <tamo@meilisearch.com>
2024-05-06 09:37:32 +00:00
.cargo Compile xtask in --release 2024-03-05 10:11:43 +01:00
.github Update sprint_issue.md (#4556) 2024-04-05 18:40:28 +02:00
assets feat: add request rate and error rate panels to grafana dashboard 2024-03-25 10:49:40 +05:30
benchmarks Upgrade all compatible dependencies 2024-01-16 15:05:03 +01:00
build-info Factor vergen stuff to a build-info crate 2024-03-05 10:11:43 +01:00
dump chore: fix some typos in conments 2024-04-02 19:37:55 +08:00
file-store Merge #4435 2024-02-26 17:54:40 +00:00
filter-parser chore: fix some typos in comments 2024-04-18 14:12:52 +08:00
flatten-serde-json Update criterion to 0.5.1 to remove the atty dependency 2023-07-03 18:51:42 +02:00
fuzzers Upgrade all compatible dependencies 2024-01-16 15:05:03 +01:00
index-scheduler chore: fix some typos in comments 2024-04-18 14:12:52 +08:00
json-depth-checker Update criterion to 0.5.1 to remove the atty dependency 2023-07-03 18:51:42 +02:00
meili-snap Upgrade all compatible dependencies 2024-01-16 15:05:03 +01:00
meilisearch fix warning 2024-05-06 11:36:37 +02:00
meilisearch-auth Fix imports 2024-02-28 18:09:40 +01:00
meilisearch-types chore: fix some typos in comments 2024-04-18 14:12:52 +08:00
meilitool chore: fix some typos in comments 2024-04-18 14:12:52 +08:00
milli chore: fix some typos in comments 2024-04-18 14:12:52 +08:00
permissive-json-pointer Refactor empty arrays/objects should return empty instead of null 2023-09-11 15:56:15 +03:00
tracing-trace Span Stats compute self-time 2024-03-05 10:11:43 +01:00
workloads Revert "Revert "Merge remote-tracking branch 'origin/main' into release-v1.7.1"" 2024-03-20 10:08:28 +01:00
xtask Revert "Revert "Merge remote-tracking branch 'origin/main' into release-v1.7.1"" 2024-03-20 10:08:28 +01:00
.dockerignore Revert "Improve docker cache" 2023-05-25 11:48:26 +02:00
.gitignore Update .gitignore 2024-03-05 10:12:52 +01:00
.rustfmt.toml Introduce a rustfmt file 2022-10-27 11:35:05 +02:00
BENCHMARKS.md chore: remove repetitive words 2024-03-22 15:23:13 +08:00
bors.toml Remove macos-latest and windows-latest usages 2022-12-20 11:10:09 +01:00
Cargo.lock Update grenad to fix rare DB corruption 2024-04-11 21:06:59 +02:00
Cargo.toml Update version for the next release (v1.7.6) in Cargo.toml 2024-04-11 21:08:57 +02:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2020-04-30 20:16:02 +02:00
config.toml Add the default commented experimental batched tasks limit parameter to the config file 2023-12-12 10:59:00 +01:00
CONTRIBUTING.md Revert "Revert "Merge remote-tracking branch 'origin/main' into release-v1.7.1"" 2024-03-20 10:08:28 +01:00
Cross.toml Cross build with action-rs 2021-10-10 02:21:30 +08:00
Dockerfile Factor vergen stuff to a build-info crate 2024-03-05 10:11:43 +01:00
download-latest.sh Updated messages pointing to the docs website 2023-04-28 20:52:03 +00:00
LICENSE Update LICENSE 2024-01-03 14:32:41 +01:00
PROFILING.md Update the PROFILING.md file 2023-10-13 13:11:30 +02:00
README.md Update README.md 2024-02-06 16:49:29 +01:00
SECURITY.md docs(security): Fix Supported 2022-05-31 14:21:34 -05:00

Website | Roadmap | Meilisearch Cloud | Blog | Documentation | FAQ | Discord

Dependency status License Bors enabled

A lightning-fast search engine that fits effortlessly into your apps, websites, and workflow 🔍

Meilisearch helps you shape a delightful search experience in a snap, offering features that work out-of-the-box to speed up your workflow.

A bright colored application for finding movies screening near the user A dark colored application for finding movies screening near the user

🔥 Try it! 🔥

Features

  • Search-as-you-type: find search results in less than 50 milliseconds
  • Typo tolerance: get relevant matches even when queries contain typos and misspellings
  • Filtering and faceted search: enhance your users' search experience with custom filters and build a faceted search interface in a few lines of code
  • Sorting: sort results based on price, date, or pretty much anything else your users need
  • Synonym support: configure synonyms to include more relevant content in your search results
  • Geosearch: filter and sort documents based on geographic data
  • Extensive language support: search datasets in any language, with optimized support for Chinese, Japanese, Hebrew, and languages using the Latin alphabet
  • Security management: control which users can access what data with API keys that allow fine-grained permissions handling
  • Multi-Tenancy: personalize search results for any number of application tenants
  • Highly Customizable: customize Meilisearch to your specific needs or use our out-of-the-box and hassle-free presets
  • RESTful API: integrate Meilisearch in your technical stack with our plugins and SDKs
  • Easy to install, deploy, and maintain

📖 Documentation

You can consult Meilisearch's documentation at https://www.meilisearch.com/docs.

🚀 Getting started

For basic instructions on how to set up Meilisearch, add documents to an index, and search for documents, take a look at our Quick Start guide.

Supercharge your Meilisearch experience

Say goodbye to server deployment and manual updates with Meilisearch Cloud. No credit card required.

🧰 SDKs & integration tools

Install one of our SDKs in your project for seamless integration between Meilisearch and your favorite language or framework!

Take a look at the complete Meilisearch integration list.

Logos belonging to different languages and frameworks supported by Meilisearch, including React, Ruby on Rails, Go, Rust, and PHP

⚙️ Advanced usage

Experienced users will want to keep our API Reference close at hand.

We also offer a wide range of dedicated guides to all Meilisearch features, such as filtering, sorting, geosearch, API keys, and tenant tokens.

Finally, for more in-depth information, refer to our articles explaining fundamental Meilisearch concepts such as documents and indexes.

📊 Telemetry

Meilisearch collects anonymized data from users to help us improve our product. You can deactivate this whenever you want.

To request deletion of collected data, please write to us at privacy@meilisearch.com. Don't forget to include your Instance UID in the message, as this helps us quickly find and delete your data.

If you want to know more about the kind of data we collect and what we use it for, check the telemetry section of our documentation.

📫 Get in touch!

Meilisearch is a search engine created by Meili, a software development company based in France and with team members all over the world. Want to know more about us? Check out our blog!

🗞 Subscribe to our newsletter if you don't want to miss any updates! We promise we won't clutter your mailbox: we only send one edition every two months.

💌 Want to make a suggestion or give feedback? Here are some of the channels where you can reach us:

Thank you for your support!

👩‍💻 Contributing

Meilisearch is, and will always be, open-source! If you want to contribute to the project, please take a look at our contribution guidelines.

📦 Versioning

Meilisearch releases and their associated binaries are available in this GitHub page.

The binaries are versioned following SemVer conventions. To know more, read our versioning policy.

Differently from the binaries, crates in this repository are not currently available on crates.io and do not follow SemVer conventions.