Repository URL to install this package:
|
Version:
0.8.1-dev ▾
|
// Copyright (C) 2022, Supertenant Ltd. - All Rights Reserved.
// Generated by superconsts autogen, DO NOT EDIT!
'use strict';
/** @enum{string} */
exports.ResourceType =
/** @enum{string} */
{
BotoClient: 'botoclient',
CeleryClient: 'celeryclient',
CeleryWorker: 'celeryworker',
Custom: 'custom',
GenericDatabase: 'database',
HttpClient: 'httpclient',
HttpServer: 'httpserver',
Mongodb: 'mongodb',
Mysql: 'mysql',
Postgresql: 'postgresql',
Processtask: 'processtask',
Redis: 'redis'
};
/** @enum{{label: string, values: (string | number)[]}} */
exports.ResourceTypeLoadShedding =
/** @enum{{label: string, values: (string | number)[]}} */
{
BotoClient: {
label: 'http.status_code',
values: ['429', '503']
},
HttpClient: {
label: 'http.status_code',
values: ['429', '503']
},
HttpServer: {
label: 'http.status_code',
values: ['429', '503']
}
};
/** @type {string[]} */
exports.ResourceTypes = [
'httpserver',
'httpclient',
'botoclient',
'celeryclient',
'celeryworker',
'mongodb',
'postgresql',
'mysql',
'redis',
'database',
'processtask',
'custom'
];
/** @type {{[id: string]: string[]}} */
exports.LabelsByResourceType =
/** @type {{[id: string]: string[]}} */
{
botoclient: [
'http.path',
'http.method',
'http.host',
'http.status_code',
'http.params',
'http.header',
'aws.operation',
'aws.region',
'aws.endpoint',
'aws.s3.bucket',
'aws.s3.object.path',
'aws.sqs.queue_name',
'aws.sqs.queue.url'
],
celeryclient: [
'celery.task',
'celery.task_id',
'celery.routing_key',
'celery.exchange',
'celery.success',
'celery.retry_reason',
'celery.broker_scheme',
'celery.broker_host',
'celery.broker_port',
'celery.args',
'celery.kwargs'
],
celeryworker: [
'celery.task',
'celery.task_id',
'celery.routing_key',
'celery.exchange',
'celery.success',
'celery.retry_reason',
'celery.broker_scheme',
'celery.broker_host',
'celery.broker_port',
'celery.args',
'celery.kwargs'
],
custom: [],
database: ['db.user', 'db.statement', 'db.database', 'db.host', 'db.port'],
httpclient: [
'http.path',
'http.method',
'http.host',
'http.status_code',
'http.params',
'http.header',
'http.user_agent'
],
httpserver: [
'http.path',
'http.method',
'http.host',
'http.status_code',
'http.params',
'http.header',
'http.user_agent'
],
mongodb: [
'db.database',
'db.host',
'db.port',
'db.command',
'db.mongodb.command_json',
'db.mongodb.filter',
'db.collection',
'db.mongodb.collection',
'db.replica_set'
],
mysql: ['db.user', 'db.statement', 'db.database', 'db.host', 'db.port'],
postgresql: ['db.user', 'db.statement', 'db.database', 'db.host', 'db.port'],
processtask: ['argv', 'envvar'],
redis: ['db.database', 'db.host', 'db.port', 'db.command', 'db.sub_commands']
};
/** @type {{[id: string]: string[]}} */
exports.RejectAttributesByResourceType =
/** @type {{[id: string]: string[]}} */
{
botoclient: [],
celeryclient: [],
celeryworker: [],
custom: [],
database: [],
httpclient: ['http_rc'],
httpserver: ['http_rc'],
mongodb: ['code', 'error_message'],
mysql: ['sql_rc', 'error_message', 'sql_state'],
postgresql: ['sql_rc', 'error_message', 'sql_state'],
processtask: [],
redis: ['error_message']
};
exports.default = {
ResourceType: exports.ResourceType,
ResourceTypeLoadShedding: exports.ResourceTypeLoadShedding,
ResourceTypes: exports.ResourceTypes,
LabelsByResourceType: exports.LabelsByResourceType,
RejectAttributesByResourceType: exports.RejectAttributesByResourceType
};