mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
feat(analytics): add apis for event tracking (#5298)
* feat(analytics): add apis for event tracking feat(api): fetch instanceID feat(state): set instance id and version on matomo refactor(state): export validation of app state feat(analytics): update dimensions refactor(analytics): move matomo to module feat(analytics): disable analytics on non production feat(analytics): track event metadata refactor(analytics): clean push function refactor(analytics): rename init function feat(analytics): track user role feat(analytics): track user global role fix(stacks): remove event tracking for stack create * style(analytics): remove TODO * feat(build): add testing env
This commit is contained in:
parent
11d555bbd6
commit
9be0b89aff
9 changed files with 251 additions and 282 deletions
|
@ -181,9 +181,10 @@ func initSnapshotService(snapshotInterval string, dataStore portainer.DataStore,
|
|||
return snapshotService, nil
|
||||
}
|
||||
|
||||
func initStatus(flags *portainer.CLIFlags) *portainer.Status {
|
||||
func initStatus(instanceID string) *portainer.Status {
|
||||
return &portainer.Status{
|
||||
Version: portainer.APIVersion,
|
||||
Version: portainer.APIVersion,
|
||||
InstanceID: instanceID,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -471,7 +472,7 @@ func buildServer(flags *portainer.CLIFlags) portainer.Server {
|
|||
log.Fatalf("failed loading edge jobs from database: %v", err)
|
||||
}
|
||||
|
||||
applicationStatus := initStatus(flags)
|
||||
applicationStatus := initStatus(instanceID)
|
||||
|
||||
err = initEndpoint(flags, dataStore, snapshotService)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue