File tree 2 files changed +11
-1
lines changed
inspectit-gepard-agent/src
main/java/rocks/inspectit/gepard/agent/internal/identity/model
test/java/rocks/inspectit/gepard/agent/notification/http
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 15
15
/** Meta-information about the current agent */
16
16
public final class AgentInfo {
17
17
18
+ /** Global instance of agent information */
18
19
public static final AgentInfo INFO = new AgentInfo ();
19
20
20
21
private final Agent agent ;
@@ -29,6 +30,12 @@ private AgentInfo() {
29
30
this .agentId = identityInfo .agentId ();
30
31
}
31
32
33
+ /**
34
+ * Creates an agent model with the current meta-information.
35
+ *
36
+ * @param identityInfo the agent's identity info
37
+ * @return the created agent model
38
+ */
32
39
private Agent createAgent (IdentityInfo identityInfo ) {
33
40
RuntimeMXBean runtime = ManagementFactory .getRuntimeMXBean ();
34
41
Original file line number Diff line number Diff line change 6
6
import com .fasterxml .jackson .annotation .JsonAutoDetect ;
7
7
import com .fasterxml .jackson .annotation .PropertyAccessor ;
8
8
import com .fasterxml .jackson .databind .ObjectMapper ;
9
+ import com .fasterxml .jackson .datatype .jsr310 .JavaTimeModule ;
9
10
import java .net .URISyntaxException ;
10
11
import org .apache .hc .client5 .http .async .methods .SimpleHttpRequest ;
11
12
import org .junit .jupiter .api .Test ;
15
16
class NotificationFactoryTest {
16
17
17
18
private static final ObjectMapper mapper =
18
- new ObjectMapper ().setVisibility (PropertyAccessor .FIELD , JsonAutoDetect .Visibility .ANY );
19
+ new ObjectMapper ()
20
+ .setVisibility (PropertyAccessor .FIELD , JsonAutoDetect .Visibility .ANY )
21
+ .registerModule (new JavaTimeModule ());
19
22
20
23
private final String agentId = AgentInfo .INFO .getAgentId ();
21
24
You can’t perform that action at this time.
0 commit comments