Commit Graph

16 Commits

Author SHA1 Message Date
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
Mark D. Roth 6c08d36c3b [reorg] move telemetry code to src/core/telemetry (#36644)
Closes #36644

PiperOrigin-RevId: 636702732
2024-05-23 15:54:07 -07:00
Esun Kim d6edb33ae7 [Clean-up] Removed grpc.gyp (#36077)
No more gyp file!

Closes #36077

PiperOrigin-RevId: 616267538
2024-03-15 16:04:43 -07:00
Adam Cozzette 016ed921ce
[deps] Upgrade protobuf version to v25.0 (#34513)
This commit upgrades gRPC to protobuf v25.0 and makes some fixes to
account for upb changes. One major change is that upb has been merged
into the protobuf repo, so we can now drop the separate `@upb`
dependency. Another is that `.upb.c` files no longer exist and there are
new `.upb_minitable.h` and `.upb_minitable.c` files. The longer
filenames exceeded a Windows restriction, so to work around that I
renamed the `upb-generated` directory to just `upb-gen`, and likewise
for `upbdefs-generated`.
2023-11-10 00:11:09 -08:00
Craig Tiller f002863cef
[code-review] Fix paths for code generated stuff (#34357)
missed a `/lib/` on a few paths...
2023-09-14 16:34:54 -07:00
Craig Tiller b7077f4bbf
[hpack] Rollforward huffman read optimization (#33657)
Rollforward in first commit, fixes in subsequent.
2023-07-11 15:26:54 -07:00
Craig Tiller 57c697d8ae
Revert "[hpack] Huffman read optimization" (#33655)
Reverts grpc/grpc#33269
2023-07-11 12:58:49 -07:00
Craig Tiller 4ce51fe45d
[hpack] Huffman read optimization (#33269)
In real services most of our time ends up in the `Read1()` function,
which populates one byte into the bit buffer.
Change this to read in as many as possible bytes at a time into that
buffer.

Additionally, generate all possible (to some depth) parser geometries,
and add a benchmark for them. Run that benchmark and select the best
geometry for decoding base64 strings (since this is the main use-case).

(gives about a 30% speed boost parsing base64 then huffman encoded
random binary strings)

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-11 08:41:15 -07:00
Mark D. Roth acac59800d
[git attributes] add Package.swift to list of generated files (#33563)
This will prevent this auto-generated file from showing up in github
diffs by default.
2023-06-28 06:59:58 -07:00
Mark D. Roth 1432fe4e4c
[JSON] make API public but experimental (#32987)
This makes the JSON API visible as part of the C-core API, but in the
`experimental` namespace. It will be used as part of various
experimental APIs that we will be introducing in the near future, such
as the audit logging API.
2023-05-09 08:05:24 -07:00
Craig Tiller efa939ac1f
[cleanup] Remove public_headers_must_be_c89 test (#32898)
We're starting to introduce C++ APIs to C-core, so this test is no
longer relevant.
2023-04-19 14:47:10 -07:00
Craig Tiller 724441d85b
[tests] Convert core e2e tests to gtest (#32603)
Notes:
- `+trace` fixtures haven't run since 2016, so they're disabled for now
(7ad2d0b463 (diff-780fce7267c34170c1d0ea15cc9f65a7f4b79fefe955d185c44e8b3251cf9e38R76))
- all current fixtures define `FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER`
and hence `authority_not_supported` has not been run in years - deleted
- bad_hostname similarly hasn't been triggered in a long while, so
deleted
- load_reporting_hook has never been enabled, so deleted
(f23fb4cf31/test/core/end2end/generate_tests.bzl (L145-L148))
- filter_latency & filter_status_code rely on global variables and so
don't convert particularly cleanly - and their value seems marginal, so
deleted

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-04-03 22:19:57 -07:00
Craig Tiller 65263537e1
[github] Update auto-generated files list (#32169) 2023-01-23 08:09:19 -08:00
Yash Tibrewal 01f333a1c1
TlsCredentials: Comparator implementation (#28940)
* TlsCredentials: Comparator implementation

* Update tests

* Redundant namespace qualifiers

* clang-tidy

* Reviewer comments

* Reviewer comments

* Reviewer comments

* Reviewer comments

* Reviewer comments

* Add generator for grpc_tls_credentials_options.h

* Generator script modifications for tests

* Sanity

* Reviewer comments

* Reviewer comments

* Add a common place to look-up known types

* Formatting

* Script fix

* Reviewer comments

* Add test mode to script

* Add to sanitize.sh

* clang-tidy

* Fix

* Fix

* Reviewer comments

* Clang-format
2022-03-16 17:11:07 -07:00
AJ Heller 762cde4d24
Delete end2end nosec tests (#28946)
* rm nosec tests (TODO: identify coverage differences)

* grpc::load_reporter

* delete unused nosec test files & config

* trigger build

* re-delete nosec test file (snuck in with a merge)

* revert TODO deletion
2022-03-07 08:52:30 -08:00
Mark D. Roth 3d4b89616d
Tell github not to render generated files by default in diffs (#26928) 2021-08-06 14:15:56 -07:00