Skip to content

feat(instrumentation-dbapi): add experimental sql commenter capability#908

Merged
ocelotl merged 7 commits intoopen-telemetry:mainfrom
srikanthccv:dbapi-comment-feat
Feb 11, 2022
Merged

feat(instrumentation-dbapi): add experimental sql commenter capability#908
ocelotl merged 7 commits intoopen-telemetry:mainfrom
srikanthccv:dbapi-comment-feat

Conversation

@srikanthccv
Copy link
Member

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.

  • New feature (non-breaking change which adds functionality)

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?

  • No.

@srikanthccv srikanthccv requested a review from a team February 9, 2022 15:32
_KEY_VALUE_DELIMITER = ","


def _generate_sql_comment(**meta):
Copy link
Contributor

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.

Copy link
Member Author

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.

return span, token


_KEY_VALUE_DELIMITER = ","
Copy link
Contributor

Choose a reason for hiding this comment

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

Single-use constant

srikanthccv and others added 6 commits February 10, 2022 03:24
@srikanthccv srikanthccv requested a review from ocelotl February 11, 2022 05:07
@ocelotl ocelotl merged commit d54b61e into open-telemetry:main Feb 11, 2022
@srikanthccv srikanthccv deleted the dbapi-comment-feat branch February 11, 2022 16:17
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