File tree Expand file tree Collapse file tree 5 files changed +32
-4
lines changed
plugins/node/opentelemetry-instrumentation-pg Expand file tree Collapse file tree 5 files changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ import {
6565 METRIC_DB_CLIENT_OPERATION_DURATION ,
6666 ATTR_DB_NAMESPACE ,
6767 ATTR_DB_OPERATION_NAME ,
68- } from '@opentelemetry/semantic-conventions/incubating ' ;
68+ } from './semconv ' ;
6969
7070export class PgInstrumentation extends InstrumentationBase < PgInstrumentationConfig > {
7171 private _operationDuration ! : Histogram ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright The OpenTelemetry Authors
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ export const ATTR_DB_CLIENT_CONNECTION_POOL_NAME =
18+ 'db.client.connection.pool.name' ;
19+ export const ATTR_DB_CLIENT_CONNECTION_STATE = 'db.client.connection.state' ;
20+ export const ATTR_DB_NAMESPACE = 'db.namespace' ;
21+ export const ATTR_DB_OPERATION_NAME = 'db.operation.name' ;
22+ export const DB_CLIENT_CONNECTION_STATE_VALUE_USED = 'used' ;
23+ export const DB_CLIENT_CONNECTION_STATE_VALUE_IDLE = 'idle' ;
24+ export const METRIC_DB_CLIENT_CONNECTION_COUNT = 'db.client.connection.count' ;
25+ export const METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS =
26+ 'db.client.connection.pending_requests' ;
27+ export const METRIC_DB_CLIENT_OPERATION_DURATION =
28+ 'db.client.operation.duration' ;
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ import {
4242 ATTR_DB_CLIENT_CONNECTION_STATE ,
4343 DB_CLIENT_CONNECTION_STATE_VALUE_USED ,
4444 DB_CLIENT_CONNECTION_STATE_VALUE_IDLE ,
45- } from '@opentelemetry/semantic-conventions/incubating ' ;
45+ } from './semconv ' ;
4646import {
4747 PgClientExtended ,
4848 PostgresCallback ,
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ import {
5555 METRIC_DB_CLIENT_CONNECTION_COUNT ,
5656 METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS ,
5757 METRIC_DB_CLIENT_OPERATION_DURATION ,
58- } from '@opentelemetry/semantic-conventions/incubating ' ;
58+ } from '../src/semconv ' ;
5959
6060const memoryExporter = new InMemorySpanExporter ( ) ;
6161
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ import {
5656import {
5757 METRIC_DB_CLIENT_OPERATION_DURATION ,
5858 ATTR_DB_OPERATION_NAME ,
59- } from '@opentelemetry/semantic-conventions/incubating ' ;
59+ } from '../src/semconv ' ;
6060import { addSqlCommenterComment } from '@opentelemetry/sql-common' ;
6161
6262const memoryExporter = new InMemorySpanExporter ( ) ;
You can’t perform that action at this time.
0 commit comments