Repository URL to install this package:
|
Version:
0.8.1 ▾
|
# Copyright (C) 2022, Supertenant Ltd. - All Rights Reserved.
# Generated by superconsts autogen, DO NOT EDIT!
try:
from typing import List # noqa: F401
except ImportError:
pass
RESOURCE_TYPES = {
"botoclient",
"celeryclient",
"celeryworker",
"custom",
"database",
"httpclient",
"httpserver",
"mongodb",
"mysql",
"postgresql",
"processtask",
"redis",
}
RESOURCE_TYPE_BOTO_CLIENT = "botoclient"
RESOURCE_TYPE_CELERY_CLIENT = "celeryclient"
RESOURCE_TYPE_CELERY_WORKER = "celeryworker"
RESOURCE_TYPE_CUSTOM = "custom"
RESOURCE_TYPE_GENERIC_DATABASE = "database"
RESOURCE_TYPE_HTTP_CLIENT = "httpclient"
RESOURCE_TYPE_HTTP_SERVER = "httpserver"
RESOURCE_TYPE_MONGODB = "mongodb"
RESOURCE_TYPE_MYSQL = "mysql"
RESOURCE_TYPE_POSTGRESQL = "postgresql"
RESOURCE_TYPE_PROCESSTASK = "processtask"
RESOURCE_TYPE_REDIS = "redis"
RESOURCE_TYPE_BOTO_CLIENT_LABELS = [
"aws.endpoint",
"aws.operation",
"aws.region",
"aws.s3.bucket",
"aws.s3.object.path",
"aws.sqs.queue.url",
"aws.sqs.queue_name",
"http.header",
"http.host",
"http.method",
"http.params",
"http.path",
"http.status_code",
] # type: List[str]
RESOURCE_TYPE_CELERY_CLIENT_LABELS = [
"celery.args",
"celery.broker_host",
"celery.broker_port",
"celery.broker_scheme",
"celery.exchange",
"celery.kwargs",
"celery.retry_reason",
"celery.routing_key",
"celery.success",
"celery.task",
"celery.task_id",
] # type: List[str]
RESOURCE_TYPE_CELERY_WORKER_LABELS = [
"celery.args",
"celery.broker_host",
"celery.broker_port",
"celery.broker_scheme",
"celery.exchange",
"celery.kwargs",
"celery.retry_reason",
"celery.routing_key",
"celery.success",
"celery.task",
"celery.task_id",
] # type: List[str]
RESOURCE_TYPE_CUSTOM_LABELS = [] # type: List[str]
RESOURCE_TYPE_GENERIC_DATABASE_LABELS = [
"db.database",
"db.host",
"db.port",
"db.statement",
"db.user",
] # type: List[str]
RESOURCE_TYPE_HTTP_CLIENT_LABELS = [
"http.header",
"http.host",
"http.method",
"http.params",
"http.path",
"http.status_code",
"http.user_agent",
] # type: List[str]
RESOURCE_TYPE_HTTP_SERVER_LABELS = [
"http.header",
"http.host",
"http.method",
"http.params",
"http.path",
"http.status_code",
"http.user_agent",
] # type: List[str]
RESOURCE_TYPE_MONGODB_LABELS = [
"db.collection",
"db.command",
"db.database",
"db.host",
"db.mongodb.collection",
"db.mongodb.command_json",
"db.mongodb.filter",
"db.port",
"db.replica_set",
] # type: List[str]
RESOURCE_TYPE_MYSQL_LABELS = ["db.database", "db.host", "db.port", "db.statement", "db.user"] # type: List[str]
RESOURCE_TYPE_POSTGRESQL_LABELS = ["db.database", "db.host", "db.port", "db.statement", "db.user"] # type: List[str]
RESOURCE_TYPE_PROCESSTASK_LABELS = ["argv", "envvar"] # type: List[str]
RESOURCE_TYPE_REDIS_LABELS = ["db.command", "db.database", "db.host", "db.port", "db.sub_commands"] # type: List[str]
RESOURCE_TYPE_BOTO_CLIENT_REJECT_ATTRIBUTES = [] # type: List[str]
RESOURCE_TYPE_CELERY_CLIENT_REJECT_ATTRIBUTES = [] # type: List[str]
RESOURCE_TYPE_CELERY_WORKER_REJECT_ATTRIBUTES = [] # type: List[str]
RESOURCE_TYPE_CUSTOM_REJECT_ATTRIBUTES = [] # type: List[str]
RESOURCE_TYPE_GENERIC_DATABASE_REJECT_ATTRIBUTES = [] # type: List[str]
RESOURCE_TYPE_HTTP_CLIENT_REJECT_ATTRIBUTES = ["http_rc"] # type: List[str]
RESOURCE_TYPE_HTTP_SERVER_REJECT_ATTRIBUTES = ["http_rc"] # type: List[str]
RESOURCE_TYPE_MONGODB_REJECT_ATTRIBUTES = ["code", "error_message"] # type: List[str]
RESOURCE_TYPE_MYSQL_REJECT_ATTRIBUTES = ["error_message", "sql_rc", "sql_state"] # type: List[str]
RESOURCE_TYPE_POSTGRESQL_REJECT_ATTRIBUTES = ["error_message", "sql_rc", "sql_state"] # type: List[str]
RESOURCE_TYPE_PROCESSTASK_REJECT_ATTRIBUTES = [] # type: List[str]
RESOURCE_TYPE_REDIS_REJECT_ATTRIBUTES = ["error_message"] # type: List[str]
RESOURCE_TYPES_LOADSHEDDING = {
"botoclient": {"http.status_code": ["429", "503"]},
"httpclient": {"http.status_code": ["429", "503"]},
"httpserver": {"http.status_code": ["429", "503"]},
}
LABELS_BY_RESOURCE_TYPE = {
"botoclient": [
"aws.endpoint",
"aws.operation",
"aws.region",
"aws.s3.bucket",
"aws.s3.object.path",
"aws.sqs.queue.url",
"aws.sqs.queue_name",
"http.header",
"http.host",
"http.method",
"http.params",
"http.path",
"http.status_code",
],
"celeryclient": [
"celery.args",
"celery.broker_host",
"celery.broker_port",
"celery.broker_scheme",
"celery.exchange",
"celery.kwargs",
"celery.retry_reason",
"celery.routing_key",
"celery.success",
"celery.task",
"celery.task_id",
],
"celeryworker": [
"celery.args",
"celery.broker_host",
"celery.broker_port",
"celery.broker_scheme",
"celery.exchange",
"celery.kwargs",
"celery.retry_reason",
"celery.routing_key",
"celery.success",
"celery.task",
"celery.task_id",
],
"custom": [],
"database": ["db.database", "db.host", "db.port", "db.statement", "db.user"],
"httpclient": [
"http.header",
"http.host",
"http.method",
"http.params",
"http.path",
"http.status_code",
"http.user_agent",
],
"httpserver": [
"http.header",
"http.host",
"http.method",
"http.params",
"http.path",
"http.status_code",
"http.user_agent",
],
"mongodb": [
"db.collection",
"db.command",
"db.database",
"db.host",
"db.mongodb.collection",
"db.mongodb.command_json",
"db.mongodb.filter",
"db.port",
"db.replica_set",
],
"mysql": ["db.database", "db.host", "db.port", "db.statement", "db.user"],
"postgresql": ["db.database", "db.host", "db.port", "db.statement", "db.user"],
"processtask": ["argv", "envvar"],
"redis": ["db.command", "db.database", "db.host", "db.port", "db.sub_commands"],
}