Skip to content

Commit 3c8e694

Browse files
committed
Use oneof in DogStatsdSink
For future extensibility. Signed-off-by: Taiki Ono <[email protected]>
1 parent 0fbe7b3 commit 3c8e694

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

api/stats.proto

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,15 @@ message StatsdSink {
144144
// The sink emits stats with `DogStatsD <https://docs.datadoghq.com/guides/dogstatsd/>`_
145145
// compatible tags. Tags are configurable via :ref:`StatsConfig <envoy_api_msg_StatsConfig>`.
146146
message DogStatsdSink {
147-
// The UDP address of a running DogStatsD compliant listener. If specified,
148-
// statistics will be flushed to this address.
149-
Address address = 1 [(validate.rules).message.required = true];
147+
oneof dog_statsd_specifier {
148+
option (validate.required) = true;
149+
150+
// The UDP address of a running DogStatsD compliant listener. If specified,
151+
// statistics will be flushed to this address.
152+
Address address = 1;
153+
154+
// The name of a cluster that is DogStatsD compliant TCP listener. If specified,
155+
// Envoy will connect to this cluster to flush statistics.
156+
string tcp_cluster_name = 2;
157+
}
150158
}

0 commit comments

Comments
 (0)