File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
packages/instrumentation-mysql/src Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ import {
44
44
} from './utils' ;
45
45
/** @knipignore */
46
46
import { PACKAGE_NAME , PACKAGE_VERSION } from './version' ;
47
- import { UpDownCounter , MeterProvider } from '@opentelemetry/api' ;
47
+ import { UpDownCounter } from '@opentelemetry/api' ;
48
48
49
49
type getConnectionCallbackType = (
50
50
err : mysqlTypes . MysqlError ,
@@ -59,15 +59,9 @@ export class MySQLInstrumentation extends InstrumentationBase<MySQLInstrumentati
59
59
60
60
constructor ( config : MySQLInstrumentationConfig = { } ) {
61
61
super ( PACKAGE_NAME , PACKAGE_VERSION , config ) ;
62
- this . _setMetricInstruments ( ) ;
63
62
}
64
63
65
- override setMeterProvider ( meterProvider : MeterProvider ) {
66
- super . setMeterProvider ( meterProvider ) ;
67
- this . _setMetricInstruments ( ) ;
68
- }
69
-
70
- private _setMetricInstruments ( ) {
64
+ protected override _updateMetricInstruments ( ) {
71
65
this . _connectionsUsage = this . meter . createUpDownCounter (
72
66
'db.client.connections.usage' , //TODO:: use semantic convention
73
67
{
You can’t perform that action at this time.
0 commit comments