Installations
npm install @opentelemetry/plugin-mysql
Developer Guide
Typescript
Yes
Module System
CommonJS
Min. Node Version
>=8.0.0
Node Version
14.8.0
NPM Version
lerna/3.22.1/node@v14.8.0+x64 (darwin)
Score
72.6
Supply Chain
91.6
Quality
79.4
Maintenance
100
Vulnerability
100
License
Releases
instrumentation-pg: v0.51.0
Published on 28 Jan 2025
instrumentation-mysql2: v0.45.1
Published on 28 Jan 2025
instrumentation-cucumber: v0.14.0
Published on 28 Jan 2025
auto-instrumentations-node: v0.56.0
Published on 28 Jan 2025
instrumentation-fastify: v0.44.1
Published on 20 Jan 2025
instrumentation-aws-lambda: v0.50.2
Published on 20 Jan 2025
Contributors
Languages
TypeScript (97.91%)
JavaScript (2.08%)
Shell (0.01%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Download Statistics
Total Downloads
598,069
Last Day
152
Last Week
651
Last Month
2,698
Last Year
33,234
GitHub Statistics
744 Stars
2,214 Commits
549 Forks
17 Watching
16 Branches
458 Contributors
Bundle Size
40.84 kB
Minified
9.91 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.15.0
Package Id
@opentelemetry/plugin-mysql@0.15.0
Size
8.81 kB
NPM Version
lerna/3.22.1/node@v14.8.0+x64 (darwin)
Node Version
14.8.0
Publised On
05 Apr 2021
Total Downloads
Cumulative downloads
Total Downloads
598,069
Last day
33.3%
152
Compared to previous day
Last week
9.4%
651
Compared to previous week
Last month
1.9%
2,698
Compared to previous month
Last year
-53.7%
33,234
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
3
Dev Dependencies
20
OpenTelemetry mysql Instrumentation for Node.js
This module provides automatic instrumentation for mysql
.
For automatic instrumentation see the @opentelemetry/node package.
Installation
1npm install --save @opentelemetry/plugin-mysql
Supported Versions
~2.0.0
Usage
OpenTelemetry MySQL Instrumentation allows the user to automatically collect trace data and export them to the backend of choice, to give observability to distributed systems when working with mysql.
To load a specific plugin (MySQL in this case), specify it in the registerInstrumentations's configuration
1const { NodeTracerProvider } = require('@opentelemetry/node');
2const { registerInstrumentations } = require('@opentelemetry/instrumentation');
3
4const provider = new NodeTracerProvider();
5provider.register();
6
7registerInstrumentations({
8 instrumentations: [
9 {
10 plugins: {
11 mysql: {
12 enabled: true,
13 // You may use a package name or absolute path to the file.
14 path: '@opentelemetry/plugin-mysql',
15 }
16 },
17 },
18 ],
19 tracerProvider: provider,
20});
21
To load all of the supported plugins, use below approach. Each plugin is only loaded when the module that it patches is loaded; in other words, there is no computational overhead for listing plugins for unused modules.
1const { NodeTracerProvider } = require('@opentelemetry/node'); 2const { registerInstrumentations } = require('@opentelemetry/instrumentation'); 3 4const provider = new NodeTracerProvider(); 5provider.register(); 6registerInstrumentations({ 7 tracerProvider: provider, 8});
See examples/mysql for a short example.
Useful links
- For more information on OpenTelemetry, visit: https://opentelemetry.io/
- For more about OpenTelemetry JavaScript: https://github.com/open-telemetry/opentelemetry-js
- For help or feedback on this project, join us in GitHub Discussions
License
Apache 2.0 - See LICENSE for more information.
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
all changesets reviewed
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 14 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0
Reason
no binaries found in the repo
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/open-telemetry/.github/SECURITY.md:1
- Info: Found linked content: github.com/open-telemetry/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/open-telemetry/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/open-telemetry/.github/SECURITY.md:1
Reason
SAST tool is run on all commits
Details
- Info: SAST configuration detected: CodeQL
- Info: all commits (30) are checked with a SAST tool
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/close-stale.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/close-stale.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/close-stale.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/close-stale.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/close-stale.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/close-stale.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/codeql-analysis.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/codeql-analysis.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/codeql-analysis.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/codeql-analysis.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/component-owners.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/component-owners.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/label-prs.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/label-prs.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/label-prs.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/label-prs.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/lint.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/lint.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/peer-api.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/peer-api.yaml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-title.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/pr-title.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-please-validate.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/release-please-validate.yaml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-please.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/release-please.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-please.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/release-please.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-please.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/release-please.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-please.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/release-please.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-all-versions.pr.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/test-all-versions.pr.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-all-versions.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/test-all-versions.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-all-versions.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/test-all-versions.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-all-versions.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/test-all-versions.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-all-versions.yml:138: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/test-all-versions.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-all-versions.yml:141: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/test-all-versions.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-all-versions.yml:152: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/test-all-versions.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/unit-test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/unit-test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-test.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/unit-test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-test.yml:146: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/unit-test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-test.yml:149: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/unit-test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-test.yml:160: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/unit-test.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/unit-test.yml:174: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/unit-test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-test.yml:192: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/unit-test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-test.yml:195: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/unit-test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-test.yml:201: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/unit-test.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/unit-test.yml:210: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/unit-test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update-otel-deps.yaml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/update-otel-deps.yaml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update-otel-deps.yaml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/open-telemetry/opentelemetry-js-contrib/update-otel-deps.yaml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/release-please-validate.yaml:20
- Warn: npmCommand not pinned by hash: .github/workflows/release-please.yml:53
- Warn: npmCommand not pinned by hash: .github/workflows/test-all-versions.yml:149
- Warn: npmCommand not pinned by hash: .github/workflows/unit-test.yml:157
- Warn: npmCommand not pinned by hash: .github/workflows/update-otel-deps.yaml:35
- Info: 0 out of 35 GitHub-owned GitHubAction dependencies pinned
- Info: 1 out of 5 third-party GitHubAction dependencies pinned
- Info: 10 out of 15 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Info: jobLevel 'contents' permission set to 'read': .github/workflows/label-prs.yml:9
- Warn: no topLevel permission defined: .github/workflows/close-stale.yml:1
- Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1
- Warn: no topLevel permission defined: .github/workflows/component-owners.yml:1
- Warn: no topLevel permission defined: .github/workflows/label-prs.yml:1
- Warn: no topLevel permission defined: .github/workflows/lint.yml:1
- Warn: no topLevel permission defined: .github/workflows/peer-api.yaml:1
- Warn: no topLevel permission defined: .github/workflows/pr-title.yml:1
- Warn: no topLevel permission defined: .github/workflows/release-please-validate.yaml:1
- Warn: no topLevel permission defined: .github/workflows/release-please.yml:1
- Warn: no topLevel permission defined: .github/workflows/test-all-versions.pr.yml:1
- Warn: no topLevel permission defined: .github/workflows/test-all-versions.push.yml:1
- Warn: no topLevel permission defined: .github/workflows/test-all-versions.yml:1
- Warn: no topLevel permission defined: .github/workflows/unit-test.yml:1
- Warn: no topLevel permission defined: .github/workflows/update-otel-deps.yaml:1
- Info: no jobLevel write permissions found
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
22 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-7v5v-9h63-cj86
- Warn: Project is vulnerable to: GHSA-8hc4-vh64-cxmj
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-rrr8-f88r-h8q6
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-m5vv-6r4h-3vj9
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-x3cc-x39p-42qx
- Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm
- Warn: Project is vulnerable to: GHSA-4jv9-3563-23j3
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc
Score
6.5
/10
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More