File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
spectator-reg-sidecar/src/main/java/com/netflix/spectator/sidecar Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ abstract class SidecarWriter implements Closeable {
37
37
/**
38
38
* Create a new writer based on a location string.
39
39
*/
40
+ @ SuppressWarnings ("PMD.AvoidUsingHardCodedIP" )
40
41
static SidecarWriter create (String location ) {
41
42
try {
42
43
if ("none" .equals (location )) {
@@ -49,6 +50,11 @@ static SidecarWriter create(String location) {
49
50
OutputStream out = Files .newOutputStream (Paths .get (URI .create (location )));
50
51
PrintStream stream = new PrintStream (out , false , "UTF-8" );
51
52
return new PrintStreamWriter (location , stream );
53
+ } else if ("udp" .equals (location )) {
54
+ String host = "127.0.0.1" ;
55
+ int port = 1234 ;
56
+ SocketAddress address = new InetSocketAddress (host , port );
57
+ return new UdpWriter (location , address );
52
58
} else if (location .startsWith ("udp://" )) {
53
59
URI uri = URI .create (location );
54
60
String host = uri .getHost ();
You can’t perform that action at this time.
0 commit comments