-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add analytics event processing [IDE-736] #712
Conversation
@@ -55,3 +85,27 @@ func SendAnalyticsToAPI(c *config.Config, payload []byte) error { | |||
} | |||
return nil | |||
} | |||
|
|||
func PayloadForAnalyticsEventParam(c *config.Config, param types.AnalyticsEventParam) analytics.InstrumentationCollector { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bundles filling the most common event fields.
"application/json", | ||
payload, | ||
) | ||
var eventsParam types.AnalyticsEventParam |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It tries to get a struct - unmarshalling into a struct does not work, we use the old flow, passing the data through to analytics service.
@@ -43,7 +43,7 @@ func Test_getActiveUser_Execute_User_found(t *testing.T) { | |||
|
|||
expectedUser, expectedUserData := whoamiWorkflowResponse(t) | |||
|
|||
mockEngine, engineConfig := setUpEngineMock(t, c) | |||
mockEngine, engineConfig := testutil.SetUpEngineMock(t, c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick
mockEngine, engineConfig := testutil.SetUpEngineMock(t, c) | |
mockEngine, engineConfig := testutil.SetupEngineMock(t, c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few questions, but pr looks good to me!
Description
This enables sending of arbitrary events to the analytics service. Also, sending an
authenticated
event after authentication was added.Additional content of this PR:
Checklist