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

fix(operator): dynamically create tracers during reconciliation #804

Merged
merged 6 commits into from
Feb 10, 2023

Conversation

bacherfl
Copy link
Member

@bacherfl bacherfl commented Feb 9, 2023

Closes #802

This PR fixes the problem that spans were not visible after setting the Otel exporter during runtime, as the CRD controllers all used the otel tracers they were given during startup. With this PR, the tracers are now maintained by the otelConfig instance to make sure traces from the current TracerProvider are being used.

@codecov
Copy link

codecov bot commented Feb 9, 2023

Codecov Report

Merging #804 (652ac00) into main (f46e603) will increase coverage by 0.31%.
The diff coverage is 97.91%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #804      +/-   ##
==========================================
+ Coverage   58.33%   58.65%   +0.31%     
==========================================
  Files          97       97              
  Lines        7518     7542      +24     
==========================================
+ Hits         4386     4424      +38     
+ Misses       2941     2930      -11     
+ Partials      191      188       -3     
Impacted Files Coverage Δ
operator/controllers/common/otel_utils.go 70.64% <93.33%> (+4.46%) ⬆️
...rator/controllers/lifecycle/keptnapp/controller.go 68.96% <100.00%> (+0.54%) ⬆️
...ontrollers/lifecycle/keptnappversion/controller.go 72.93% <100.00%> (+0.41%) ⬆️
...cle/keptnappversion/reconcile_prepostdeployment.go 81.81% <100.00%> (ø)
...cle/keptnappversion/reconcile_prepostevaluation.go 81.81% <100.00%> (ø)
...ontrollers/lifecycle/keptnevaluation/controller.go 81.50% <100.00%> (+0.21%) ⬆️
...ator/controllers/lifecycle/keptntask/controller.go 58.24% <100.00%> (+4.30%) ⬆️
...lers/lifecycle/keptnworkloadinstance/controller.go 82.95% <100.00%> (+1.51%) ⬆️
...ptnworkloadinstance/reconcile_prepostdeployment.go 81.81% <100.00%> (ø)
...ptnworkloadinstance/reconcile_prepostevaluation.go 90.90% <100.00%> (+9.09%) ⬆️
... and 4 more
Flag Coverage Δ
component-tests 42.52% <59.45%> (+0.07%) ⬆️
keptn-lifecycle-operator 54.67% <72.91%> (+0.17%) ⬆️
klt-cert-manager 67.50% <ø> (ø)
scheduler 21.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
@sonarcloud
Copy link

sonarcloud bot commented Feb 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bacherfl bacherfl marked this pull request as ready for review February 9, 2023 15:39
Copy link
Member

@thisthat thisthat 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

@odubajDT odubajDT left a comment

Choose a reason for hiding this comment

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

awesome work, LGTM!

@bacherfl bacherfl merged commit 68f188e into keptn:main Feb 10, 2023
@bacherfl bacherfl deleted the fix/802/fix-traces branch February 10, 2023 08:28
@keptn-bot keptn-bot mentioned this pull request Feb 10, 2023
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.

OTel Collector URL provided by KeptnConfig is not applied correctly
3 participants