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

feat: mysql support #525

Merged
merged 42 commits into from
Nov 27, 2019
Merged

Conversation

dyladan
Copy link
Member

@dyladan dyladan commented Nov 13, 2019

Which problem is this PR solving?

This is a draft PR so that people can take a look and give feedback. It is not ready for merge and has not been sufficiently tested. There is an example at examples/mysql where you can see a working example.

Basic description of changes

  • Instrument connections created with createConnection
    • Callback responses
    • Streaming responses
  • Instrument connection pools created with createPool
    • Callback responses
    • Streaming responses
  • Cluster pool instrumentation
  • tests

edit: prepared statements not supported by mysql package

@codecov-io
Copy link

codecov-io commented Nov 13, 2019

Codecov Report

Merging #525 into master will increase coverage by 2.19%.
The diff coverage is 94.84%.

@@            Coverage Diff             @@
##           master     #525      +/-   ##
==========================================
+ Coverage   90.25%   92.44%   +2.19%     
==========================================
  Files         148      157       +9     
  Lines        7448     7958     +510     
  Branches      668      689      +21     
==========================================
+ Hits         6722     7357     +635     
+ Misses        726      601     -125
Impacted Files Coverage Δ
packages/opentelemetry-node/src/config.ts 100% <ø> (ø)
packages/opentelemetry-plugin-mysql/src/enums.ts 100% <100%> (ø)
...kages/opentelemetry-plugin-mysql/test/testUtils.ts 15.78% <15.78%> (ø)
packages/opentelemetry-plugin-mysql/src/utils.ts 95.45% <95.45%> (ø)
packages/opentelemetry-plugin-mysql/src/mysql.ts 95.79% <95.79%> (ø)
...ages/opentelemetry-plugin-mysql/test/mysql.test.ts 98.2% <98.2%> (ø)
...kages/opentelemetry-plugin-dns/test/utils/utils.ts 33.33% <0%> (-26.67%) ⬇️
...es/opentelemetry-node/src/instrumentation/utils.ts 90.47% <0%> (-9.53%) ⬇️
...ges/opentelemetry-tracing/src/NoopSpanProcessor.ts 66.66% <0%> (-8.34%) ⬇️
.../opentelemetry-plugin-redis/test/assertionUtils.ts 95.83% <0%> (-4.17%) ⬇️
... and 46 more

@dyladan dyladan marked this pull request as ready for review November 18, 2019 19:04
@dyladan dyladan changed the title feat: mysql support WIP feat: mysql support Nov 18, 2019
@dyladan
Copy link
Member Author

dyladan commented Nov 22, 2019

@open-telemetry/javascript-approvers this is ready for reviews. pls take a look

examples/mysql/README.md Outdated Show resolved Hide resolved
examples/mysql/server.js Outdated Show resolved Hide resolved
packages/opentelemetry-plugin-mysql/package.json Outdated Show resolved Hide resolved
packages/opentelemetry-plugin-mysql/src/utils.ts Outdated Show resolved Hide resolved
packages/opentelemetry-plugin-mysql/src/utils.ts Outdated Show resolved Hide resolved
packages/opentelemetry-plugin-mysql/src/utils.ts Outdated Show resolved Hide resolved
Copy link
Member

@vmarchaud vmarchaud left a comment

Choose a reason for hiding this comment

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

Except the @ts-ignore that i would prefer to remove, lgtm

Copy link
Member

@vmarchaud vmarchaud left a comment

Choose a reason for hiding this comment

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

LGTM now ;)

Copy link
Member

@markwolff markwolff left a comment

Choose a reason for hiding this comment

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

LGTM

.circleci/config.yml Show resolved Hide resolved
Copy link
Member

@mayurkale22 mayurkale22 left a comment

Choose a reason for hiding this comment

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

👍

@dyladan
Copy link
Member Author

dyladan commented Nov 25, 2019

@mayurkale22 should I add mysql to the default plugins list in this PR or should I wait until this is merged and do a separate PR?

@mayurkale22
Copy link
Member

@mayurkale22 should I add mysql to the default plugins list in this PR or should I wait until this is merged and do a separate PR?

I am fine with either way. In the future, maybe will update the default plugins list once the plugin looks stable after 1-2 release. WDYT?

@mayurkale22 mayurkale22 added Merge:LGTM This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.) Target:NodeJS feature-request labels Nov 27, 2019
@mayurkale22 mayurkale22 merged commit 5a52eda into open-telemetry:master Nov 27, 2019
@dyladan dyladan deleted the mysql branch November 27, 2019 19:27
pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Merge:LGTM This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants