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

trace/sql: Wrap and return standard library sql.DB #178

Merged
merged 1 commit into from Mar 13, 2020
Merged

trace/sql: Wrap and return standard library sql.DB #178

merged 1 commit into from Mar 13, 2020

Conversation

nstratos
Copy link

@nstratos nstratos commented Mar 13, 2020

This change adds two functions to package trace/sql. One that wraps the
standard library sql.DB, which provides support for libraries like
sqlmock and another that provides access to the wrapped sql.DB which is
useful for SQL code that does not require tracing.

Closes #179.

Signed-off-by: Stratos Neiros s.neiros@thebeat.co

This change adds two functions to package trace/sql. One that wraps the
standard library sql.DB, which provides support for libraries like
sqlmock and another that provides access to the wrapped sql.DB which is
useful for SQL code that does not require tracing.

Signed-off-by: Stratos Neiros <s.neiros@thebeat.co>
@codecov
Copy link

codecov bot commented Mar 13, 2020

Codecov Report

Merging #178 into master will increase coverage by 4.35%.
The diff coverage is 95.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #178      +/-   ##
==========================================
+ Coverage   80.04%   84.40%   +4.35%     
==========================================
  Files          47       51       +4     
  Lines        2551     3046     +495     
==========================================
+ Hits         2042     2571     +529     
+ Misses        447      397      -50     
- Partials       62       78      +16     
Impacted Files Coverage Δ
async/amqp/amqp.go 45.58% <0.00%> (ø)
trace/sqs/message.go 92.50% <92.50%> (ø)
async/kafka/kafka.go 92.59% <92.85%> (-0.10%) ⬇️
component/grpc/observability.go 93.25% <93.25%> (ø)
trace/kafka/kafka.go 84.12% <93.33%> (+2.87%) ⬆️
trace/sqs/publisher.go 93.33% <93.33%> (ø)
component/grpc/component.go 94.11% <94.11%> (ø)
sync/http/component.go 96.89% <94.87%> (-1.48%) ⬇️
cmd/patron/main.go 45.31% <95.00%> (ø)
service.go 92.17% <95.28%> (+13.49%) ⬆️
... and 19 more

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 a89e360...7c27b37. Read the comment docs.

@mantzas mantzas merged commit 69990e1 into beatlabs:master Mar 13, 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.

Wrap and return standard library sql.DB for sqlmock support
3 participants