File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1313// limitations under the License.
1414
1515use core:: pin:: Pin ;
16+ use std:: env;
1617use std:: sync:: Arc ;
1718use std:: time:: SystemTime ;
1819
@@ -126,7 +127,7 @@ pub fn store_factory<'a>(
126127
127128 let store = Store :: new ( store) ;
128129
129- return if should_wrap_metrics_store ( backend) {
130+ return if should_wrap_in_metrics_store ( backend) {
130131 Ok ( Store :: new ( MetricsStore :: new (
131132 Arc :: new ( store) ,
132133 name,
@@ -138,7 +139,11 @@ pub fn store_factory<'a>(
138139 } )
139140}
140141
141- fn should_wrap_metrics_store ( spec : & StoreSpec ) -> bool {
142+ fn should_wrap_in_metrics_store ( spec : & StoreSpec ) -> bool {
143+ if env:: var ( "NL_STORE_METRICS" ) . is_err ( ) {
144+ return false
145+ }
146+
142147 matches ! (
143148 spec,
144149 StoreSpec :: Memory ( _)
You can’t perform that action at this time.
0 commit comments