feat(exporters): Implement UDP and gRPC transport using common_system interfaces#276
Merged
Conversation
Add udp_transport.h with abstract interface and implementations: - udp_transport: abstract base class for UDP communication - stub_udp_transport: testing implementation with simulated sends - common_udp_transport: uses common_system IUdpClient interface - network_udp_transport: uses network_system UDP client Includes factory functions for creating transports with automatic backend selection based on available compile-time flags. Part of #273
Update statsd_exporter to use udp_transport abstraction: - Add udp_transport member with factory-based creation - Support custom transport injection for testing - Implement start/stop lifecycle with connection management - Replace stub send_udp_batch with real transport calls - Add transport statistics to get_stats() The exporter now sends real UDP packets when network backend is available, with graceful fallback to stub for testing. Part of #273, resolves #274
Add grpc_transport.h with abstract interface and implementations: - grpc_transport: abstract base class for gRPC communication - stub_grpc_transport: testing implementation with simulated calls - Placeholder for network_grpc_transport when gRPC lib available Update otlp_metrics_exporter to use transport abstractions: - Add http_transport and grpc_transport members - Implement send_via_http for OTLP/HTTP JSON and Protobuf - Implement send_via_grpc for OTLP/gRPC protocol - Add start/stop lifecycle management - Include transport statistics in get_stats() - Add basic OTLP JSON serialization Part of #273, resolves #275
Add comprehensive tests for transport layer: - UdpTransportTest: stub transport functionality, failure simulation, statistics tracking and reset - GrpcTransportTest: stub transport functionality, custom response handlers, failure simulation - Integration tests for statsd_exporter with custom UDP transport - Integration tests for otlp_metrics_exporter with custom HTTP/gRPC transports Part of #273
Add CMake configuration to detect common_system transport interfaces: - Check for transport.h in multiple locations - Define MONITORING_HAS_COMMON_TRANSPORT_INTERFACES when found - Enable IHttpClient and IUdpClient integration automatically This allows udp_transport.h and grpc_transport.h to use common_system transport interfaces when available. Part of #273
kcenon
added a commit
that referenced
this pull request
Apr 13, 2026
… interfaces (#276) * feat(exporters): add UDP transport abstraction Add udp_transport.h with abstract interface and implementations: - udp_transport: abstract base class for UDP communication - stub_udp_transport: testing implementation with simulated sends - common_udp_transport: uses common_system IUdpClient interface - network_udp_transport: uses network_system UDP client Includes factory functions for creating transports with automatic backend selection based on available compile-time flags. Part of #273 * feat(exporters): integrate UDP transport into statsd_exporter Update statsd_exporter to use udp_transport abstraction: - Add udp_transport member with factory-based creation - Support custom transport injection for testing - Implement start/stop lifecycle with connection management - Replace stub send_udp_batch with real transport calls - Add transport statistics to get_stats() The exporter now sends real UDP packets when network backend is available, with graceful fallback to stub for testing. Part of #273, resolves #274 * feat(exporters): add gRPC transport and update OTLP exporter Add grpc_transport.h with abstract interface and implementations: - grpc_transport: abstract base class for gRPC communication - stub_grpc_transport: testing implementation with simulated calls - Placeholder for network_grpc_transport when gRPC lib available Update otlp_metrics_exporter to use transport abstractions: - Add http_transport and grpc_transport members - Implement send_via_http for OTLP/HTTP JSON and Protobuf - Implement send_via_grpc for OTLP/gRPC protocol - Add start/stop lifecycle management - Include transport statistics in get_stats() - Add basic OTLP JSON serialization Part of #273, resolves #275 * test(exporters): add UDP and gRPC transport tests Add comprehensive tests for transport layer: - UdpTransportTest: stub transport functionality, failure simulation, statistics tracking and reset - GrpcTransportTest: stub transport functionality, custom response handlers, failure simulation - Integration tests for statsd_exporter with custom UDP transport - Integration tests for otlp_metrics_exporter with custom HTTP/gRPC transports Part of #273 * build(cmake): add transport interface detection Add CMake configuration to detect common_system transport interfaces: - Check for transport.h in multiple locations - Define MONITORING_HAS_COMMON_TRANSPORT_INTERFACES when found - Enable IHttpClient and IUdpClient integration automatically This allows udp_transport.h and grpc_transport.h to use common_system transport interfaces when available. Part of #273 * docs: update CHANGELOG with transport implementations Document new transport features in both English and Korean: - UDP and gRPC transport abstractions (#273) - StatsD exporter with real UDP transport (#274) - OTLP exporter with HTTP/gRPC transport (#275) - CMake transport interface detection Part of #273
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete the network transport implementation for monitoring_system by implementing UDP (StatsD) and gRPC (OTLP) transports using the unified interfaces from common_system.
Changes
UDP Transport (
udp_transport.h)udp_transportinterface for UDP communicationstub_udp_transport: Testing implementation with simulated sendscommon_udp_transport: Uses common_systemIUdpClientinterfacenetwork_udp_transport: Uses network_system UDP clientgRPC Transport (
grpc_transport.h)grpc_transportinterface for gRPC communicationstub_grpc_transport: Testing implementation with simulated callsnetwork_grpc_transportwhen gRPC lib availableStatsD Exporter Updates
udp_transportabstractionOTLP Exporter Updates
http_transportandgrpc_transportCMake Configuration
MONITORING_HAS_COMMON_TRANSPORT_INTERFACEScompile definitionTests
Current Transport Status
network_http_transportudp_transportabstractiongrpc_transport+ HTTP fallbackTest Plan
Related Issues