File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
filter-custom-opa/src/main/java/org/hypertrace/agent/filter/opa/custom Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 19
19
import com .google .auto .service .AutoService ;
20
20
import org .hypertrace .agent .config .Config .AgentConfig ;
21
21
import org .hypertrace .agent .config .Config .Reporting ;
22
- import org .hypertrace .agent .core .EnvironmentConfig ;
23
22
import org .hypertrace .agent .core .HypertraceConfig ;
24
23
import org .hypertrace .agent .filter .FilterRegistry ;
25
24
import org .hypertrace .agent .filter .api .Filter ;
29
28
public class CustomOpaLibProvider implements FilterProvider {
30
29
31
30
public CustomOpaLibProvider () {
32
- String property = FilterRegistry .getProviderDisabledPropertyName (CustomOpaLibProvider .class );
33
31
// by default disable this provider until HT agent config includes OPA
34
- if (EnvironmentConfig .getProperty (property ) == null ) {
32
+ if (!HypertraceConfig .get ().getReporting ().getOpa ().getEnabled ().getValue ()) {
33
+ String property = FilterRegistry .getProviderDisabledPropertyName (CustomOpaLibProvider .class );
35
34
System .setProperty (property , "true" );
36
35
}
37
36
}
You can’t perform that action at this time.
0 commit comments