Gathering detailed insights and metrics for @opentelemetry/instrumentation-mysql
Gathering detailed insights and metrics for @opentelemetry/instrumentation-mysql
Gathering detailed insights and metrics for @opentelemetry/instrumentation-mysql
Gathering detailed insights and metrics for @opentelemetry/instrumentation-mysql
@opentelemetry/instrumentation-mysql2
OpenTelemetry instrumentation for `mysql2` database client for MySQL
@opentelemetry/plugin-mysql
OpenTelemetry mysql automatic instrumentation package.
@brokerize/opentelemetry-instrumentation-mysql2
OpenTelemetry instrumentation for `mysql2` database client for MySQL
@sstone1/instrumentation-mysql
OpenTelemetry mysql automatic instrumentation package.
OpenTelemetry instrumentation for JavaScript modules
npm install @opentelemetry/instrumentation-mysql
Typescript
Module System
Min. Node Version
Node Version
NPM Version
93.8
Supply Chain
93.3
Quality
89.3
Maintenance
100
Vulnerability
99.6
License
plugin-react-load: v0.33.0
Updated on May 15, 2025
instrumentation-user-interaction: v0.46.0
Updated on May 15, 2025
instrumentation-long-task: v0.46.0
Updated on May 15, 2025
instrumentation-document-load: v0.46.0
Updated on May 15, 2025
instrumentation-winston: v0.46.0
Updated on May 15, 2025
instrumentation-router: v0.46.0
Updated on May 15, 2025
TypeScript (97.54%)
JavaScript (2.46%)
Shell (0.01%)
Total Downloads
177,834,292
Last Day
793,655
Last Week
4,452,918
Last Month
19,319,127
Last Year
140,457,854
Apache-2.0 License
795 Stars
2,316 Commits
579 Forks
16 Watchers
7 Branches
490 Contributors
Updated on May 29, 2025
Minified
Minified + Gzipped
Latest Version
0.47.0
Package Id
@opentelemetry/instrumentation-mysql@0.47.0
Unpacked Size
73.75 kB
Size
17.22 kB
File Count
21
NPM Version
lerna/6.6.2/node@v18.20.8+x64 (linux)
Node Version
18.20.8
Published on
May 15, 2025
Cumulative downloads
Total Downloads
Last Day
-9.9%
793,655
Compared to previous day
Last Week
-5.7%
4,452,918
Compared to previous week
Last Month
6.8%
19,319,127
Compared to previous month
Last Year
462.8%
140,457,854
Compared to previous year
1
This module provides automatic instrumentation for the mysql
module, which may be loaded using the @opentelemetry/sdk-trace-node
package and is included in the @opentelemetry/auto-instrumentations-node
bundle.
If total installation size is not constrained, it is recommended to use the @opentelemetry/auto-instrumentations-node
bundle with @opentelemetry/sdk-node for the most seamless instrumentation experience.
Compatible with OpenTelemetry JS API and SDK 1.0+
.
1npm install --save @opentelemetry/instrumentation-mysql
mysql
versions >=2.0.0 <3
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/sdk-trace-node'); 2const { MySQLInstrumentation } = require('@opentelemetry/instrumentation-mysql'); 3const { registerInstrumentations } = require('@opentelemetry/instrumentation'); 4 5const provider = new NodeTracerProvider(); 6provider.register(); 7 8registerInstrumentations({ 9 instrumentations: [ 10 new MySQLInstrumentation(), 11 ], 12})
See examples/mysql for a short example.
Options | Type | Default | Description |
---|---|---|---|
enhancedDatabaseReporting | boolean | false | If true, an attribute containing the query's parameters will be attached the spans generated to represent the query |
This package uses @opentelemetry/semantic-conventions
version 1.22+
, which implements Semantic Convention Version 1.7.0
Attributes collected:
Attribute | Short Description |
---|---|
db.connection_string | The connection string used to connect to the database. |
db.name | This attribute is used to report the name of the database being accessed. |
db.operation | The name of the operation being executed. |
db.statement | The database statement being executed. |
db.system | An identifier for the database management system (DBMS) product being used. |
db.user | Username for accessing the database. |
net.peer.name | Remote hostname or similar. |
net.peer.port | Remote port number. |
Apache 2.0 - See LICENSE for more information.
No vulnerabilities found.
Reason
update tool detected
Details
Reason
all changesets reviewed
Reason
30 commit(s) and 11 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
30 out of 30 merged PRs checked by a CI test -- score normalized to 10
Reason
project has 42 contributing companies or organizations
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 5
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
18 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-29T18:42:44Z
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