bitrise-io / bitrise-step-analytics

0 stars 7 forks source link

Various issues #5

Open gaborszakacs opened 5 years ago

gaborszakacs commented 5 years ago

https://github.com/bitrise-team/bitrise-step-analytics/blob/93bcd53063f6b9f626332bf71243663d3607729d/main.go#L14

Let's call this step-analytics

gaborszakacs commented 5 years ago

https://github.com/bitrise-team/bitrise-step-analytics/blob/93bcd53063f6b9f626332bf71243663d3607729d/router/router.go#L16

same here

gaborszakacs commented 5 years ago

https://github.com/bitrise-team/bitrise-step-analytics/blob/93bcd53063f6b9f626332bf71243663d3607729d/router/router.go#L28

Don't we want to use MiddlewareWithDogStatsDMetrics here? (It is not getting used at all now.)

gaborszakacs commented 5 years ago

https://github.com/bitrise-team/bitrise-step-analytics/blob/93bcd53063f6b9f626332bf71243663d3607729d/service/metrics_post_test.go#L27

I think we agreed upon including the build slug in these analytics too.

Also, pls make sure this is the format the plugin is sending (or going to send). Tooling should approve this, it might be worth showing this to Viktor too.

gaborszakacs commented 5 years ago

https://github.com/bitrise-team/bitrise-step-analytics/blob/93bcd53063f6b9f626332bf71243663d3607729d/service/metrics_post_test.go#L70

It would be nice to test if we actually call the tracker with the right data. (We can make this into a maintenance card.)

gaborszakacs commented 5 years ago

https://github.com/bitrise-team/bitrise-step-analytics/blob/93bcd53063f6b9f626332bf71243663d3607729d/service/custom_logs_post_test.go#L36

How do we test if test message is getting logged?

gaborszakacs commented 5 years ago

https://github.com/bitrise-team/bitrise-step-analytics/blob/93bcd53063f6b9f626332bf71243663d3607729d/service/custom_logs_post.go#L1

TBH I'm not really sure about this endpoint. It would be nice to see a use case how this is getting used by a step. (Steps don't really do stuff ad-hoc, it might be a better approach to e.g. add some optional comment field in the metrics data.) We might want to talk about this w Viktor and tooling.

gaborszakacs commented 5 years ago

https://github.com/bitrise-team/bitrise-step-analytics/blob/93bcd53063f6b9f626332bf71243663d3607729d/utils/time_formatter.go#L11

This is not getting used.

gaborszakacs commented 5 years ago

https://github.com/bitrise-team/bitrise-step-analytics/blob/93bcd53063f6b9f626332bf71243663d3607729d/utils/logger.go#L9

It's a bit unexpected to have two return values here. Why we need these?

viktorbenei commented 5 years ago

bitrise-step-analytics/service/custom_logs_post.go

Line 1 in 93bcd53

package service TBH I'm not really sure about this endpoint. It would be nice to see a use case how this is getting used by a step. (Steps don't really do stuff ad-hoc, it might be a better approach to e.g. add some optional comment field in the metrics data.) We might want to talk about this w Viktor and tooling.

They'd like to use this for ad-hoc logs/warnings/alerts, e.g. when a step processes Provisioning Profiles, which today can have the platforms ios, tvos and watchos, and there's also a default case - sometime in the future when a new platform is introduced they'd like to get a notification/alert about it, when the default case is triggered.

viktorbenei commented 5 years ago

bitrise-step-analytics/service/metrics_post_test.go

Line 27 in 93bcd53

"app_id":"app-slug","stack_id":"standard1","platform":"ios","cli_version":"1.21","status":"success","start_time":"2019-01-03T18:11:53.171409Z","run_time":121 + I think we agreed upon including the build slug in these analytics too.

Also, pls make sure this is the format the plugin is sending (or going to send). Tooling should approve this, it might be worth showing this to Viktor too.

Yes, definitely include both the AppSlug and the BuildSlug everywhere (when available)!