@@ -66,37 +66,40 @@ void getInsights() throws JsonProcessingException {
6666
6767 final String ROUTE = "post transfer/transferfunds" ;
6868 final String ENDPOINT_SPAN = "HTTP POST transfer/transferfunds" ;
69+ final String ENV_1 = "Env1" ;
70+ final String SCOPE_1 = "Scope1" ;
71+ final int IMPORTANCE_3 = 3 ;
6972
7073 String codeObjectId = "Sample.MoneyTransfer.API.Domain.Services.MoneyTransferDomainService$_$TransferFunds" ;
7174 String prefixedCodeObjectId = addPrefixToCodeObjectId (codeObjectId );
7275 Date actualStartTimeNow = new Date ();
7376 Date customStartTimeFiveDaysBefore = Date .from (actualStartTimeNow .toInstant ().minus (5 , ChronoUnit .DAYS ));
7477 List <CodeObjectInsight > expectedCodeObjectInsights = new ArrayList <>();
7578
76- HotspotInsight expectedHotspotInsight = new HotspotInsight (codeObjectId , actualStartTimeNow , customStartTimeFiveDaysBefore , prefixedCodeObjectId , 75 );
79+ HotspotInsight expectedHotspotInsight = new HotspotInsight (codeObjectId , ENV_1 , SCOPE_1 , IMPORTANCE_3 , null , actualStartTimeNow , customStartTimeFiveDaysBefore , prefixedCodeObjectId , 75 );
7780 expectedCodeObjectInsights .add (expectedHotspotInsight );
7881
7982 ErrorInsightNamedError namedError1 = new ErrorInsightNamedError ("e0a4d03c-c609-11ec-a9d6-0242ac130006" , "System.NullReferenceException" , codeObjectId , "Sample.MoneyTransfer.API.Controllers.TransferController$_$TransferFunds" );
8083 ErrorInsightNamedError namedError2 = new ErrorInsightNamedError ("de63a938-c609-11ec-b388-0242ac130006" , "System.Exception" , codeObjectId , "Sample.MoneyTransfer.API.Controllers.TransferController$_$TransferFunds" );
8184 List <ErrorInsightNamedError > namedErrors = new ArrayList <>();
8285 namedErrors .add (namedError1 );
8386 namedErrors .add (namedError2 );
84- ErrorInsight expectedErrorInsight = new ErrorInsight (codeObjectId , actualStartTimeNow , customStartTimeFiveDaysBefore , prefixedCodeObjectId , 1 , 0 , 0 , namedErrors );
87+ ErrorInsight expectedErrorInsight = new ErrorInsight (codeObjectId , ENV_1 , SCOPE_1 , IMPORTANCE_3 , null , actualStartTimeNow , customStartTimeFiveDaysBefore , prefixedCodeObjectId , 1 , 0 , 0 , namedErrors );
8588 expectedCodeObjectInsights .add (expectedErrorInsight );
8689
8790 String expectedNormalUsageInsightCodeObjectId = "Sample.MoneyTransfer.API.Domain.Services.MoneyTransferDomainService$_$TransferFunds" ;
88- NormalUsageInsight expectedNormalUsageInsight = new NormalUsageInsight ( expectedNormalUsageInsightCodeObjectId ,
89- ROUTE , actualStartTimeNow , customStartTimeFiveDaysBefore , addPrefixToCodeObjectId (expectedNormalUsageInsightCodeObjectId ), ENDPOINT_SPAN , 40 );
91+ NormalUsageInsight expectedNormalUsageInsight = new NormalUsageInsight ( expectedNormalUsageInsightCodeObjectId , ENV_1 , SCOPE_1 , IMPORTANCE_3 , null ,
92+ ROUTE , ENDPOINT_SPAN , actualStartTimeNow , customStartTimeFiveDaysBefore , addPrefixToCodeObjectId (expectedNormalUsageInsightCodeObjectId ), 40 );
9093 expectedCodeObjectInsights .add (expectedNormalUsageInsight );
9194
9295 String expectedLowUsageInsightCodeObjectId = "Sample.MoneyTransfer.API.Domain.Services.MoneyTransferDomainService$_$Abc" ;
93- LowUsageInsight expectedLowUsageInsight = new LowUsageInsight ( expectedLowUsageInsightCodeObjectId ,
94- ROUTE , actualStartTimeNow , customStartTimeFiveDaysBefore , addPrefixToCodeObjectId (expectedLowUsageInsightCodeObjectId ), ENDPOINT_SPAN , 13 );
96+ LowUsageInsight expectedLowUsageInsight = new LowUsageInsight ( expectedLowUsageInsightCodeObjectId , ENV_1 , SCOPE_1 , IMPORTANCE_3 , null ,
97+ ROUTE , ENDPOINT_SPAN , actualStartTimeNow , customStartTimeFiveDaysBefore , addPrefixToCodeObjectId (expectedLowUsageInsightCodeObjectId ), 13 );
9598 expectedCodeObjectInsights .add (expectedLowUsageInsight );
9699
97100 String expectedHighUsageInsightCodeObjectId = "Sample.MoneyTransfer.API.Domain.Services.MoneyTransferDomainService$_$Defg" ;
98- HighUsageInsight expectedHighUsageInsight = new HighUsageInsight ( expectedHighUsageInsightCodeObjectId ,
99- ROUTE , actualStartTimeNow , customStartTimeFiveDaysBefore , addPrefixToCodeObjectId (expectedHighUsageInsightCodeObjectId ), ENDPOINT_SPAN , 98 );
101+ HighUsageInsight expectedHighUsageInsight = new HighUsageInsight ( expectedHighUsageInsightCodeObjectId , ENV_1 , SCOPE_1 , IMPORTANCE_3 , null ,
102+ ROUTE , ENDPOINT_SPAN , actualStartTimeNow , customStartTimeFiveDaysBefore , addPrefixToCodeObjectId (expectedHighUsageInsightCodeObjectId ), 98 );
100103 expectedCodeObjectInsights .add (expectedHighUsageInsight );
101104
102105 SpanInfo spanInfo = new SpanInfo ("Retrieving account" , "Retrieving account" , "MoneyTransferDomainService" , "Sample.MoneyTransfer.API" ,"Sample.MoneyTransfer.API.MoneyTransferDomainService$_$Error" );
@@ -107,18 +110,22 @@ void getInsights() throws JsonProcessingException {
107110 null , null );
108111
109112 String expectedSlowestSpansInsightCodeObjectId = "Sample.MoneyTransfer.API.Domain.Services.MoneyTransferDomainService$_$TransferFunds" ;
110- SlowestSpansInsight expectedSlowestSpansInsight = new SlowestSpansInsight ( expectedSlowestSpansInsightCodeObjectId ,
111- ROUTE , actualStartTimeNow , customStartTimeFiveDaysBefore , addPrefixToCodeObjectId (expectedSlowestSpansInsightCodeObjectId ), ENDPOINT_SPAN , Collections .singletonList (slowSpanInfo ));
113+ SlowestSpansInsight expectedSlowestSpansInsight = new SlowestSpansInsight ( expectedSlowestSpansInsightCodeObjectId , ENV_1 , SCOPE_1 , IMPORTANCE_3 , null ,
114+ ROUTE , ENDPOINT_SPAN , actualStartTimeNow , customStartTimeFiveDaysBefore , addPrefixToCodeObjectId (expectedSlowestSpansInsightCodeObjectId ), Collections .singletonList (slowSpanInfo ));
112115 expectedCodeObjectInsights .add (expectedSlowestSpansInsight );
113116
114117 String expectedSlowEndpointInsightCodeObjectId = "Sample.MoneyTransfer.API.Domain.Services.MoneyTransferDomainService$_$TransferFunds" ;
115118 SlowEndpointInsight expectedSlowEndpointInsight = new SlowEndpointInsight (
116119 expectedSlowEndpointInsightCodeObjectId
120+ , ENV_1
121+ , SCOPE_1
122+ , IMPORTANCE_3
123+ , null
117124 , ROUTE
125+ , ENDPOINT_SPAN
118126 , actualStartTimeNow
119127 , customStartTimeFiveDaysBefore
120128 , addPrefixToCodeObjectId (expectedSlowEndpointInsightCodeObjectId )
121- , ENDPOINT_SPAN
122129 , new Duration (0.11D , "ms" , 11000 )
123130 , new Duration (0.12D , "ms" , 12000 )
124131 , new Duration (0.13D , "ms" , 13000 )
0 commit comments