Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

pavo-tusker
Copy link
Contributor

Implemented Basic Prometheus Metrics and Grafana Dashboard using this Prometheus Crate #496
Screenshot from 2022-08-04 19-59-06
Screenshot from 2022-08-04 19-58-56
Screenshot from 2022-08-04 19-58-40

@irevoire irevoire self-requested a review August 5, 2022 11:40
@pavo-tusker
Copy link
Contributor Author

@irevoire Fixed the issues in the review.

@irevoire
Copy link
Contributor

irevoire commented Aug 8, 2022

Hey, I'm off today I'll look into it tomorrow!
But thanks a lot for your contribution it looks sick 🤘

Copy link
Contributor

@irevoire irevoire left a comment

Choose a reason for hiding this comment

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

Hey, @pavo-tusker thank you for your contribution it’s awesome, I want to see what the rest of the @meilisearch/core-team thinks of it before merging it.

But overall great contribution, thanks!

@irevoire
Copy link
Contributor

Ok @pavo-tusker, so after chatting with the team we would really like to integrate your change but with the option to disable it.
Could you create an --enable-metrics-route cli option as @ManyTheFish said that disables both the metrics route and the hook in actix (=the wrap_fn).

@irevoire irevoire added this to the v0.29.0 milestone Aug 16, 2022
@irevoire
Copy link
Contributor

Hey, just so you know, clippy was updated last weekend thus you'll need to rebase on main to make the CI pass again.

@pavo-tusker
Copy link
Contributor Author

Hey, just so you know, clippy was updated last weekend thus you'll need to rebase on main to make the CI pass again.

Hey, @irevoire Just added the " --enable-metrics-route " option as per the above discussions. By default, metrics will be disabled. passing "--enable-metrics-route" arg will enable /metrics route and Req/Res metrics. Removed wrap_fn and changed it as a conditional wrap middleware.

and what do I need to do on Clippy? can you give some more details about this?

Copy link
Contributor

@irevoire irevoire left a comment

Choose a reason for hiding this comment

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

Hey @pavo-tusker we're almost there!

After accepting my last change you will need to rebase on main (there should be no conflict from what I see) and I’ll be able to merge your change!
It should be something like that depending on your workflow.

git checkout main
git pull upstream/main
git checkout -
git rebase main
git push -f

@irevoire
Copy link
Contributor

irevoire commented Aug 17, 2022

bors merge

EDIT: I was hoping bors would be able to rebase on main alone and make your PR pass the CI, but it looks like it does not.

bors bot added a commit that referenced this pull request Aug 17, 2022
2657: prometheus and grafana dashboards implemented r=irevoire a=pavo-tusker

Implemented Basic Prometheus Metrics and Grafana Dashboard using this [Prometheus Crate](https://crates.io/crates/prometheus) [#496](https://github.com/meilisearch/product/issues/496)
![Screenshot from 2022-08-04 19-59-06](https://user-images.githubusercontent.com/43550760/182880420-71ec8591-a2cb-4fd5-b1c5-911a6dcbdaf9.png)
![Screenshot from 2022-08-04 19-58-56](https://user-images.githubusercontent.com/43550760/182880433-11727814-e230-44dd-89c9-fec3baa47b11.png)
![Screenshot from 2022-08-04 19-58-40](https://user-images.githubusercontent.com/43550760/182880436-73312a68-4f20-49f0-80e9-5e344f96db6f.png)


Co-authored-by: mohandasspat <[email protected]>
Co-authored-by: Pavo-Tusker <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 17, 2022

Build failed:

@pavo-tusker pavo-tusker force-pushed the metrics/prometheus-setup branch from 9b37554 to 947fb5c Compare August 17, 2022 15:28
irevoire
irevoire previously approved these changes Aug 22, 2022
Copy link
Contributor

@irevoire irevoire left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!
bors merge

bors bot added a commit that referenced this pull request Aug 22, 2022
2657: prometheus and grafana dashboards implemented r=irevoire a=pavo-tusker

Implemented Basic Prometheus Metrics and Grafana Dashboard using this [Prometheus Crate](https://crates.io/crates/prometheus) [#496](https://github.com/meilisearch/product/issues/496)
![Screenshot from 2022-08-04 19-59-06](https://user-images.githubusercontent.com/43550760/182880420-71ec8591-a2cb-4fd5-b1c5-911a6dcbdaf9.png)
![Screenshot from 2022-08-04 19-58-56](https://user-images.githubusercontent.com/43550760/182880433-11727814-e230-44dd-89c9-fec3baa47b11.png)
![Screenshot from 2022-08-04 19-58-40](https://user-images.githubusercontent.com/43550760/182880436-73312a68-4f20-49f0-80e9-5e344f96db6f.png)


Co-authored-by: mohandasspat <[email protected]>
Co-authored-by: Pavo-Tusker <[email protected]>
Co-authored-by: Tamo <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 22, 2022

Build failed:

@pavo-tusker
Copy link
Contributor Author

Thanks for your contribution! bors merge

Again there is an issue with clippy :( on new bors merged code.
Just fixed that too.

Copy link
Contributor

@irevoire irevoire left a comment

Choose a reason for hiding this comment

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

yeah I don't know what's happening, I'll try again and if it doesn't work we're probably going to bypass bors or remove clappy from the CI 🤔
bors merge

@bors
Copy link
Contributor

bors bot commented Aug 22, 2022

@bors bors bot merged commit ea36512 into meilisearch:main Aug 22, 2022
@curquiza curquiza linked an issue Aug 25, 2022 that may be closed by this pull request
@pavo-tusker pavo-tusker deleted the metrics/prometheus-setup branch August 26, 2022 09:21
@irevoire
Copy link
Contributor

Hey @pavo-tusker, finally, we decided we wanted to take more time to refine the feature, thus for the next release (happening today), we're going to move the metrics behind a feature flag (which requires you to build your own meilisearch binary in order to use it).

For the next weeks, we’re going to heavily use it and see what other information we can provide, and if, in the end, we are satisfied with the outcome, we’ll probably make it official for the v1.0 (in 4 months) 🎉
We’ll see how it goes, but I can't promise anything.

I would love to hear your use case, though; why did you feel the need to implement this route, and is it ok for you to recompile meilisearch from scratch in the meantime?

@curquiza curquiza removed a link to an issue Aug 29, 2022
@pavo-tusker
Copy link
Contributor Author

Ease observability meilisearch/product#496

Sure, 🫡. I was exploring meilisearch for our needs, and observability is something I felt helped understand the queries we did, so I added the same and thought I would make a pull request to contribute. Using as a binary now.
Would be great to see the merge when it happens, let me know if anything is needed from me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v0.29.0 PRs/issues solved in v0.29.0 released on 2022-10-03
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants