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

refactor(stats): add a simpler way to collect more data for stats #943

Merged
merged 6 commits into from
Jun 18, 2020

Conversation

plumpy
Copy link
Member

@plumpy plumpy commented Jun 18, 2020

I made a TelemetryEventDataProvider interface. All registered implementations are called by the TelemetryEventListener to fill out the stats payload we send over to the community metrics.

I did this because @robzienert and I are talking about adding more complicated things. I can imagine them involving RPCs and caching and it's going to be much simpler to write and test if these implementations are factored out to separate classes instead of all jammed into TelemetryEventListener.

I didn't convert the ones that deal with the stats event content because I'm going to refactor how that works in a later commit.
Implementations can add their own data to the stats Event object. This allows us to pull data from a variety of sources without having to cram all that logic into TelemetryEventListener.
Some of the Groovy/Java code gets a little weirder because TelemetryConfigProps is in Kotlin, but after the next commit, all its clients will be in Kotlin, so it'll make more sense.
@plumpy plumpy force-pushed the refactor_event_service_take_2 branch from 0d9b632 to a366338 Compare June 18, 2020 07:01
Now it is split between two different ExecutionDataProviders. For now, this is a little arbitrary, but I anticipate adding more complicated data providers that do RPCs and things, so this should make those future data providers much simpler to reason about and test.
@plumpy plumpy force-pushed the refactor_event_service_take_2 branch from a366338 to 21869bc Compare June 18, 2020 07:05
Copy link
Contributor

@maggieneterval maggieneterval left a comment

Choose a reason for hiding this comment

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

📈 🔢 🔍➕🧪 ✅ 💯

Copy link
Contributor

@ezimanyi ezimanyi left a comment

Choose a reason for hiding this comment

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

📊 📈 💯

@plumpy plumpy added the ready to merge Approved and ready for merge label Jun 18, 2020
@mergify mergify bot merged commit 9288187 into spinnaker:master Jun 18, 2020
@mergify mergify bot added the auto merged label Jun 18, 2020
@plumpy plumpy deleted the refactor_event_service_take_2 branch June 18, 2020 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants