-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add source to analytics events. #2750
Changes from 2 commits
44abffa
1a6ad98
e90f8ea
7c7ae9c
a6928da
bfef23d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ type Watcher struct { | |
} | ||
|
||
type analytics interface { | ||
Event(category string, action string, dim ...*dimensions.Values) | ||
EventWithSource(category, action, source string, dim ...*dimensions.Values) | ||
} | ||
|
||
func New(cfg *config.Instance, an analytics) *Watcher { | ||
|
@@ -97,7 +97,7 @@ func (w *Watcher) check() { | |
|
||
func (w *Watcher) RecordUsage(e entry) { | ||
logging.Debug("Recording usage of %s (%d)", e.Exec, e.PID) | ||
w.an.Event(anaConst.CatRuntimeUsage, anaConst.ActRuntimeHeartbeat, e.Dims) | ||
w.an.EventWithSource(anaConst.CatRuntimeUsage, anaConst.ActRuntimeHeartbeat, anaConst.SrcExecutor, e.Dims) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks to me like all heartbeats come from executors, so that's why the source is this and not State Tool. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call! I forgot about that caveat. |
||
} | ||
|
||
func (w *Watcher) Close() error { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Moved into analytics/constants.go