AGENTS.md
src/core/channelz/AGENTS.mdAGENTS.md
Quality
44/100
Scores the file, not the repository.Length
395 words
5 headings · 0 code blocksRepository
45k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1# Channelz23This directory contains the implementation of gRPC's Channelz, which is a system for inspecting the state of gRPC channels.45## Overarching Purpose67Channelz provides a way to get detailed information about the state of gRPC channels, including things like the number of calls, the amount of data sent and received, and the status of the underlying transport. This information can be used for debugging, monitoring, and performance tuning.89## Files and Subdirectories1011- **`channelz.h` / `channelz.cc`**: Defines the `Channelz` class, which is the main class for Channelz.12- **`channel_trace.h` / `channel_trace.cc`**: Defines the `ChannelTrace` class, which is used to trace events on a channel.13- **`channelz_registry.h` / `channelz_registry.cc`**: Defines the `ChannelzRegistry` class, which is a registry for all Channelz entities.14- **`property_list.h` / `property_list.cc`**: Defines a list of properties that can be attached to a Channelz entity.15- **`ztrace_collector.h`**: A collector for Channelz trace events.16- **`v2tov1/`**: Code for converting between Channelz v2 and v1 formats.17- **`zviz/`**: A web-based viewer for Channelz data.1819## Notes2021- Channelz is a powerful tool for understanding the behavior of gRPC channels.22- It can be used to debug a wide variety of problems, from simple connectivity issues to complex performance problems.23- The Channelz data can be accessed through a variety of tools, including the `grpc_cli` command-line tool and the web-based viewer in the `zviz` directory.2425## DataSource Lifetime2627`DataSource` objects are not owned by the `BaseNode` they are attached to.28They are expected to be owned by some other transport-level object.29`DataSource` implementations call `SourceConstructed()` in their constructor to30register with a `BaseNode` and `SourceDestructing()` in their destructor to31unregister.3233Because `BaseNode` does not manage `DataSource` lifetime, it is unsafe for34`BaseNode` to call `DataSource::AddData` without holding `BaseNode::data_sources_mu_`,35as the `DataSource` could be destroyed by another thread concurrently.36This means `data_sources_mu_` must be held during any call to `AddData`.37Consequently, `AddData` implementations must not call back into any code that38acquires `data_sources_mu_`, such as `SourceConstructed`, `SourceDestructing`,39or other channelz rendering paths like `SerializeEntity` or `AdditionalInfo`,40as this will cause a deadlock.4142If this cannot be guaranteed (for example, in `Party` we might execute arbitrary43other promises during a `Spawn()` call, in chttp2 we need to enter the combiner44lock which has similar properties) a good technique is to use `EventEngine`45to spawn a background task to collect the data outside of the BaseNode lock.
Also in grpc/grpc
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| grpc/grpcsrc/core/ext/filters/census/AGENTS.md · 45k | AGENTS.md | no sections | 25/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/gcp_authentication/AGENTS.md · 45k | AGENTS.md | security | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/http/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/stateful_session/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/transport/chaotic_good/AGENTS.md · 45k | AGENTS.md | no sections | 48/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/transport/inproc/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/filter/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/handshaker/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/server/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/service_config/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/telemetry/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/transport/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/credentials/transport/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/backend_metrics/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/credentials/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/tsi/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/tsi/alts/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/credentials/call/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/transport/chttp2/AGENTS.md · 45k | AGENTS.md | testarchdependencies | 48/100 | 3 days ago | |
| grpc/grpcAGENTS.md · 45k | AGENTS.md | styledependenciesdo-not | 54/100 | 3 days ago |
Diff against src/core/ext/filters/census/AGENTS.md Diff against src/core/ext/filters/gcp_authentication/AGENTS.md Diff against src/core/ext/filters/http/AGENTS.md Diff against src/core/ext/filters/stateful_session/AGENTS.md Diff against src/core/ext/transport/chaotic_good/AGENTS.md Diff against src/core/ext/transport/inproc/AGENTS.md Diff against src/core/filter/AGENTS.md Diff against src/core/handshaker/AGENTS.md Diff against src/core/server/AGENTS.md Diff against src/core/service_config/AGENTS.md Diff against src/core/telemetry/AGENTS.md Diff against src/core/transport/AGENTS.md Diff against src/core/credentials/transport/AGENTS.md Diff against src/core/ext/filters/backend_metrics/AGENTS.md Diff against src/core/credentials/AGENTS.md Diff against src/core/tsi/AGENTS.md Diff against src/core/tsi/alts/AGENTS.md Diff against src/core/credentials/call/AGENTS.md Diff against src/core/ext/transport/chttp2/AGENTS.md Diff against AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| vllm-project/vllmAGENTS.md · 88k | AGENTS.md | setuptestlint-formatstyle+5 | 100/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| react/react-nativepackages/react-native-compatibility-check/AGENTS.md · 126k | AGENTS.md | testlint-formatstylearch+4 | 99/100 | 3 days ago | |
| netdata/netdatasrc/go/plugin/ibm.d/AGENTS.md · 80k | AGENTS.md | buildtestlint-formatarch+3 | 99/100 | 3 days ago | |
| dragonflydb/dragonflyAGENTS.md · 31k | AGENTS.md | setupbuildtestlint-format+10 | 96/100 | 2 days ago | |
| dotnet/aspnetcoresrc/Components/AGENTS.md · 38k | AGENTS.md | buildteststylearch+3 | 96/100 | 3 days ago | |
| duckdb/duckdbAGENTS.md · 40k | AGENTS.md | buildtestlint-formatstyle+8 | 96/100 | today | |
| steipete/CodexBarAGENTS.md · 20k | AGENTS.md | buildteststylearch+4 | 93/100 | 3 days ago |
