Skip to content

Commit

Permalink
lazy load remote config in proxy.js
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-id authored Jan 29, 2025
1 parent c0550a0 commit 4ba4b6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/dd-trace/src/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const DynamicInstrumentation = require('./debugger')
const telemetry = require('./telemetry')
const nomenclature = require('./service-naming')
const PluginManager = require('./plugin_manager')
const remoteConfig = require('./appsec/remote_config')
const AppsecSdk = require('./appsec/sdk')
const dogstatsd = require('./dogstatsd')
const NoopDogStatsDClient = require('./noop/dogstatsd')
Expand Down Expand Up @@ -48,7 +47,8 @@ class Tracer extends NoopProxy {
this._modules = {
appsec: new LazyModule(() => require('./appsec')),
iast: new LazyModule(() => require('./appsec/iast')),
llmobs: new LazyModule(() => require('./llmobs'))
llmobs: new LazyModule(() => require('./llmobs')),
rc: new LazyModule(() => require('./appsec/remote_config'))
}
}

Expand Down Expand Up @@ -89,7 +89,7 @@ class Tracer extends NoopProxy {
}

if (config.remoteConfig.enabled && !config.isCiVisibility) {
const rc = remoteConfig.enable(config, this._modules.appsec)
this._modules.rc.enable(config, this._modules.appsec)

rc.setProductHandler('APM_TRACING', (action, conf) => {

Check failure on line 94 in packages/dd-trace/src/proxy.js

View workflow job for this annotation

GitHub Actions / lint

'rc' is not defined
if (action === 'unapply') {
Expand Down

0 comments on commit 4ba4b6c

Please sign in to comment.