Skip to content

Commit 0c5dfd7

Browse files
committed
RT-3623 - adding in unix domain socket transport for logs
1 parent d25bd8b commit 0c5dfd7

22 files changed

+16259
-939
lines changed

pom.xml

Lines changed: 39 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>com.stackify</groupId>
55
<artifactId>stackify-api-java</artifactId>
6-
<version>3.1.3-SNAPSHOT</version>
6+
<version>4.0.0-SNAPSHOT</version>
77

88
<name>Stackify API for Java</name>
99
<description>Stackify API for Java</description>
@@ -45,7 +45,7 @@
4545
</developers>
4646

4747
<properties>
48-
<java.version>1.6</java.version>
48+
<java.version>1.8</java.version>
4949
</properties>
5050

5151
<dependencies>
@@ -55,33 +55,63 @@
5555
<dependency>
5656
<groupId>org.slf4j</groupId>
5757
<artifactId>slf4j-api</artifactId>
58-
<version>1.7.5</version>
58+
<version>1.7.28</version>
5959
</dependency>
6060

6161
<dependency>
6262
<groupId>com.fasterxml.jackson.core</groupId>
6363
<artifactId>jackson-core</artifactId>
64-
<version>2.8.11</version>
64+
<version>2.7.9</version>
6565
</dependency>
6666

6767
<dependency>
6868
<groupId>com.fasterxml.jackson.core</groupId>
6969
<artifactId>jackson-annotations</artifactId>
70-
<version>2.8.11</version>
70+
<version>2.7.9</version>
7171
</dependency>
7272

7373
<dependency>
7474
<groupId>com.fasterxml.jackson.core</groupId>
7575
<artifactId>jackson-databind</artifactId>
76-
<version>2.8.11.3</version>
76+
<version>2.7.9.6</version>
77+
</dependency>
78+
79+
<dependency>
80+
<groupId>com.google.protobuf</groupId>
81+
<artifactId>protobuf-java</artifactId>
82+
<version>3.9.1</version>
83+
</dependency>
84+
85+
<dependency>
86+
<groupId>org.apache.httpcomponents</groupId>
87+
<artifactId>httpclient</artifactId>
88+
<version>4.5.9</version>
89+
</dependency>
90+
91+
<dependency>
92+
<groupId>com.kohlschutter.junixsocket</groupId>
93+
<artifactId>junixsocket-common</artifactId>
94+
<version>2.2.0</version>
95+
</dependency>
96+
97+
<dependency>
98+
<groupId>com.kohlschutter.junixsocket</groupId>
99+
<artifactId>junixsocket-native-common</artifactId>
100+
<version>2.2.0</version>
101+
</dependency>
102+
103+
<dependency>
104+
<groupId>net.jodah</groupId>
105+
<artifactId>failsafe</artifactId>
106+
<version>2.3.0</version>
77107
</dependency>
78108

79109
<!-- Provided dependencies -->
80110

81111
<dependency>
82112
<groupId>org.projectlombok</groupId>
83113
<artifactId>lombok</artifactId>
84-
<version>1.16.10</version>
114+
<version>1.18.8</version>
85115
<scope>provided</scope>
86116
</dependency>
87117

@@ -92,7 +122,7 @@
92122
<dependency>
93123
<groupId>org.slf4j</groupId>
94124
<artifactId>slf4j-log4j12</artifactId>
95-
<version>1.7.5</version>
125+
<version>1.7.28</version>
96126
<scope>test</scope>
97127
</dependency>
98128

@@ -173,24 +203,6 @@
173203
</configuration>
174204
</plugin>
175205

176-
<plugin>
177-
<groupId>org.apache.maven.plugins</groupId>
178-
<artifactId>maven-javadoc-plugin</artifactId>
179-
<version>2.9.1</version>
180-
<executions>
181-
<execution>
182-
<id>attach-javadocs</id>
183-
<goals>
184-
<goal>jar</goal>
185-
</goals>
186-
<configuration>
187-
<failOnError>false</failOnError>
188-
<additionalparam>-Xdoclint:none</additionalparam>
189-
</configuration>
190-
</execution>
191-
</executions>
192-
</plugin>
193-
194206
<plugin>
195207
<groupId>org.apache.maven.plugins</groupId>
196208
<artifactId>maven-source-plugin</artifactId>
@@ -207,7 +219,7 @@
207219
<plugin>
208220
<groupId>org.apache.felix</groupId>
209221
<artifactId>maven-bundle-plugin</artifactId>
210-
<version>2.3.7</version>
222+
<version>4.2.0</version>
211223
<executions>
212224
<execution>
213225
<id>bundle-manifest</id>
@@ -219,45 +231,10 @@
219231
</executions>
220232
</plugin>
221233

222-
<plugin>
223-
<groupId>org.codehaus.mojo</groupId>
224-
<artifactId>cobertura-maven-plugin</artifactId>
225-
<version>2.6</version>
226-
<configuration>
227-
<formats>
228-
<format>xml</format>
229-
</formats>
230-
</configuration>
231-
</plugin>
232-
233-
<plugin>
234-
<groupId>org.eluder.coveralls</groupId>
235-
<artifactId>coveralls-maven-plugin</artifactId>
236-
<version>2.2.0</version>
237-
</plugin>
238-
239234
</plugins>
240235

241236
</build>
242237

243-
<reporting>
244-
245-
<plugins>
246-
247-
<plugin>
248-
<groupId>org.apache.maven.plugins</groupId>
249-
<artifactId>maven-javadoc-plugin</artifactId>
250-
<version>2.9.1</version>
251-
<configuration>
252-
<failOnError>false</failOnError>
253-
<additionalparam>-Xdoclint:none</additionalparam>
254-
</configuration>
255-
</plugin>
256-
257-
</plugins>
258-
259-
</reporting>
260-
261238
<profiles>
262239
<profile>
263240
<id>release-sign-artifacts</id>

src/main/java/com/stackify/api/common/ApiConfiguration.java

Lines changed: 74 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -22,68 +22,84 @@
2222

2323
/**
2424
* ApiConfiguration
25+
*
2526
* @author Eric Martin
2627
*/
2728
@ToString
2829
@Getter
2930
@Builder(builderClassName = "Builder", toBuilder = true, builderMethodName = "newBuilder")
3031
public class ApiConfiguration {
3132

32-
/**
33-
* Default API URL
34-
*/
35-
private static final String DEFAULT_API_URL = "https://api.stackify.com";
36-
37-
/**
38-
* API URL
39-
*/
40-
private final String apiUrl;
41-
42-
/**
43-
* API Key
44-
*/
45-
private final String apiKey;
46-
47-
/**
48-
* Application name
49-
*/
50-
private final String application;
51-
52-
/**
53-
* Environment
54-
*/
55-
private final String environment;
56-
57-
/**
58-
* Environment details
59-
*/
60-
private final EnvironmentDetail envDetail;
61-
62-
/**
63-
* Add #SKIPJSON tag to messages containing Json
64-
*/
65-
private final Boolean skipJson;
66-
67-
/**
68-
* Allow logging from com.stackify.*
69-
*/
70-
private final Boolean allowComDotStackify;
71-
72-
/**
73-
* Http Proxy Host ie) 10.20.30.40
74-
*/
75-
private final String httpProxyHost;
76-
77-
/**
78-
* Http Proxy Port ie) 8080
79-
*/
80-
private final String httpProxyPort;
81-
82-
/**
83-
* @return the apiUrl
84-
*/
85-
public String getApiUrl() {
86-
return apiUrl != null ? apiUrl : DEFAULT_API_URL;
87-
}
88-
89-
}
33+
public static final String TRANSPORT_DIRECT = "direct";
34+
public static final String TRANSPORT_AGENT_SOCKET = "agent_socket";
35+
36+
private static final String DEFAULT_TRANSPORT = TRANSPORT_DIRECT;
37+
private static final String DEFAULT_AGENT_SOCKET_PATH_UNIX = "/usr/local/stackify/stackify.sock";
38+
39+
/**
40+
* Default API URL
41+
*/
42+
private static final String DEFAULT_API_URL = "https://api.stackify.com";
43+
44+
/**
45+
* API URL
46+
*/
47+
private final String apiUrl;
48+
49+
/**
50+
* API Key
51+
*/
52+
private final String apiKey;
53+
54+
/**
55+
* Application name
56+
*/
57+
private final String application;
58+
59+
/**
60+
* Environment
61+
*/
62+
private final String environment;
63+
64+
/**
65+
* Environment details
66+
*/
67+
private final EnvironmentDetail envDetail;
68+
69+
/**
70+
* Add #SKIPJSON tag to messages containing Json
71+
*/
72+
private final Boolean skipJson;
73+
74+
/**
75+
* Allow logging from com.stackify.*
76+
*/
77+
private final Boolean allowComDotStackify;
78+
79+
/**
80+
* Http Proxy Host ie) 10.20.30.40
81+
*/
82+
private final String httpProxyHost;
83+
84+
/**
85+
* Http Proxy Port ie) 8080
86+
*/
87+
private final String httpProxyPort;
88+
89+
private final String transport;
90+
91+
/**
92+
* @return the apiUrl
93+
*/
94+
public String getApiUrl() {
95+
return apiUrl != null ? apiUrl : DEFAULT_API_URL;
96+
}
97+
98+
public String getTransport() {
99+
return transport != null ? transport : DEFAULT_TRANSPORT;
100+
}
101+
102+
public String getAgentSocketPath() {
103+
return DEFAULT_AGENT_SOCKET_PATH_UNIX;
104+
}
105+
}

0 commit comments

Comments
 (0)