clean-arch-observability
/clean-arch-observability
Pilnuje logowania i analityki w funkcji Fluttera: poziomy logów, czego nie logować, błędy globalne i identyfikatory stron oraz przycisków.
- Autor
- aissaserrar ↗
- Repozytorium
- flutter-clean-arch-plugin ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 31.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 31.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Pilnuje logowania i analityki w funkcji Fluttera: poziomy logów, czego nie logować, błędy globalne i identyfikatory stron oraz przycisków.
Oryginalny opis (EN)
Use when adding or reviewing logging or analytics in a Flutter feature: log levels, what to log and not to log, global uncaught-exception logging, which levels to upload per environment, and analytics ids for pages and buttons (<feature>_ids.dart, <Feature>AnalyticsId).
Jak działa
- Logging
- Analytics
- Checklist before finishing
Podgląd SKILL.md
---
name: clean-arch-observability
description: Use when adding or reviewing logging or analytics in a Flutter feature: log levels, what to log and not to log, global uncaught-exception logging, which levels to upload per environment, and analytics ids for pages and buttons (<feature>_ids.dart, <Feature>AnalyticsId).
---
# Logging and analytics rules
## Logging
Use the shared logger from `core/logging`. Never `print`.
### What to log
- **Expected exceptions, when you catch them** (for example an external library that throws instead of returning errors): log in the `catch` block.
- **Unexpected uncaught exceptions:** one global mechanism logs them all (`FlutterError.onError`, `PlatformDispatcher.instance.onError`, and a guarded zone). Do not rely on each feature to do it.
- **Traces that let you follow what the user did:** every navigation, and the lifecycle of business processes (start and end of a tracked activity, for example).
### What never to log
- Personal information (an email address is the one allowed exception).
- Secrets: passwords, keys, tokens, and so on.
### Levels
| Level | Use for |
|---|---|
| **Fine** | Normal situation, used for debugging on a test environment |
| **Info** | Normal situation, used to follow user actions in production |
| **Warning** | Abnormal but expected situation (network error, validation error) |
| **Severe** | Unexpected situation (unknown server error, unexpected exception) |
### What to upload
| Environment | Upload |
|---|---|
| Test | Fine, Info, Warning, Severe |
| Production | Info, Warning, Severe |
### Avoid noise
Do not log actions that are automatic and frequent (a timer every 5 seconds) each time: it makes logs unreadable and exhausts logging quotas. Temporary Fine logs for debugging one feature are fine.
## Analytics
### Ids live with the feature
Define ids per feature in `<feature_name>_ids.dart`, in the feature's root folder, as a `<FeatureName>AnalyticsId` class.
### Pages
Assign an id to every page. Define them as static strings at the top of the class:
- `page = '<FeatureName>Page'`
- `<pageName>Page = '<FeatureName><PageName>Page'`
### Buttons and other clickable elements
Assign an id to every button and clickable element. Define them below the page ids, as static fields or methods, as `AnalyticsId` instances:
- `<action>Button = AnalyticsId('<Action>Button', page)`
- `<action>Button(String page) => AnalyticsId('<Action>Button', page)` when a multi-page feature has name conflicts
```dart
// features/transfers/transfers_ids.dart
abstract final class TransfersAnalyticsId {
static const page = 'TransfersPage';
static const detailsPage = 'TransfersDetailsPage';
static const submitButton = AnalyticsId('SubmitButton', page);
static AnalyticsId cancelButton(String page) => AnalyticsId('CancelButton', page);
}
```
## Checklist before finishing
- [ ] Caught expected exceptions are logged; none are swallowed silently
- [ ] No sensitive data in log messages
- [ ] Correct level per message; levels uploaded per environment
- [ ] Navigation traces exist
- [ ] `<feature>_ids.dart` has the page ids and an id for every button
Wersje
W bazie nie ma innych skilli o nazwie clean-arch-observability.
Migawka bazy z 13.11.2026 · wersja paczki 6dfd4be3b3a5 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100logging-guide
Wdraża ustrukturyzowane logowanie z właściwymi poziomami logów i ochroną danych wrażliwych, przy dodawaniu logów, debugowaniu i budowie obserwowalności. - 100clean-arch-di-routing
Podłącza funkcję Fluttera do aplikacji: providery, wstrzykiwanie zależności, trasy i strażników, flavory i mocki w Clean Architecture. - 100clean-arch-domain
Tworzy warstwę domenową funkcji Fluttera: encje, interfejsy repozytoriów, przypadki użycia i błędy domenowe, z zasadami zależności. - 100dotnet-source-generated-logging
Pisze logi .NET generatorem źródeł LoggerMessage dla wywołań ILogger: szablony komunikatów, poziomy logowania, identyfikatory zdarzeń, logowanie wyjątków i zakresy. - 100logging-standards
Ustala standardy ustrukturyzowanego logowania: poziomy, pola strukturalne, identyfikatory korelacji, maskowanie danych osobowych i nazewnictwo zdarzeń, z przykładami w structlog i ujściem OTLP. - 100logging-standards
Ustala standardy logowania: co, kiedy i w jakim formacie logować, czego nie logować (dane osobowe, sekrety), konfigurację Pino, korelację żądań, logowanie błędów frontendu, CloudWatch i integrację z Sentry.