1
0
Форкнуть 0

chore(conventions): use semantic-conventions (#55)

This commit is contained in:
Mark Wolff 2020-07-14 18:22:12 -04:00 коммит произвёл GitHub
Родитель c99916ac73
Коммит f86645637a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 41 добавлений и 21 удалений

Просмотреть файл

@ -24,12 +24,29 @@
"url": "https://github.com/microsoft/opentelemetry-azure-monitor-js"
},
"devDependencies": {
"@types/mocha": "^7.0.2",
"@types/node": "^14.0.14",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"c8": "^7.2.0",
"eslint": "^6.8.0",
"eslint-config-airbnb-typescript": "^7.2.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"lerna": "^3.22.1",
"mocha": "^7.2.0",
"nock": "^13.0.0",
"prettier": "^2.0.2",
"rimraf": "^3.0.2",
"sinon": "^9.0.1",
"ts-mocha": "^7.0.0",
"typescript": "^3.9.5"
},
"dependencies": {
"@opentelemetry/api": "^0.9.0",
"@opentelemetry/core": "^0.9.0",
"@opentelemetry/semantic-conventions": "^0.9.0",
"@opentelemetry/tracing": "^0.9.0"
},
"sideEffects": false,

Просмотреть файл

@ -1,13 +1,13 @@
// required by https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-semantic-conventions.md#databases-client-calls
export const COMPONENT = 'component';
export const DB_TYPE = 'db.type';
export const DB_INSTANCE = 'db.instance';
export const DB_STATEMENT = 'db.statement';
export const PEER_ADDRESS = 'peer.address';
export const PEER_HOSTNAME = 'peer.host';
import * as conventions from '@opentelemetry/semantic-conventions';
export const { DB_TYPE } = conventions.DatabaseAttribute;
export const { DB_INSTANCE } = conventions.DatabaseAttribute;
export const { DB_STATEMENT } = conventions.DatabaseAttribute;
export const PEER_ADDRESS = conventions.GeneralAttribute.NET_PEER_ADDRESS;
export const PEER_HOSTNAME = conventions.GeneralAttribute.NET_PEER_HOSTNAME;
// Optionals
export const PEER_PORT = 'peer.port';
export const PEER_IPV4 = 'peer.ipv4';
export const PEER_IPV6 = 'peer.ipv6';
export const PEER_SERVICE = 'peer.service';
export const PEER_PORT = conventions.GeneralAttribute.NET_PEER_PORT;
export const PEER_IPV4 = conventions.GeneralAttribute.NET_PEER_IPV4;
export const PEER_IPV6 = conventions.GeneralAttribute.NET_PEER_IPV6;
export const PEER_SERVICE = conventions.GeneralAttribute.NET_PEER_SERVICE;

Просмотреть файл

@ -1,6 +1,7 @@
export const COMPONENT = 'component';
export const GRPC_KIND = 'grpc.kind';
export const GRPC_METHOD = 'grpc.method';
export const GRPC_STATUS_CODE = 'grpc.status_code';
export const GRPC_ERROR_NAME = 'grpc.error_name';
export const GRPC_ERROR_MESSAGE = 'grpc.error_message';
import * as conventions from '@opentelemetry/semantic-conventions';
export const { GRPC_KIND } = conventions.RpcAttribute;
export const { GRPC_METHOD } = conventions.RpcAttribute;
export const { GRPC_STATUS_CODE } = conventions.RpcAttribute;
export const { GRPC_ERROR_NAME } = conventions.RpcAttribute;
export const { GRPC_ERROR_MESSAGE } = conventions.RpcAttribute;

Просмотреть файл

@ -1,4 +1,6 @@
export const HTTP_METHOD = 'http.method';
export const HTTP_URL = 'http.url';
export const HTTP_ROUTE = 'http.route';
export const HTTP_STATUS_CODE = 'http.status_code';
import * as conventions from '@opentelemetry/semantic-conventions';
export const { HTTP_METHOD } = conventions.HttpAttribute;
export const { HTTP_URL } = conventions.HttpAttribute;
export const { HTTP_ROUTE } = conventions.HttpAttribute;
export const { HTTP_STATUS_CODE } = conventions.HttpAttribute;