Код: Выделить всё
Chat request completed in 3.818780105999849Вот что у меня есть для конфигурации json:
Код: Выделить всё
{
"name": "end-to-end-response-time-shell",
"description": "Time duration of a chat request (in seconds).",
"filter": "resource.type=\"cloud_run_revision\" AND logName=\"log_name\" AND severity=\"INFO\" AND textPayload=~\"Chat request completed in\"",
"metricDescriptor": {
"name": "cloud_run_revision",
"type": "logging.googleapis.com/user/end-to-end-response-time-shell",
"metricKind": "CUMULATIVE",
"valueType": "DISTRIBUTION",
"unit": "s",
"description": "Time duration of a chat request (in seconds).",
"displayName": "end-to-end-response-time-shell (sec)"
},
"valueExtractor": "REGEXP_EXTRACT(textPayload, \"\\s(\\d+\\.*\\d*)\\s\")"
}
Код: Выделить всё
ERROR: (gcloud.logging.metrics.create) INVALID_ARGUMENT: Failed to parse extractor expression: syntax error at line 1, column 29, token '"\s(\d+\.*\d*)\s"'Подробнее здесь: https://stackoverflow.com/questions/786 ... onfig-json