Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
encourage using abbreviations in names
  • Loading branch information
gengliangwang committed Apr 3, 2024
commit 33968dc0febe57fa66e8a327848480a34ca6cf9f
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LogKeys serve as identifiers for mapped diagnostic contexts (MDC) within logs. F
* Define all structured logging keys in `LogKey.scala`, and sort them alphabetically for ease of search.
* Use `UPPER_SNAKE_CASE` for key names.
* Key names should be both simple and broad, yet include specific identifiers like `STAGE_ID`, `TASK_ID`, and `JOB_ID` when needed for clarity. For instance, use `MAX_ATTEMPTS` as a general key instead of creating separate keys for each scenario such as `EXECUTOR_STATE_SYNC_MAX_ATTEMPTS` and `MAX_TASK_FAILURES`. This balances simplicity with the detail needed for effective logging.
* Avoid abbreviations in names. Use `APPLICATION_ID` instead of `APP_ID`.
* Use abbreviations in names if they are widely understood, such as `APP_ID` for APPLICATION_ID, and `K8S` for KUBERNETES.

## Exceptions

Expand Down