Skip to content

Commit 715b4a3

Browse files
sakshamg1304rohitesh-wingify
authored andcommitted
feat: send error logs to server
1 parent a6f6ba4 commit 715b4a3

37 files changed

+12861
-64
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.6.0] - 2025-03-12
9+
10+
### Added
11+
12+
- Added support for sending error logs to VWO server for better debugging.
13+
814
## [1.5.0] - 2024-03-12
915

1016
### Added

VWOFmeSdk.NetStandard2.0/VWOFmeSdk.NetStandard2.0.csproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<OutputType>Library</OutputType>
55
<RootNamespace>VWOFmeSdk</RootNamespace>
66
<AssemblyName>VWOFmeSdk</AssemblyName>
7-
<TargetFramework>netstandard2.0</TargetFramework>
7+
<TargetFramework>net8.0</TargetFramework>
88
<PackageId>VWO.FME.Sdk</PackageId>
9-
<Version>1.5.0</Version>
9+
<Version>1.6.0</Version>
1010
<Authors>VWO devs</Authors>
1111
<Company>Wingify</Company>
1212
<Product>VWO</Product>
@@ -129,9 +129,15 @@
129129
</ItemGroup>
130130

131131
<ItemGroup>
132+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
132133
<PackageReference Include="murmurhash" Version="1.0.3" />
133134
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
134135
<PackageReference Include="System.Text.Json" Version="8.0.3" />
136+
<PackageReference Include="Xunit" Version="2.9.2" />
137+
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0">
138+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
139+
<PrivateAssets>all</PrivateAssets>
140+
</PackageReference>
135141
</ItemGroup>
136142

137143
<ItemGroup>
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
[
2+
{
3+
"settings": "MEG_CAMPAIGN_ADVANCE_ALGO_SETTINGS.json",
4+
"description": "should return true for a flag having 4 meg campaigns, where testingRule1 should be returned as it pass pre segment",
5+
"context": {
6+
"id": "user_id_1",
7+
"customVariables": {
8+
"price": 100,
9+
"name": "personalise",
10+
"firstname": "testingRule2"
11+
}
12+
},
13+
"featureKey": "feature1",
14+
"expectation": {
15+
"isEnabled": true,
16+
"intVariable": 11,
17+
"stringVariable": "testing1_variation",
18+
"floatVariable": 20.02,
19+
"booleanVariable": true,
20+
"jsonVariable": {
21+
"campaign": "testing1_variation"
22+
}
23+
}
24+
},
25+
{
26+
"settings": "MEG_CAMPAIGN_ADVANCE_ALGO_SETTINGS.json",
27+
"description": "should return true for a flag having 4 meg campaigns, where testingRule2 should be returned",
28+
"context": {
29+
"id": "user_id_1",
30+
"customVariables": {
31+
"name": "personalise",
32+
"firstname": "testingRule2"
33+
}
34+
},
35+
"featureKey": "feature1",
36+
"expectation": {
37+
"isEnabled": true,
38+
"intVariable": 10,
39+
"stringVariable": "testing2",
40+
"floatVariable": 20.01,
41+
"booleanVariable": false,
42+
"jsonVariable": {
43+
"campaign": "testing2"
44+
}
45+
}
46+
},
47+
{
48+
"settings": "MEG_CAMPAIGN_ADVANCE_ALGO_SETTINGS.json",
49+
"description": "should return true for a flag having 4 meg campaigns, where personaliseRule1 should be returned",
50+
"context": {
51+
"id": "user_id_1",
52+
"customVariables": {
53+
"name": "personalise"
54+
}
55+
},
56+
"featureKey": "feature1",
57+
"expectation": {
58+
"isEnabled": true,
59+
"intVariable": 11,
60+
"stringVariable": "personalizeRule1_variation",
61+
"floatVariable": 20.02,
62+
"booleanVariable": true,
63+
"jsonVariable": {
64+
"campaign": "personalizeRule1_variation"
65+
}
66+
}
67+
},
68+
{
69+
"settings": "MEG_CAMPAIGN_ADVANCE_ALGO_SETTINGS.json",
70+
"description": "should return true for a flag having 4 meg campaigns, where testingRule3 should be returned",
71+
"context": {
72+
"id": "user_id_1",
73+
"customVariables": {
74+
"lastname": "vwo"
75+
}
76+
},
77+
"featureKey": "feature1",
78+
"expectation": {
79+
"isEnabled": true,
80+
"intVariable": 11,
81+
"stringVariable": "testing3_variation",
82+
"floatVariable": 20.02,
83+
"booleanVariable": true,
84+
"jsonVariable": {
85+
"campaign": "testing3_variation"
86+
}
87+
}
88+
},
89+
{
90+
"settings": "MEG_CAMPAIGN_ADVANCE_ALGO_SETTINGS.json",
91+
"description": "should return true for a flag having 4 meg campaigns, where testingRule5 should be returned",
92+
"context": {
93+
"id": "user_id_1"
94+
},
95+
"featureKey": "feature1",
96+
"expectation": {
97+
"isEnabled": true,
98+
"intVariable": 11,
99+
"stringVariable": "testing5_variation",
100+
"floatVariable": 20.02,
101+
"booleanVariable": true,
102+
"jsonVariable": {
103+
"campaign": "testing5_variation"
104+
}
105+
}
106+
}
107+
]
108+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[
2+
{
3+
"settings": "MEG_CAMPAIGN_RANDOM_ALGO_SETTINGS.json",
4+
"description": "should return true for a flag with 3 campaigns, where testingRule1 and personalizeRule1 are eligible",
5+
"context": {
6+
"id": "user_id_1",
7+
"customVariables": {
8+
"price": 100,
9+
"name": "personalise"
10+
}
11+
},
12+
"featureKey": "feature1",
13+
"expectation": {
14+
"isEnabled": true,
15+
"intVariable": 11,
16+
"stringVariable": "personalizeRule1_variation",
17+
"floatVariable": 20.02,
18+
"booleanVariable": true,
19+
"jsonVariable": { "campaign": "personalizeRule1_variation" }
20+
}
21+
}
22+
]
23+
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
[
2+
{
3+
"settings": "BASIC_ROLLOUT_SETTINGS.json",
4+
"description": "should return true for a flag having settings: 100% traffic allocation and no segmentation",
5+
"context": { "id": "user_id" },
6+
"featureKey": "feature1",
7+
"expectation": {
8+
"isEnabled": true,
9+
"intVariable": 10,
10+
"stringVariable": "test",
11+
"floatVariable": 20.01,
12+
"booleanVariable": false,
13+
"jsonVariable": { "name": "VWO" },
14+
"storageData": {
15+
"rolloutKey": "feature1_rolloutRule1",
16+
"rolloutVariationId": 1
17+
}
18+
}
19+
},
20+
{
21+
"settings": "BASIC_ROLLOUT_TESTING_RULE_SETTINGS.json",
22+
"description": "should return true for a flag having settings: 100% traffic allocation and no segmentation and Testing Rule",
23+
"context": {
24+
"id": "user_id_1",
25+
"customVariables": { "price": 200 }
26+
},
27+
"featureKey": "feature1",
28+
"expectation": {
29+
"isEnabled": true,
30+
"intVariable": 11,
31+
"stringVariable": "test_variation",
32+
"floatVariable": 20.02,
33+
"booleanVariable": true,
34+
"jsonVariable": { "name": "VWO", "variation": 1 },
35+
"storageData": {
36+
"rolloutKey": "feature1_rolloutRule1",
37+
"rolloutVariationId": 1,
38+
"experimentKey": "feature1_testingRule1",
39+
"experimentVariationId": 2
40+
}
41+
}
42+
},
43+
{
44+
"settings": "NO_ROLLOUT_ONLY_TESTING_RULE_SETTINGS.json",
45+
"description": "should return true for a flag having no segmentation and only testing rule",
46+
"context": { "id": "user_id_4" },
47+
"featureKey": "feature1",
48+
"expectation": {
49+
"isEnabled": true,
50+
"intVariable": 11,
51+
"stringVariable": "test_variation",
52+
"floatVariable": 20.02,
53+
"booleanVariable": true,
54+
"jsonVariable": { "name": "VWO", "variation": 1 },
55+
"storageData": {
56+
"experimentKey": "feature1_testingRule1",
57+
"experimentVariationId": 2
58+
}
59+
}
60+
},
61+
{
62+
"settings": "NO_ROLLOUT_ONLY_TESTING_RULE_SETTINGS.json",
63+
"description": "should return false for a flag that does not exist and return default values for variables",
64+
"context": { "id": "user_id_5" },
65+
"featureKey": "feature_not_present",
66+
"expectation": {
67+
"isEnabled": false,
68+
"intVariable": 1,
69+
"stringVariable": "VWO",
70+
"floatVariable": 1.1,
71+
"booleanVariable": false,
72+
"jsonVariable": {},
73+
"storageData": {}
74+
}
75+
},
76+
{
77+
"settings": "ROLLOUT_TESTING_PRE_SEGMENT_RULE_SETTINGS.json",
78+
"description": "should return false for a flag that does not pass pre-segment of any rule",
79+
"context": { "id": "user_id_6" },
80+
"featureKey": "feature1",
81+
"expectation": {
82+
"isEnabled": false,
83+
"intVariable": 1,
84+
"stringVariable": "VWO",
85+
"floatVariable": 1.1,
86+
"booleanVariable": false,
87+
"jsonVariable": {},
88+
"storageData": {}
89+
}
90+
},
91+
{
92+
"settings": "ROLLOUT_TESTING_PRE_SEGMENT_RULE_SETTINGS.json",
93+
"description": "should return true for a flag that passes pre-segment for rollout1 and testingRule1",
94+
"context": {
95+
"id": "user_id_7",
96+
"customVariables": { "price": 100 }
97+
},
98+
"featureKey": "feature1",
99+
"expectation": {
100+
"isEnabled": true,
101+
"intVariable": 11,
102+
"stringVariable": "testing1_variation",
103+
"floatVariable": 20.02,
104+
"booleanVariable": true,
105+
"jsonVariable": { "campaign": "testing1_variation" },
106+
"storageData": {
107+
"rolloutKey": "feature1_rolloutRule1",
108+
"rolloutVariationId": 1,
109+
"experimentKey": "feature1_testingRule1",
110+
"experimentVariationId": 2
111+
}
112+
}
113+
},
114+
{
115+
"settings": "ROLLOUT_TESTING_PRE_SEGMENT_RULE_SETTINGS.json",
116+
"description": "should return true for a flag that passes pre-segment for rollout2 and testingRule2",
117+
"context": {
118+
"id": "user_id_8",
119+
"customVariables": { "price": 200 }
120+
},
121+
"featureKey": "feature1",
122+
"expectation": {
123+
"isEnabled": true,
124+
"intVariable": 11,
125+
"stringVariable": "testing2_variation",
126+
"floatVariable": 20.02,
127+
"booleanVariable": true,
128+
"jsonVariable": { "campaign": "testing2_variation" },
129+
"storageData": {
130+
"rolloutKey": "feature1_rolloutRule1",
131+
"rolloutVariationId": 2,
132+
"experimentKey": "feature1_testingRule2",
133+
"experimentVariationId": 2
134+
}
135+
}
136+
},
137+
{
138+
"settings": "TESTING_WHITELISTING_SEGMENT_RULE_SETTINGS.json",
139+
"description": "should return true for a flag that passes control whitelisting for testingRule1",
140+
"context": {
141+
"id": "user_id_9",
142+
"customVariables": { "price": 100 }
143+
},
144+
"featureKey": "feature1",
145+
"expectation": {
146+
"isEnabled": true,
147+
"intVariable": 10,
148+
"stringVariable": "testing1",
149+
"floatVariable": 20.01,
150+
"booleanVariable": false,
151+
"jsonVariable": { "campaign": "testing1" },
152+
"storageData": {
153+
"rolloutKey": "feature1_rolloutRule1",
154+
"rolloutVariationId": 1,
155+
"experimentKey": "feature1_testingRule1",
156+
"experimentVariationId": 1
157+
}
158+
}
159+
},
160+
{
161+
"settings": "TESTING_WHITELISTING_SEGMENT_RULE_SETTINGS.json",
162+
"description": "should return true for a flag that fails whitelisting for testingRule1 and only rollout rule passes",
163+
"context": {
164+
"id": "user_id_10",
165+
"customVariables": { "price": 100 }
166+
},
167+
"featureKey": "feature1",
168+
"expectation": {
169+
"isEnabled": true,
170+
"intVariable": 10,
171+
"stringVariable": "rollout1",
172+
"floatVariable": 20.01,
173+
"booleanVariable": false,
174+
"jsonVariable": { "campaign": "rollout1" },
175+
"storageData": {
176+
"rolloutKey": "feature1_rolloutRule1",
177+
"rolloutVariationId": 1
178+
}
179+
}
180+
}
181+
]
182+

0 commit comments

Comments
 (0)