/
githubmirror
/
opentelemetry-collector-contrib
Обзор
Документация
Войти
/
githubmirror
/
opentelemetry-collector-contrib
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
processor/transformprocessor/testdata/config.yaml
120 строк
4 KB
lkwronski
[processor/transform] Add common where clause (#31491)
10 май 2024, 01:06
Не верифицирован
10 май 2024, 01:06
a4b0e59
Код
Авторство
О чём код?
transform: trace_statements: - context: span statements: - set(name, "bear") where attributes["http.path"] == "/animal" - keep_keys(attributes, ["http.method", "http.path"]) - context: resource statements: - set(attributes["name"], "bear") metric_statements: - context: datapoint statements: - set(metric.name, "bear") where attributes["http.path"] == "/animal" - keep_keys(attributes, ["http.method", "http.path"]) - context: resource statements: - set(attributes["name"], "bear") log_statements: - context: log statements: - set(body, "bear") where attributes["http.path"] == "/animal" - keep_keys(attributes, ["http.method", "http.path"]) - context: resource statements: - set(attributes["name"], "bear") transform/with_conditions: trace_statements: - context: span conditions: - attributes["http.path"] == "/animal" statements: - set(name, "bear") metric_statements: - context: datapoint conditions: - attributes["http.path"] == "/animal" statements: - set(metric.name, "bear") log_statements: - context: log conditions: - attributes["http.path"] == "/animal" statements: - set(body, "bear") transform/ignore_errors: error_mode: ignore trace_statements: - context: resource statements: - set(attributes["name"], "bear") transform/bad_syntax_log: log_statements: - context: log statements: - set(body, "bear" where attributes["http.path"] == "/animal" - keep_keys(attributes, ["http.method", "http.path"]) transform/bad_syntax_metric: metric_statements: - context: datapoint statements: - set(name, "bear" where attributes["http.path"] == "/animal" - keep_keys(attributes, ["http.method", "http.path"]) transform/bad_syntax_trace: trace_statements: - context: span statements: - set(name, "bear" where attributes["http.path"] == "/animal" - keep_keys(attributes, ["http.method", "http.path"]) transform/bad_syntax_multi_signal: trace_statements: - context: span statements: - set(name, "bear" where attributes["http.path"] == "/animal" - keep_keys(attributes, ["http.method", "http.path"]) metric_statements: - context: datapoint statements: - set(name, "bear" where attributes["http.path"] == "/animal" - keep_keys(attributes, ["http.method", "http.path"]) log_statements: - context: log statements: - set(body, "bear" where attributes["http.path"] == "/animal" - keep_keys(attributes, ["http.method", "http.path"]) transform/unknown_function_log: log_statements: - context: log statements: - set(body, "bear") where attributes["http.path"] == "/animal" - not_a_function(attributes, ["http.method", "http.path"]) transform/unknown_function_metric: metric_statements: - context: datapoint statements: - set(metric.name, "bear") where attributes["http.path"] == "/animal" - not_a_function(attributes, ["http.method", "http.path"]) transform/unknown_function_trace: trace_statements: - context: span statements: - set(name, "bear") where attributes["http.path"] == "/animal" - not_a_function(attributes, ["http.method", "http.path"]) transform/unknown_context: trace_statements: - context: test statements: - set(name, "bear") where attributes["http.path"] == "/animal" transform/unknown_error_mode: error_mode: test