-
Notifications
You must be signed in to change notification settings - Fork 109
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
[cleanup] move constants to feature-specific files #1444
Conversation
InstallInfoVolumeSubPath = "install_info" | ||
InstallInfoVolumePath = "/etc/datadog-agent/install_info" | ||
InstallInfoVolumeReadOnly = true | ||
|
||
DogstatsdHostPortName = "dogstatsdport" |
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.
Should some of the dogstatsd constants be moved to the feature's const file? DogstatsdHostPortName
is only used in dsd's feature.go and test file, but some others are used elsewhere
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.
yea, i intentionally punted on the ones that require some thought, for now..
@@ -24,7 +24,7 @@ const ( | |||
defaultLogContainerLogsPath string = "/var/lib/docker/containers" | |||
defaultLogPodLogsPath string = "/var/log/pods" | |||
defaultLogContainerSymlinksPath string = "/var/log/containers" | |||
defaultLogTempStoragePath string = "/var/lib/datadog-agent/logs" | |||
DefaultLogTempStoragePath string = "/var/lib/datadog-agent/logs" |
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.
Should this go in api/datadoghq/common/const.go
?
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 think you're right that it would be a better place for it
|
||
apmHostPortName = "traceport" | ||
apmSocketVolumeName = "apmsocket" | ||
apmSocketVolumeLocalPath = "/var/run/datadog" |
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.
Should this be combined with dsd like we do with the hostpath DogstatsdAPMSocketHostPath
? Or would it be better to separate DogstatsdAPMSocketHostPath
into dsd and apm specific paths?
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'm not sure, but i guess we can decide and stick with one approach. it certainly seems there is some deduplication we can do for this particular constant
What does this PR do?
Move feature-specific constants from api/common to be near where they are used
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
Describe your test plan
Ensure the change is noop, i.e. the binary builds and runs without issue
Checklist
bug
,enhancement
,refactoring
,documentation
,tooling
, and/ordependencies
qa/skip-qa
label