-
Notifications
You must be signed in to change notification settings - Fork 35
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
allow users to change the filter keys in signalfx #64
base: master
Are you sure you want to change the base?
Conversation
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.
Looks good
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.
Looks good to me.
@lawwong1 can you approve the change after reviewing. |
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.
First time looking at this code, I thought I will give my 2c :)
@@ -56,7 +56,9 @@ type signalFxClient struct { | |||
client http.Client | |||
authToken string | |||
signalFxAddress string | |||
hostKey string |
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.
Your editor has not replaced the tabs with spaces and these two lines appear misaligned
@@ -75,16 +75,16 @@ func NewMetricsServerClient() (watcher.MetricsProviderClient, error) { | |||
if err != nil { | |||
return nil, err | |||
} | |||
return metricsServerClient{ | |||
return &metricsServerClient{ |
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.
What prompted this change?
- The struct has only 2 attributes so passing it by value does not incur a lot of copying
- A pointer has the disadvantage that the access to the attributes is indirect
It is not wrong but it has already been like this from the initial version, so why change it now?
} | ||
|
||
func (s promClient) Name() string { | ||
func (s *promClient) Name() string { |
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.
Same question about the need for this change. This struct is even smaller.
@@ -346,7 +369,7 @@ Sample metaData payload: | |||
"created": 1614534848000, | |||
"creator": null, | |||
"dimensions": { | |||
"host": "test.dev.com", | |||
"[hostKey]": "test.dev.com", |
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.
- I may be mistaken, but it seems to me the right key here is the value of
hostKey
which by default ishost
- Why are the square brackets introduced?
TEST DONE: