| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#### Проблема
Из TOptsParseResult сейчас невозможно понять, какую команду вызвали.
Существует метод [GetProgrammName](https://nda.ya.ru/t/SdJXhPQC7NczPm, который частично решает эту задачу, однако:
1. Его поведение зависит от флага [PrintShortCommandInUsage](https://nda.ya.ru/t/3sh6_wPV7NczPt Выставление флага меняет вывод `help`
2. Даже с флагом метод отдает одну строку вместе с запускаемым бинарем. Если хочется отделить только submod'ы, то эту строку приходится сплитить.
#### Решение
Добавил всюду где нужно InvocationParts, которые заполняются по ходу парсинга входных аргументов. В конечном итоге эти parts передаются в TOptsParseResult, откуда могут быть получены вызывающей стороной.
commit_hash:4cf72141552793b19a725b3d394b81215508b85f
|
| |
|
|
|
|
|
| |
В продолжение <https://nda.ya.ru/t/Zv2eRt4A7Ncwc7>
Поддерживаем контракт в env.cpp (используется в BinaryPath), т.к. он тоже строит из `env.json.txt` окружение и при обнаружении Null падает
commit_hash:6d01c031662f29c665a54fe4f4036a3bf7dea99a
|
| |
|
|
| |
commit_hash:85eaf10c25d47cdfa012339dfc2c7d054754d12a
|
| |
|
|
|
| |
After this, it becomes possible to zerodiff replace thread\_local variables with generic local values. Replace default TThreadLocal with generic will lead to it's destruction on thread exit, but it seems to be more correct behavior (e.g., avoid leaks on thread pool restart).
commit_hash:6e5a0908ca239c1bac3ce6ba47de9e53290d6211
|
| |
|
|
| |
commit_hash:11905e9c07bac938a838c340f99a05579e2f5b5c
|
| |
|
|
| |
commit_hash:44faaa78b7fe05dab4c716202becad3c8beed79a
|
| |
|
|
| |
commit_hash:87bdc41e776a8f4e0bfdf3b47804055a1e62c9ee
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
**Summary**
Реализован новый входной плагин `agent_logs` для отправки логов самого агента в пайплайн unified\_agent. Это решает проблему доступа к логам агента в production окружении, где требовались права System developer для доступа к файлам на дисках.
## **What's Changed** {#whats-changed}
### **New Plugin: `agent_logs_input`** {#new-plugin-agent_logs_input}
Добавлен новый входной плагин, который:
* Перехватывает логи агента через кастомный `TLogBackend`
* Отправляет логи в пайплайн стриммингово (не пулингом)
* Поддерживает фильтрацию по уровню логов (настройка **level**, по умолчанию `NOTICE`)
### **Implementation Details** {#implementation-details}
**Основные компоненты:**
1. **TAgentLogsBackend** - кастомный log backend:
* Наследуется от `TLogBackend`
* Перехватывает все логи агента через метод `WriteData()`
* Фильтрует логи по приоритету
* Отправляет отфильтрованные логи в `IMessageConsumer`
* Поддерживает graceful stop
2. **TPlugin** - основной класс плагина:
* Управляет lifecycle плагина
* Создает сессию с ID `agent_logs`
* Передает конфигурацию в session handler
3. **TSessionHandler** - обработчик сессии:
* Создает и регистрирует `TAgentLogsBackend`
* Добавляет backend в глобальный logger через `AddLog()`
* Управляет остановкой backend'а
**Пример конфигурации:**
```
routes:
- input:
plugin: agent_logs
config:
level: INFO
channel:
pipe:
- filter:
plugin: format_otel_logs
output:
# https://nda.ya.ru/t/YexxO8Qf7NZMzy
plugin: otel_logs
config:
url: "collector.logs.yandex-team.ru:443"
project: hobbit_test_project
service: logs
# https://nda.ya.ru/t/o4MQT5rI7NZMzz
oauth:
secret:
env: TEST_LOGS_OAUTH
agent_log:
priority: INFO
rate_limit_bytes: 100000
```
commit_hash:c6f115ab98c30a47845ce9f9f8a58ef89973d422
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current TThreadLocal implementation doesn't destroy objects on thread exit (so we can't replace thread\_local tls value with it, and with TGenericLocalValue too), standard thread\_local values can't be class members. So try to reimplement TThreadLocalValue:
- instead of adressing by thread id, address objects by uniq object id in thread\_local deque of all objects of current type;
- use hashmap of all existing perthread deques to destroy objects with their TThreadLocal;
- try to make object ids flat;
- no complex lookup inside and no contention between tls.Get calls;
- ShortLivedThreads ut now works;
- some fixes in Trace ut, make threads outlive tls value;
- benchmark results <https://nda.ya.ru/t/agWa9PW67NYAAK>, looks better than all others;
- probably should switch to this implementation by default and remove old.
commit_hash:262ce4d363751f577373a452a0c2c84d1fe5b79c
|
| |
|
|
| |
commit_hash:d1d3470945b75209c60933934938e65e6d2e5c6f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Проблема:
Сегментация через ~42 секунды после запуска UA в ServiceConfigParser::GetParserIndex("retry").
Причина:
Static Initialization Order Fiasco + Lazy Initialization в gRPC CoreConfiguration.
RetryFilter пытается получить парсер до того, как CoreConfiguration зарегистрировала его.
Решение:
1. Устанавливаем лимиты потоков ДО grpc_init() (статические параметры)
2. Явно вызываем grpc_init() для гарантии выполнения всех статических инициализаторов
3. Принудительно инициализируем CoreConfiguration через CoreConfiguration::Get()
Это гарантирует порядок:
- Настройка лимитов потоков
- Инициализация библиотеки gRPC
- Построение CoreConfiguration с регистрацией всех парсеров
- Только после этого фильтры могут безопасно использовать retry парсер
Изменения:
- library/cpp/unified_agent_client/grpc_io.cpp: Исправлена EnsureGrpcConfigured()
- tests/ut/grpc_init_ut.cpp: Добавлены unit тесты
- tests/grpc_init_check/: Standalone тестовая программа
- tests/ut/ya.make: Интеграция тестов в систему сборки
Все тесты прошли: 640/640 OK
commit_hash:ed4601dfe21f6dfac653dec6e9c3e535e5a0a09c
|
| |
|
|
| |
commit_hash:856a8b4b61af064aec80aa907e2784f9d4ffce61
|
| |
|
|
| |
commit_hash:841cd252299527798d4943b3e845ac997c059ac8
|
| |
|
|
| |
commit_hash:cc357d273b7ce5c911d194dd51fae5668877693c
|
| |
|
|
| |
commit_hash:75d52d415f51a89383bdbe69eb4bacf9285ebd8f
|
| |
|
|
| |
commit_hash:35721aabcf5384a781bf026ad6dc365e2aa64426
|
| |
|
|
| |
commit_hash:83dda252d4be350031caade9e138ba8e91930836
|
| |
|
|
| |
commit_hash:7178f5732d2f485b1dc0b510f71e3db6c038dd23
|
| |
|
|
| |
commit_hash:0321f6681dac1a0ba38394a66471582be1909c29
|
| |
|
|
| |
commit_hash:9c12a10680e9747d55895676d6a299dd0ddfd8a8
|
| |
|
|
| |
commit_hash:5146c201b1a586d9cee2ed1495545fe4708a9fd1
|
| |
|
|
| |
commit_hash:3436f18ce66beb90bf8f89a674e715ac4b9a1098
|
| |
|
|
|
|
|
| |
method
[library/cpp/scheme] Add const GetNoAdd methods, move return value in Delete method
commit_hash:94e4b516948789e0092e2d88f2e3d1079da2b99a
|
| |
|
|
| |
commit_hash:f5f4e6f04728a8e4dd9d6e5e5ae7a0f12e5f45d0
|
| |
|
|
| |
commit_hash:b9ffae1ce4077a1f26ccbd0abf0596cae292d225
|
| |
|
|
| |
commit_hash:7abb65476f64901a307ac3770777764808d7265d
|
| |
|
|
| |
commit_hash:27b70d710c76793e58a4ed81dcd053907e389d85
|
| |
|
|
| |
commit_hash:348f2fb14a4a93cfa3c8504419d021c1f41e4b8f
|
| |
|
|
| |
commit_hash:ac2fc180178c71b225b0ae90af727b3fe2459110
|
| |
|
|
| |
commit_hash:72977e13820ded4a38d19076b1d336c9bb910dbf
|
| |
|
|
| |
commit_hash:7184cfb50e2b9c88c16d93db41dd051068b21695
|
| |
|
|
| |
commit_hash:f0c46523593c7b73b313968e01da242b16bd0298
|
| |
|
|
| |
commit_hash:8d2c18bc697b0b931821332d770b34ce51313ce6
|
| |
|
|
| |
commit_hash:bc614722ddb5b656411aa602c935afad57c7acdd
|
| |
|
|
| |
commit_hash:fd060b334bdeb27f6f363b19840397ac4b145f68
|
| |
|
|
| |
commit_hash:a3736570695184ad17b24a2a6da642132020197c
|
| |
|
|
|
| |
Fixed range construction from span
commit_hash:a7b4b66073a1d5ea79abc304966494b1e9543919
|
| |
|
|
| |
commit_hash:007eb2da67fd2040e9eb9d53e860fca34d075712
|
| |
|
|
| |
commit_hash:c920cb528ec19c550350408b68ed5e2ac781f375
|
| |
|
|
| |
commit_hash:877204cca8999f10cdc5edfa1a2297e2a0292d71
|
| |
|
|
|
| |
Find может делать Promote, который мутирует List ( LRUList например: <https://nda.ya.ru/t/fFSNn0ML7LRudF> )
commit_hash:dca1db67d45c7faca51cc1251cbe155c7857e362
|
| |
|
|
| |
commit_hash:e93b9ad8b27da3da2372b00bf59ae87a98d0b862
|
| |
|
|
| |
commit_hash:013178051e5e4c0a99ded31893069fb928ba18f9
|
| |
|
|
| |
commit_hash:9d9f0cc89424b60fbdf176953e5e0782e3a9cd3d
|
| |
|
|
| |
commit_hash:5be5816fa0d06087b51636b3acfaf53350e750da
|
| |
|
|
| |
commit_hash:17b4088b80f1a7446525ed8eebf0566b3e3a7888
|
| |
|
|
| |
commit_hash:953fbbbb13b2ce6538a41da042f04cbb8610619c
|
| |
|
|
| |
commit_hash:d7aa6614e2ad37c30d381ce47580aabb7a15a595
|
| |
|
|
| |
commit_hash:28e7005fc310c73dc481414ec957dcf4d836fb49
|
| |
|
|
| |
commit_hash:750c9e900f9b56e84ebbac73a0dd8b987d76cb47
|