Skip to content

SpanOption DisableQuery#26

Merged
XSAM merged 6 commits into
XSAM:mainfrom
wesleyvicthor:disable_query
Sep 3, 2021
Merged

SpanOption DisableQuery#26
XSAM merged 6 commits into
XSAM:mainfrom
wesleyvicthor:disable_query

Conversation

@wesleyvicthor

Copy link
Copy Markdown
Contributor

Hi, this PR attempts to cover the DisableQuery functionality, this time as opposed #25, it makes only the attribute not set.

It tries to cover the expected functionality by #22

DisableQuery when set to true, will suppress attribute of key
db.statement on spans.
this commit adds a step check on every span which uses db.statement
attribute. in case SpanOption.DisableQuery is set true, the attribute is
not set.
@wesleyvicthor
wesleyvicthor requested a review from XSAM as a code owner August 31, 2021 18:42
@wesleyvicthor

Copy link
Copy Markdown
Contributor Author

Hi @XSAM this time I am trying to disable the query itself. I wonder if would make sense to set the value with something like "-" instead of not sending it. wdyt ?

@XSAM

XSAM commented Sep 1, 2021

Copy link
Copy Markdown
Owner

Hi @XSAM this time I am trying to disable the query itself. I wonder if would make sense to set the value with something like "-" instead of not sending it. wdyt ?

I think not sending the value is make sense to me. You can check the example value from the specification.

@XSAM XSAM left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good overall. Please update CHANGELOG.md and run make precommit before commit.

updates the changelog adding new feature option for SpanOption +
fix linting.
@codecov

codecov Bot commented Sep 1, 2021

Copy link
Copy Markdown

Codecov Report

Merging #26 (7b4d621) into main (83759c0) will decrease coverage by 0.7%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main     #26     +/-   ##
=======================================
- Coverage   82.3%   81.6%   -0.8%     
=======================================
  Files         11      11             
  Lines        311     299     -12     
=======================================
- Hits         256     244     -12     
  Misses        45      45             
  Partials      10      10             
Impacted Files Coverage Δ
config.go 100.0% <100.0%> (ø)
conn.go 77.5% <100.0%> (-1.8%) ⬇️
stmt.go 79.4% <100.0%> (-2.8%) ⬇️

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 83759c0...7b4d621. Read the comment docs.

Comment thread CHANGELOG.md Outdated
@XSAM XSAM linked an issue Sep 2, 2021 that may be closed by this pull request
Comment thread config.go Outdated
wesleyvicthor and others added 2 commits September 2, 2021 23:13
Co-authored-by: Sam Xie <[email protected]>
Co-authored-by: Sam Xie <[email protected]>

@XSAM XSAM left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@wesleyvicthor LGTM. Thanks for your contribution.

@XSAM
XSAM merged commit e9d1cb8 into XSAM:main Sep 3, 2021
@XSAM XSAM mentioned this pull request Sep 6, 2021
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.

Features not toggleable in config?

2 participants