-
Notifications
You must be signed in to change notification settings - Fork 63
Extract db.namespace from DSN in AttributesFromDSN
#608
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
Open
cyrille-leclerc
wants to merge
28
commits into
XSAM:main
Choose a base branch
from
cyrille-leclerc:extract-db-namespace-from-dsn-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
093ef23
Extract db.namespace from DSN in AttributesFromDSN
cyrille-leclerc 6fabdca
Extract db.namespace from DSN in AttributesFromDSN
cyrille-leclerc e4d5e0e
Better code coverage through unit tests
cyrille-leclerc ae48eda
Fix test-coverage goal
cyrille-leclerc 0115bb2
update changelog.md
cyrille-leclerc 04afb00
Merge branch 'main' into extract-db-namespace-from-dsn-2
cyrille-leclerc 3582ac6
Better comments
cyrille-leclerc dce7fbd
Remove db.system.name from AttributesFromDSN
cyrille-leclerc 3b8b728
Better commeRemove db.system.name from AttributesFromDSNnts
cyrille-leclerc 6d55c88
remove the `scheme` returned value + fix edge case
cyrille-leclerc 1d35f5c
Fix CHANGELOG.md
cyrille-leclerc 0a00b8e
Better comments
cyrille-leclerc 6cdd26f
Revert Makefile change
cyrille-leclerc 8a42793
Fix CHANGELOG.md
cyrille-leclerc 70690a7
Better align with previous code
cyrille-leclerc 7add5cc
Better align with previous code
cyrille-leclerc 1ee7247
Better align with previous code
cyrille-leclerc e74e5cb
Better align with previous code
cyrille-leclerc 55c61f5
Merge branch 'main' into extract-db-namespace-from-dsn-2
cyrille-leclerc 7ef7c35
Add sqlserver DSN support to parseDSN and extend tests
cyrille-leclerc 77e2718
Simplify parseDSN: use url.ParseQuery for sqlserver database param
cyrille-leclerc a9ff19a
restore "nolint"
cyrille-leclerc ae95af2
Restrict db.namespace extraction to known DSN schemes and reduce comp…
cyrille-leclerc 05e3bde
Restore nolint:gosec on TestAttributesFromDSN
cyrille-leclerc 1e56f4f
Update CHANGELOG and add test for malformed DSN
cyrille-leclerc a56b1cc
Merge branch 'main' into extract-db-namespace-from-dsn-2
cyrille-leclerc 0232957
Preallocate attrs slice in getDummyAttributesGetter
cyrille-leclerc c17a842
Consolidate Fixed section in CHANGELOG [Unreleased]
cyrille-leclerc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -250,11 +250,9 @@ func prepareMetrics() (sdkmetric.Reader, *sdkmetric.MeterProvider) { | |
|
|
||
| func getDummyAttributesGetter() AttributesGetter { | ||
| return func(_ context.Context, method Method, query string, args []driver.NamedValue) []attribute.KeyValue { | ||
| //nolint:prealloc | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Running locally |
||
| attrs := []attribute.KeyValue{ | ||
| attribute.String("method", string(method)), | ||
| attribute.String("query", query), | ||
| } | ||
| attrs := make([]attribute.KeyValue, 2, 2+len(args)) | ||
| attrs[0] = attribute.String("method", string(method)) | ||
| attrs[1] = attribute.String("query", query) | ||
|
|
||
| for i, a := range args { | ||
| attrs = append(attrs, attribute.String( | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We see with sqlserver and oracle that the /path is not always the dbname