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

feat: adds support for enabled/disabled when it comes to wrappers. #163

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jcchavezs
Copy link
Collaborator

@jcchavezs jcchavezs commented Dec 5, 2021

This PR improves performance of the interceptors/wrappers bypassing them when the agent is disabled. Notice propagation will still happen and noop tracing too. We will just not capture body or headers as they will end up in noop anyways.

@codecov
Copy link

codecov bot commented Dec 5, 2021

Codecov Report

Merging #163 (77c5224) into main (58d9331) will decrease coverage by 0.68%.
The diff coverage is 51.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #163      +/-   ##
==========================================
- Coverage   64.50%   63.81%   -0.69%     
==========================================
  Files          47       47              
  Lines        1572     1614      +42     
==========================================
+ Hits         1014     1030      +16     
- Misses        507      526      +19     
- Partials       51       58       +7     
Impacted Files Coverage Δ
sdk/instrumentation/database/sql/sql.go 79.72% <25.00%> (-3.25%) ⬇️
...k/instrumentation/google.golang.org/grpc/client.go 72.88% <40.00%> (-3.49%) ⬇️
sdk/instrumentation/net/http/handler.go 21.54% <40.00%> (+1.08%) ⬆️
sdk/instrumentation/net/http/transport.go 60.71% <40.00%> (-2.75%) ⬇️
...k/instrumentation/google.golang.org/grpc/server.go 72.58% <100.00%> (-1.56%) ⬇️
instrumentation/opentelemetry/init.go 83.51% <0.00%> (-2.29%) ⬇️
instrumentation/opentelemetry/span.go 85.48% <0.00%> (+0.48%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58d9331...77c5224. Read the comment docs.

@jcchavezs jcchavezs requested a review from davexroth December 16, 2021 19:51
@davexroth
Copy link
Contributor

This PR improves performance of the interceptors/wrappers bypassing them when the agent is disabled. Notice propagation will still happen and noop tracing too. We will just not capture body or headers as they will end up in noop anyways.

This enabled flag needs to be the big red off switch a user sets to disable the go sdk if there are any issues, so we need to disable ourselves entirely when this is set.

I can see the use case for wanting to keep propagation with noop tracing, but that would be a different switch.

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.

2 participants