grpc/tools/distrib
AJ Heller c9fdef1317 [logging] Centralize configuration for trace flags (#36576)
All TraceFlags are now configured in `src/core/lib/debug/trace_flags.yaml`. The format is:

```
my_flag:
  default: false                   # the default value; default=false
  description: Some Description
  debug_only: false                # debug_only flags only work in debug builds; default=false
  internal: false                  # internal flags will not show up in documentation; default=false
```

To regenerate the trace flag source code, run `tools/codegen/core/gen_trace_flags.py` (requires mako). This script is also run when sanity checking.

This PR also adds two new features:

### Glob-based flag configuration

Trace flag configuration now supports `?` (single wildcard character) and `*` (one or more wildcard characters).  For example, using `GRPC_TRACE='event_engine*'` will enable all flags that match that glob. It expands to:

* event_engine
* event_engine_client_channel_resolver
* event_engine_dns
* event_engine_endpoint
* event_engine_endpoint_data
* event_engine_poller

### A cleaner trace-logging macro in abseil logging format

If your goal is only to add log statements when the `fault_injection_filter` trace flag is enabled, you can use the macro:

```
GRPC_TRACE_LOG(fault_injection, INFO) << "Filtered:" << 42;
```

When the trace flag is enabled, the the log will show something like this:
```
I0000 00:00:1715733657.430042      16 file.cc:174] Filtered:42
```

----

Note: just like with the gpr_log to abseil logging conversion, the pre-existing trace logging usages can be replaced with the new tracing macro across multiple PRs.

Closes #36576

PiperOrigin-RevId: 641295215
2024-06-07 10:47:38 -07:00
..
c-ish [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
docgen use internal release_open_source.py script to commit changes and create PR (#29686) 2022-05-16 09:17:34 +02:00
python [Release] Bump version to 1.65.0-dev (on master branch) (#36544) 2024-05-06 14:41:36 -07:00
add-iwyu.py [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
bazel_style.cfg Revert "Merge pull request #18912 from grpc/revert-bazel-changes" 2019-04-30 11:17:11 -07:00
black_code.sh [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
buildifier_format_code.sh Make Buildifier Sanity Test Strict (#27807) 2021-11-03 14:57:04 -07:00
buildifier_format_code_strict.sh Make Buildifier Sanity Test Strict (#27807) 2021-11-03 14:57:04 -07:00
buildozer.sh fix generate_projects.sh fails in M1 Mac (#31868) 2023-01-03 18:05:19 -08:00
check_boringssl_prefix_symbol.sh uses sources.json 2020-07-17 13:39:55 -07:00
check_copyright.py Fix breakage when built against protobuf head (#34945) 2024-01-19 12:43:14 -08:00
check_include_guards.py [deps] Upgrade protobuf version to v25.0 (#34513) 2023-11-10 00:11:09 -08:00
check_naked_includes.py [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
check_namespace_qualification.py Automated rollback of commit 82e5116fb0. 2024-05-09 12:54:02 -07:00
check_path_length.py [windows] Add a check for too long path names (#33418) 2023-06-13 07:41:06 -07:00
check_protobuf_pod_version.sh Update third_party/protobuf to 3.21.12 (#32136) 2023-01-20 21:18:53 +01:00
check_pytype.sh Add type annotations to _channel.py and _server.py (#31677) 2022-11-28 11:31:07 -08:00
check_redundant_namespace_qualifiers.py [logging] Centralize configuration for trace flags (#36576) 2024-06-07 10:47:38 -07:00
check_trailing_newlines.sh [sanity] Ignore .gitignored files in trailing newline check (#35655) 2024-01-24 13:54:57 -08:00
check_upb_output.sh [deps] Upgrade protobuf version to v25.0 (#34513) 2023-11-10 00:11:09 -08:00
check_windows_dlls.sh Fix check_windows_dlls.sh to pass shellcheck 2018-01-16 14:46:04 -08:00
clang_format_code.sh [build] Decrease clang_format CI verbosity (#34865) 2023-11-02 15:06:08 -07:00
clang_tidy_code.sh Update by review 2020-10-13 09:54:50 -07:00
fix_build_deps.py [call-v3] Client call implementation (#36724) 2024-06-05 09:57:33 -07:00
format_bazel.sh Remove enum and future (#31381) 2022-10-18 14:58:30 -07:00
gen_compilation_database.py [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
gen_db.sh [build] Add a script to *just* generate the compilation db (#30315) 2022-07-28 09:34:06 -07:00
gen_experiments_and_format.sh Fix experiments (#31528) 2022-11-02 11:55:14 -07:00
generate_boringssl_prefix_header.sh address comments 2020-04-20 10:44:04 -07:00
guard_headers.sh auto-fix most of licenses 2017-06-08 11:22:41 +02:00
install_all_python_modules.sh [Python O11y] Implement CSM observability for Python (#36557) 2024-05-31 10:17:57 -07:00
isort_code.sh [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
pull_requests_interval.sh Adding Copyright info. 2017-09-29 19:18:41 +02:00
pylint_code.sh [Python O11y] Implement CSM observability for Python (#36557) 2024-05-31 10:17:57 -07:00
python_wrapper.sh Fix portability (#28284) 2021-12-08 05:46:42 +01:00
rake_compiler_docker_image.rb More cleanup after moving testing docker images to artifact registry. (#31689) 2022-11-24 14:09:16 +01:00
run_buildozer.py [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
run_clang_tidy.py [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
sanitize.sh [logging] Centralize configuration for trace flags (#36576) 2024-06-07 10:47:38 -07:00
update_flakes.py [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
update_flakes_query.py [test] Semi-automatic flaky test tracking (#30638) 2022-08-19 16:22:31 -07:00