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

Event submission on run_integration exit with exit code #259

Merged
merged 13 commits into from
Dec 15, 2020

Conversation

varas
Copy link
Contributor

@varas varas commented Dec 1, 2020

Integrations run by cmd channel submit event when finished containing exit code

Usual instrumentation fields for command channel run/stop integrations are #256 (comment)

This adds a new event when an integration run by command channel stops with the usual fields plus:

  • summary value is "integration-exited"
  • a new field cmd_exit_code with an integer value being the exit code and negative values on errors: -1 non stopped, -2 non supported (Centos5), -3 for unknown errors on the execution.

It also adds a new cmd_stop_mode value: "process-not-found" to the usual list for the stop_integration event.

@varas varas requested a review from a team December 1, 2020 17:23
@varas varas added wip and removed ready for review labels Dec 1, 2020
@varas varas force-pushed the feat_exit-code-event branch 5 times, most recently from 57aee4b to 5bc79f9 Compare December 3, 2020 09:27
@coveralls
Copy link

coveralls commented Dec 3, 2020

Pull Request Test Coverage Report for Build 423347383

  • 73 of 132 (55.3%) changed or added relevant lines in 11 files are covered.
  • 4 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.1%) to 58.07%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/integrations/v4/runner/runner.go 12 13 92.31%
pkg/backend/commandapi/client.go 0 1 0.0%
cmd/newrelic-infra/newrelic-infra.go 0 3 0.0%
internal/integrations/v4/integration/definition.go 3 6 50.0%
internal/integrations/v4/executor/executor.go 3 9 33.33%
internal/agent/cmdchannel/stopintegration/stopintegration.go 2 10 20.0%
pkg/integrations/v4/manager.go 4 12 33.33%
pkg/integrations/track/tracker.go 44 73 60.27%
Files with Coverage Reduction New Missed Lines %
internal/agent/cmdchannel/stopintegration/stopintegration.go 1 27.63%
internal/integrations/v4/executor/executor.go 1 74.53%
pkg/metrics/sampler/sampler_routine.go 2 94.74%
Totals Coverage Status
Change from base Build 415947680: -0.1%
Covered Lines: 11412
Relevant Lines: 19652

💛 - Coveralls

@varas varas force-pushed the feat_exit-code-event branch 2 times, most recently from 8c0d7c9 to 0efe6e2 Compare December 7, 2020 10:37
@varas varas added ready for review and removed wip labels Dec 7, 2020
@varas varas changed the title feat exit code event Event submission on run_integration exit with exit code Dec 7, 2020
brushknight
brushknight previously approved these changes Dec 9, 2020
Copy link
Contributor

@brushknight brushknight left a comment

Choose a reason for hiding this comment

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

LGTM

@josemore josemore added this to Ready for review in CAOS: Our Daily Bread Dec 10, 2020
varas and others added 2 commits December 15, 2020 15:03
Co-authored-by: Carlos <croman@newrelic.com>
Co-authored-by: Carlos <croman@newrelic.com>
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.

LGTM 👍🏼

@varas varas merged commit ea1d9e2 into master Dec 15, 2020
@varas varas deleted the feat_exit-code-event branch December 15, 2020 17:42
@josemore josemore moved this from Ready For Review to Ready For Release in CAOS: Our Daily Bread Dec 16, 2020
@varas varas moved this from Ready For Release to Done in CAOS: Our Daily Bread Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants