Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Integrate amplitude #209

Merged
merged 3 commits into from
Jun 16, 2021
Merged

Integrate amplitude #209

merged 3 commits into from
Jun 16, 2021

Conversation

irevoire
Copy link
Member

And merge the sentry and amplitude usage under one “Enable analytics” flag

closes #180

@irevoire irevoire requested review from curquiza and MarinPostma June 15, 2021 13:14
And merge the sentry and amplitude usage under one “Enable analytics”
flag
meilisearch-http/src/main.rs Show resolved Hide resolved
meilisearch-http/src/main.rs Outdated Show resolved Hide resolved
Comment on lines 60 to 65
#[cfg(feature = "analytics")]
if !opt.no_analytics {
let analytics_data = data.clone();
let analytics_opt = opt.clone();
tokio::task::spawn(analytics::analytics_sender(analytics_data, analytics_opt));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should prevent data to be sent in debug builds, just like above

Copy link
Member Author

Choose a reason for hiding this comment

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

This was not the case in the current Meilisearch. But if @qdequele or @gmourier are ok with that, I can do it 🙂

Copy link
Member

@gmourier gmourier Jun 16, 2021

Choose a reason for hiding this comment

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

To be sure, are we talking about a MeiliSearch compiled by the user in debug mode and not in release mode? I ask the question to be sure that it does not concern the log level.

If this is the case, I don't see any immediate need to have analytics on the uses of Meilisearch when it is compiled in debug. It also avoids polluting Amplitude with data that doesn't represent the majority of our users.

What is the purpose of the debug build? Using different compiler options for development purposes?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, you understood perfectly. Right now Meilisearch (and this pr) are sending amplitude analytics even when compiled in Debug mode. Sentry is not sending any analytics while in debug mode though.

Basically, the debug mode is faster to compile, slower to execute and obviously easier to debug.
Every binary we ship is compiled in release mode so someone using a debug build build it himself from the source.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the answer @irevoire. I agreed that we should not send the analytics in debug build! Thanks, guys for the catch 💪

Copy link
Member

@gmourier gmourier Jun 16, 2021

Choose a reason for hiding this comment

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

The spec has been updated to mention the fact that debug build doesn't collect any telemetry!

Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
curquiza
curquiza previously approved these changes Jun 16, 2021
@irevoire
Copy link
Member Author

I removed the usage of amplitude when in debug mode 🙂

@irevoire irevoire requested review from MarinPostma and curquiza June 16, 2021 15:14
Copy link
Contributor

@MarinPostma MarinPostma left a comment

Choose a reason for hiding this comment

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

bors merge

@bors
Copy link
Contributor

bors bot commented Jun 16, 2021

Build succeeded:

@bors bors bot merged commit 2062b10 into main Jun 16, 2021
@bors bors bot deleted the analytics branch June 16, 2021 15:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate telemetry
4 participants