Skip to content
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

Added Path_Key to tail config #90

Merged
merged 8 commits into from Sep 17, 2020
Merged

Conversation

AlecIsaacson
Copy link
Contributor

Added Path_Key to config so we capture name of file being tailed.

Added Path_Key to config so we capture name of file being tailed.
Updated tests so we pass.
@coveralls
Copy link

coveralls commented Sep 3, 2020

Pull Request Test Coverage Report for Build 259117880

  • 523 of 612 (85.46%) changed or added relevant lines in 5 files are covered.
  • 54 unchanged lines in 5 files lost coverage.
  • Overall coverage increased (+0.2%) to 56.088%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/integrations/v4/logs/logs/output_fb.go 35 37 94.59%
pkg/integrations/v4/logs/logs/loader.go 86 110 78.18%
pkg/integrations/v4/logs/logs/cfg_watcher.go 54 80 67.5%
pkg/integrations/v4/logs/logs/cfg.go 347 384 90.36%
Files with Coverage Reduction New Missed Lines %
pkg/metrics/sampler/sampler_routine.go 2 94.74%
pkg/integrations/v4/logs/cfg_watcher.go 4 67.5%
pkg/config/loader/config.go 5 82.61%
pkg/integrations/legacy/runner.go 19 77.71%
pkg/databind/internal/discovery/command.go 24 21.05%
Totals Coverage Status
Change from base Build 248285240: 0.2%
Covered Lines: 9692
Relevant Lines: 17280

💛 - Coveralls

Copy link
Contributor

@jsubirat jsubirat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review finished from my side.

pkg/integrations/v4/logs/loader_test.go Outdated Show resolved Hide resolved
Changed Path_Key from filename to a more descriptive filePath.
jsubirat
jsubirat previously approved these changes Sep 8, 2020
@carlosroman
Copy link
Contributor

Could you run go fmt over your code changes please. It looks like a couple of your structs aren't correctly formatted.

@@ -482,7 +482,7 @@ func newFBExternalConfig(l LogExternalFBCfg) FBCfgExternal {
func newFileInput(filePath string, dbPath string, tag string, bufSize int) FBCfgInput {
return FBCfgInput{
Name: fbInputTypeTail,
Path_Key: "filename",
Path_Key: "filePath",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Path_Key: "filePath",
PathKey: "filePath",

Copy link
Contributor

@carlosroman carlosroman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes, looks good.

@carlosroman carlosroman merged commit b77400e into newrelic:master Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants