Unleash / unleash-client-rust

Unleash client SDK for Rust language projects
Apache License 2.0
23 stars 18 forks source link

custom strategies that aren't configured into the client are hard to debug #51

Open rbtcollins opened 1 year ago

rbtcollins commented 1 year ago

Describe the bug

This log shows a test with a custom strategy that hasn't been enabled using .strategy(): it requires a TRACE level log statement to even tell that that is whats happened.

2022-09-27T20:12:34.518Z TRACE [unleash_api_client::client] memoize: start with 1 features
2022-09-27T20:12:34.518Z TRACE [unleash_api_client::client] memoize: swapped memoized state in
2022-09-27T20:12:34.518Z DEBUG [unleash_api_client::client] poll: waiting 500ms
2022-09-27T20:12:35.013Z TRACE [unleash_api_client::client] is_enabled: feature project_test default false, context Some(Context { user_id: None, session_id: None, remote_address: None, properties: {"projectId": "project", "cluster": "clustername"}, app_name: "app", environment: "clustername" })
2022-09-27T20:12:35.013Z TRACE [unleash_api_client::client] is_enabled: feature project_test default false, context Some(Context { user_id: None, session_id: None, remote_address: None, properties: {"projectId": "project", "cluster": "clustername"}, app_name: "app", environment: "clustername" })
2022-09-27T20:12:35.013Z TRACE [unleash_api_client::client] is_enabled: feature project_test has no strategies: enabling
feature 'project_test' is true

We should probably log the silent dropping of unknown strategies much more visibly.

Steps to reproduce the bug

No response

Expected behavior

No response

Logs, error output, etc.

No response

Screenshots

No response

Additional context

No response

Unleash version

No response

Subscription type

No response

Hosting type

No response

SDK information (language and version)

No response

nunogois commented 1 year ago

Hi @rbtcollins - Thanks for opening this issue. I'll reach out to the rest of the team and we'll get back to you 👍