Skip to content

Commit

Permalink
[release] 1.21.0 - Optimize local mode initialization (#175)
Browse files Browse the repository at this point in the history
Introduced 2 new options to configure the load strategy of the IP to
country lookup & UA parser.

- `IPCountryOptions`
  - Disabled: Fully disable IP to country lookup
  - LazyLoad: Load in background
  - EnsureLoaded: Wait until loaded when needed
- `UAParserOptions`
  - Disabled: Fully disable UA parser
  - LazyLoad: Load in background
  - EnsureLoaded: Wait until loaded when needed
 
These are 2 of the more expensive processes during initialization of the
SDK outside of network requests.
- If your service does not rely on country based checks from an IP
address, disabling IPCountry is recommended.
- If your service does not rely on parsing the UserAgent, disabling
UAParser is recommended.
- `LazyLoad` is generally recommended to avoid waiting to initialize
these on start up. `EnsureLoaded` will ensure that it's loaded when
either of these are eventually needed for evaluation.


Bug fix:
- Disable internal error logging in Local Mode






>Included In This Release
>- 3b13ae3 kenny-statsig
>   - skip network error handling if in local mode (#174)
>- 9cff2f5 kenny-statsig
>   - optimize synchronous initialization processes (#173)
  • Loading branch information
kenny-statsig authored Apr 25, 2024
1 parent 3b13ae3 commit 0aae723
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion statsig_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type statsigMetadata struct {
func getStatsigMetadata() statsigMetadata {
return statsigMetadata{
SDKType: "go-sdk",
SDKVersion: "1.20.0",
SDKVersion: "1.21.0",
LanguageVersion: runtime.Version()[2:],
SessionID: SessionID(),
}
Expand Down

0 comments on commit 0aae723

Please sign in to comment.