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

Fixed issue where telemetryInitializer is not cleaned up when newService errors #6239

Merged

Conversation

cpheps
Copy link
Contributor

@cpheps cpheps commented Oct 5, 2022

Description: <Describe what has changed.
Fixing a bug - Fixed issue where the telemetryInitializer was not cleaned up if newService errors after telemetryInitializer.init is called. This would cause subsequent calls to new service to error on telemetryInitializer.init.

Fixes: #6238

Testing:

  • Added a new unit test that fails without new cleanup logic
  • Tested with our OPAMP enabled agent and server. On reconfigure our agent runs a new instance of the Collector within the agent process. This was exposing the issue when a bad config is sent.

@cpheps cpheps requested review from a team and mx-psi October 5, 2022 18:20
@codecov
Copy link

codecov bot commented Oct 5, 2022

Codecov Report

Base: 92.22% // Head: 92.23% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (fc3ffdf) compared to base (e4cfde4).
Patch coverage: 78.37% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6239   +/-   ##
=======================================
  Coverage   92.22%   92.23%           
=======================================
  Files         219      219           
  Lines       13446    13456   +10     
=======================================
+ Hits        12401    12411   +10     
  Misses        815      815           
  Partials      230      230           
Impacted Files Coverage Δ
service/service.go 71.42% <78.37%> (+3.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

service/service.go Outdated Show resolved Hide resolved
service/service.go Outdated Show resolved Hide resolved
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

LGTM, just a couple nits

service/service.go Outdated Show resolved Hide resolved
service/service.go Show resolved Hide resolved
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Thanks for fixing!

service/service.go Outdated Show resolved Hide resolved
service/service.go Outdated Show resolved Hide resolved
Corbin Phelps added 7 commits October 7, 2022 12:42
…ice errors

Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
…gs cleaner

Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
@cpheps cpheps force-pushed the fix-telemetry-no-cleanup-on-error branch from 67d4813 to fc3ffdf Compare October 7, 2022 16:51
@cpheps
Copy link
Contributor Author

cpheps commented Oct 7, 2022

@bogdandrutu made the suggested changes

@bogdandrutu bogdandrutu merged commit fca25f2 into open-telemetry:main Oct 7, 2022
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.

Service TelemetryInitializer doesn't clean up when newService errors
6 participants