-
Notifications
You must be signed in to change notification settings - Fork 624
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(instrumentation-dbapi): add experimental sql commenter capability #908
Conversation
_KEY_VALUE_DELIMITER = "," | ||
|
||
|
||
def _generate_sql_comment(**meta): |
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.
Is it really necessary to add this to utils
? This is a single-use function, its contents can just be used directly where the function is called.
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.
I think so, there will be many sql db instrumentations that will rely on this.
@@ -115,3 +116,38 @@ def _start_internal_or_server_span( | |||
attributes=attributes, | |||
) | |||
return span, token | |||
|
|||
|
|||
_KEY_VALUE_DELIMITER = "," |
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.
Single-use constant
...tion/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py
Outdated
Show resolved
Hide resolved
…lemetry/instrumentation/dbapi/__init__.py Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
Description
This PR adds support for an experimental and optional feature for enabling sql commenter capability to dbapi instrumentation.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
tox -e test-instrumentation-dbapi
Does This PR Require a Core Repo Change?