agents: enable compression in GrpcAgent#346
agents: enable compression in GrpcAgent#346santigimeno wants to merge 1 commit intonode-v22.x-nsolid-v5.xfrom
Conversation
WalkthroughThe update adds gzip compression to all OTLP gRPC communications configured by the agent. This is achieved by setting the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
agents/grpc/src/grpc_agent.cc (1)
1048-1048: Avoid copy-pasting the magic literal"gzip"four timesThe same compression value is assigned to every OTLP option struct. This is easy to miss when further exporters are added and slightly clutters the diff.
- opts.compression = "gzip"; + constexpr char kGrpcCompression[] = "gzip"; + opts.compression = kGrpcCompression; ... - options.compression = "gzip"; + options.compression = kGrpcCompression; ... - options.compression = "gzip"; + options.compression = kGrpcCompression; ... - options.compression = "gzip"; + options.compression = kGrpcCompression;(Or wrap the common initialisation in a small helper that fills all the shared fields.)
No functional change, but it improves maintainability and keeps future edits in one place.
Also applies to: 1074-1074, 1091-1091, 1109-1109
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
agents/grpc/src/grpc_agent.cc(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: lint-js-and-md
- GitHub Check: coverage-windows
- GitHub Check: test-linux (ubuntu-24.04-arm)
- GitHub Check: test-linux (ubuntu-24.04)
- GitHub Check: build-docs
- GitHub Check: build-tarball
- GitHub Check: test-macOS
🔇 Additional comments (1)
agents/grpc/src/grpc_agent.cc (1)
1048-1049: Verified correct use ofcompressionfieldThe vendored
OtlpGrpcClientOptionsstruct in
deps/opentelemetry-cpp/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_client_options.h
(lines 58–60) defines:
std::string compression;Assigning
opts.compression = "gzip";will correctly enable gzip compression at runtime. No changes needed.
580c207 to
b22a61c
Compare
90bf424 to
dbc0aaa
Compare
f9e9b16 to
3363fbd
Compare
PR-URL: #346 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
|
Landed in 01455a7 |
PR-URL: #346 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: #346 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Summary by CodeRabbit