Skip to content

Commit 7bcd768

Browse files
authored
chore(instrumentation-mysql): use the intended _updateMetricInstruments (#2938)
1 parent 74ddb1e commit 7bcd768

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

packages/instrumentation-mysql/src/instrumentation.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import {
4444
} from './utils';
4545
/** @knipignore */
4646
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
47-
import { UpDownCounter, MeterProvider } from '@opentelemetry/api';
47+
import { UpDownCounter } from '@opentelemetry/api';
4848

4949
type getConnectionCallbackType = (
5050
err: mysqlTypes.MysqlError,
@@ -59,15 +59,9 @@ export class MySQLInstrumentation extends InstrumentationBase<MySQLInstrumentati
5959

6060
constructor(config: MySQLInstrumentationConfig = {}) {
6161
super(PACKAGE_NAME, PACKAGE_VERSION, config);
62-
this._setMetricInstruments();
6362
}
6463

65-
override setMeterProvider(meterProvider: MeterProvider) {
66-
super.setMeterProvider(meterProvider);
67-
this._setMetricInstruments();
68-
}
69-
70-
private _setMetricInstruments() {
64+
protected override _updateMetricInstruments() {
7165
this._connectionsUsage = this.meter.createUpDownCounter(
7266
'db.client.connections.usage', //TODO:: use semantic convention
7367
{

0 commit comments

Comments
 (0)