Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide non-config properties on config object #4521

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

watson
Copy link
Collaborator

@watson watson commented Jul 17, 2024

Hide internal-only properties so they are not exposed to the rest of the app. This makes reasoning about what's a config option and what's not easier.

A better approach would be to use private properties on the class, but it has not been possible for me to do so since our ESLint config disallows using private properties.

The main motivation about this change is to make it simpler to send the config options to another thread as all the internal state will no longer be copied, but only the actual config options themselves. It also means that if you ever have to console.log(config), the output will be just the config options, which again is much cleaner.

Expand to see the config object prior to hiding the internal-only properties
Config {
  options: { ingestion: {}, appsec: {}, iast: undefined },
  debug: true,
  logger: undefined,
  logLevel: 'debug',
  apiKey: undefined,
  serviceMapping: {},
  tracePropagationStyle: {
    inject: [ 'datadog', 'tracecontext' ],
    extract: [ 'datadog', 'tracecontext' ],
    otelPropagators: false
  },
  tracePropagationExtractFirst: false,
  sampler: {
    spanSamplingRules: [],
    rateLimit: undefined,
    rules: [],
    sampleRate: undefined
  },
  appsec: {
    blockedTemplateGraphql: undefined,
    eventTracking: { enabled: true, mode: 'safe' },
    apiSecurity: { enabled: true, requestSampling: 0.1 },
    blockedTemplateHtml: undefined,
    blockedTemplateJson: undefined,
    enabled: undefined,
    obfuscatorKeyRegex: '(?i)pass|pw(?:or)?d|secret|(?:api|private|public|access)[_-]?key|token|consumer[_-]?(?:id|key|secret)|sign(?:ed|ature)|bearer|authorization|jsessionid|phpsessid|asp\\.net[_-]sessionid|sid|jwt',
    obfuscatorValueRegex: '(?i)(?:p(?:ass)?w(?:or)?d|pass(?:[_-]?phrase)?|secret(?:[_-]?key)?|(?:(?:api|private|public|access)[_-]?)key(?:[_-]?id)?|(?:(?:auth|access|id|refresh)[_-]?)?token|consumer[_-]?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?|jsessionid|phpsessid|asp\\.net(?:[_-]|-)sessionid|sid|jwt)(?:\\s*=[^;]|"\\s*:\\s*"[^"]+")|bearer\\s+[a-z0-9\\._\\-]+|token:[a-z0-9]{13}|gh[opsu]_[0-9a-zA-Z]{36}|ey[I-L][\\w=-]+\\.ey[I-L][\\w=-]+(?:\\.[\\w.+\\/=-]+)?|[\\-]{5}BEGIN[a-z\\s]+PRIVATE\\sKEY[\\-]{5}[^\\-]+[\\-]{5}END[a-z\\s]+PRIVATE\\sKEY|ssh-rsa\\s*[a-z0-9\\/\\.+]{100,}',
    rasp: { enabled: false },
    rateLimit: 100,
    rules: undefined,
    sca: { enabled: null },
    standalone: { enabled: undefined },
    stackTrace: { enabled: true, maxDepth: 32, maxStackTraces: 2 },
    wafTimeout: 5000
  },
  memcachedCommandEnabled: false,
  isAzureFunction: false,
  spanLeakDebug: 0,
  installSignature: { id: null, time: null, type: null },
  _defaults: {
    'appsec.blockedTemplateHtml': undefined,
    'appsec.blockedTemplateJson': undefined,
    'appsec.enabled': undefined,
    'appsec.obfuscatorKeyRegex': '(?i)pass|pw(?:or)?d|secret|(?:api|private|public|access)[_-]?key|token|consumer[_-]?(?:id|key|secret)|sign(?:ed|ature)|bearer|authorization|jsessionid|phpsessid|asp\\.net[_-]sessionid|sid|jwt',
    'appsec.obfuscatorValueRegex': '(?i)(?:p(?:ass)?w(?:or)?d|pass(?:[_-]?phrase)?|secret(?:[_-]?key)?|(?:(?:api|private|public|access)[_-]?)key(?:[_-]?id)?|(?:(?:auth|access|id|refresh)[_-]?)?token|consumer[_-]?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?|jsessionid|phpsessid|asp\\.net(?:[_-]|-)sessionid|sid|jwt)(?:\\s*=[^;]|"\\s*:\\s*"[^"]+")|bearer\\s+[a-z0-9\\._\\-]+|token:[a-z0-9]{13}|gh[opsu]_[0-9a-zA-Z]{36}|ey[I-L][\\w=-]+\\.ey[I-L][\\w=-]+(?:\\.[\\w.+\\/=-]+)?|[\\-]{5}BEGIN[a-z\\s]+PRIVATE\\sKEY[\\-]{5}[^\\-]+[\\-]{5}END[a-z\\s]+PRIVATE\\sKEY|ssh-rsa\\s*[a-z0-9\\/\\.+]{100,}',
    'appsec.rasp.enabled': false,
    'appsec.rateLimit': 100,
    'appsec.rules': undefined,
    'appsec.sca.enabled': null,
    'appsec.standalone.enabled': undefined,
    'appsec.stackTrace.enabled': true,
    'appsec.stackTrace.maxDepth': 32,
    'appsec.stackTrace.maxStackTraces': 2,
    'appsec.wafTimeout': 5000,
    clientIpEnabled: false,
    clientIpHeader: null,
    dbmPropagationMode: 'disabled',
    'dogstatsd.hostname': '127.0.0.1',
    'dogstatsd.port': '8125',
    dsmEnabled: false,
    env: undefined,
    'experimental.enableGetRumData': false,
    'experimental.exporter': undefined,
    'experimental.runtimeId': false,
    flushInterval: 2000,
    flushMinSpans: 1000,
    gitMetadataEnabled: true,
    headerTags: [],
    hostname: '127.0.0.1',
    'iast.deduplicationEnabled': true,
    'iast.enabled': false,
    'iast.maxConcurrentRequests': 2,
    'iast.maxContextOperations': 2,
    'iast.redactionEnabled': true,
    'iast.redactionNamePattern': null,
    'iast.redactionValuePattern': null,
    'iast.requestSampling': 30,
    'iast.telemetryVerbosity': 'INFORMATION',
    isCiVisibility: false,
    isEarlyFlakeDetectionEnabled: false,
    isGCPFunction: false,
    isGitUploadEnabled: false,
    isIntelligentTestRunnerEnabled: false,
    isManualApiEnabled: false,
    logInjection: false,
    lookup: undefined,
    openAiLogsEnabled: false,
    openaiSpanCharLimit: 128,
    peerServiceMapping: {},
    plugins: true,
    port: '8126',
    'profiling.enabled': undefined,
    'profiling.exporters': 'agent',
    'profiling.sourceMap': true,
    'profiling.ssi': false,
    'profiling.heuristicsEnabled': false,
    'profiling.longLivedThreshold': undefined,
    protocolVersion: '0.4',
    queryStringObfuscation: '(?:p(?:ass)?w(?:or)?d|pass(?:_?phrase)?|secret|(?:api_?|private_?|public_?|access_?|secret_?)key(?:_?id)?|token|consumer_?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?)(?:(?:\\s|%20)*(?:=|%3D)[^&]+|(?:"|%22)(?:\\s|%20)*(?::|%3A)(?:\\s|%20)*(?:"|%22)(?:%2[^2]|%[^2]|[^"%])+(?:"|%22))|bearer(?:\\s|%20)+[a-z0-9\\._\\-]+|token(?::|%3A)[a-z0-9]{13}|gh[opsu]_[0-9a-zA-Z]{36}|ey[I-L](?:[\\w=-]|%3D)+\\.ey[I-L](?:[\\w=-]|%3D)+(?:\\.(?:[\\w.+\\/=-]|%3D|%2F|%2B)+)?|[\\-]{5}BEGIN(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY[\\-]{5}[^\\-]+[\\-]{5}END(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY|ssh-rsa(?:\\s|%20)*(?:[a-z0-9\\/\\.+]|%2F|%5C|%2B){100,}',
    'remoteConfig.enabled': true,
    'remoteConfig.pollInterval': 5,
    reportHostname: false,
    runtimeMetrics: false,
    sampleRate: undefined,
    'sampler.rateLimit': undefined,
    'sampler.rules': [],
    scope: undefined,
    service: 'watson-nodejs-demo-app',
    site: 'datadoghq.com',
    spanAttributeSchema: 'v0',
    spanComputePeerService: false,
    spanRemoveIntegrationFromService: false,
    startupLogs: false,
    'stats.enabled': false,
    tags: {
      service: 'watson-nodejs-demo-app',
      env: undefined,
      version: '1.0.0',
      'runtime-id': 'd6cc416f-1ead-40b8-91e5-cb35b16b824a'
    },
    tagsHeaderMaxLength: 512,
    'telemetry.debug': false,
    'telemetry.dependencyCollection': true,
    'telemetry.enabled': true,
    'telemetry.heartbeatInterval': 60000,
    'telemetry.logCollection': false,
    'telemetry.metrics': true,
    traceId128BitGenerationEnabled: true,
    traceId128BitLoggingEnabled: false,
    tracing: true,
    url: undefined,
    version: '1.0.0',
    instrumentation_config_id: undefined
  },
  _env: {
    'appsec.blockedTemplateHtml': undefined,
    'appsec.blockedTemplateJson': undefined,
    'appsec.enabled': undefined,
    'appsec.obfuscatorKeyRegex': undefined,
    'appsec.obfuscatorValueRegex': undefined,
    'appsec.rasp.enabled': undefined,
    'appsec.rateLimit': undefined,
    'appsec.rules': undefined,
    'appsec.sca.enabled': undefined,
    'appsec.standalone.enabled': undefined,
    'appsec.stackTrace.enabled': undefined,
    'appsec.stackTrace.maxDepth': undefined,
    'appsec.stackTrace.maxStackTraces': undefined,
    'appsec.wafTimeout': undefined,
    clientIpEnabled: undefined,
    clientIpHeader: undefined,
    dbmPropagationMode: undefined,
    'dogstatsd.hostname': undefined,
    'dogstatsd.port': undefined,
    dsmEnabled: undefined,
    env: undefined,
    'experimental.enableGetRumData': undefined,
    'experimental.exporter': undefined,
    'experimental.runtimeId': undefined,
    flushMinSpans: undefined,
    gitMetadataEnabled: undefined,
    headerTags: null,
    hostname: undefined,
    'iast.deduplicationEnabled': undefined,
    'iast.enabled': undefined,
    'iast.maxConcurrentRequests': undefined,
    'iast.maxContextOperations': undefined,
    'iast.redactionEnabled': undefined,
    'iast.redactionNamePattern': undefined,
    'iast.redactionValuePattern': undefined,
    'iast.telemetryVerbosity': undefined,
    isGCPFunction: false,
    logInjection: undefined,
    openAiLogsEnabled: undefined,
    openaiSpanCharLimit: undefined,
    port: undefined,
    'profiling.enabled': undefined,
    'profiling.exporters': undefined,
    'profiling.sourceMap': undefined,
    protocolVersion: undefined,
    queryStringObfuscation: undefined,
    'remoteConfig.enabled': true,
    'remoteConfig.pollInterval': undefined,
    reportHostname: undefined,
    runtimeMetrics: undefined,
    sampleRate: undefined,
    'sampler.rateLimit': undefined,
    'sampler.rules': null,
    scope: undefined,
    service: undefined,
    site: undefined,
    spanRemoveIntegrationFromService: undefined,
    startupLogs: undefined,
    tags: null,
    tagsHeaderMaxLength: undefined,
    'telemetry.enabled': true,
    instrumentation_config_id: undefined,
    'telemetry.debug': undefined,
    'telemetry.dependencyCollection': undefined,
    'telemetry.heartbeatInterval': undefined,
    'telemetry.logCollection': undefined,
    'telemetry.metrics': undefined,
    traceId128BitGenerationEnabled: undefined,
    traceId128BitLoggingEnabled: undefined,
    tracing: undefined,
    version: undefined
  },
  _envUnprocessed: {
    'appsec.blockedTemplateHtml': undefined,
    'appsec.blockedTemplateJson': undefined,
    'appsec.rateLimit': undefined,
    'appsec.stackTrace.maxDepth': undefined,
    'appsec.stackTrace.maxStackTraces': undefined,
    'appsec.wafTimeout': undefined,
    flushMinSpans: undefined,
    'iast.maxConcurrentRequests': undefined,
    'iast.maxContextOperations': undefined,
    'iast.requestSampling': undefined,
    openaiSpanCharLimit: undefined,
    'remoteConfig.pollInterval': undefined,
    'sampler.rules': undefined,
    'telemetry.heartbeatInterval': NaN
  },
  _options: {
    'appsec.blockedTemplateHtml': undefined,
    'appsec.blockedTemplateJson': undefined,
    'appsec.enabled': undefined,
    'appsec.obfuscatorKeyRegex': undefined,
    'appsec.obfuscatorValueRegex': undefined,
    'appsec.rasp.enabled': undefined,
    'appsec.rateLimit': undefined,
    'appsec.rules': undefined,
    'appsec.standalone.enabled': undefined,
    'appsec.stackTrace.enabled': undefined,
    'appsec.stackTrace.maxDepth': undefined,
    'appsec.stackTrace.maxStackTraces': undefined,
    'appsec.wafTimeout': undefined,
    clientIpEnabled: undefined,
    clientIpHeader: undefined,
    dbmPropagationMode: undefined,
    dsmEnabled: undefined,
    env: undefined,
    'experimental.enableGetRumData': undefined,
    'experimental.exporter': undefined,
    'experimental.runtimeId': undefined,
    flushInterval: undefined,
    flushMinSpans: undefined,
    headerTags: null,
    hostname: undefined,
    'iast.deduplicationEnabled': undefined,
    'iast.enabled': undefined,
    'iast.maxConcurrentRequests': undefined,
    'iast.maxContextOperations': undefined,
    'iast.redactionEnabled': undefined,
    'iast.redactionNamePattern': undefined,
    'iast.redactionValuePattern': undefined,
    'iast.telemetryVerbosity': undefined,
    isCiVisibility: undefined,
    logInjection: undefined,
    lookup: undefined,
    openAiLogsEnabled: undefined,
    peerServiceMapping: undefined,
    plugins: undefined,
    port: undefined,
    'profiling.enabled': undefined,
    protocolVersion: undefined,
    reportHostname: undefined,
    runtimeMetrics: undefined,
    sampleRate: undefined,
    'sampler.rateLimit': undefined,
    'sampler.rules': null,
    service: undefined,
    site: undefined,
    spanRemoveIntegrationFromService: undefined,
    startupLogs: undefined,
    tags: null,
    'telemetry.logCollection': undefined,
    traceId128BitGenerationEnabled: undefined,
    traceId128BitLoggingEnabled: undefined,
    version: undefined
  },
  _optsUnprocessed: {
    'appsec.blockedTemplateHtml': undefined,
    'appsec.blockedTemplateJson': undefined,
    'appsec.rateLimit': undefined,
    'appsec.stackTrace.maxDepth': undefined,
    'appsec.stackTrace.maxStackTraces': undefined,
    'appsec.wafTimeout': undefined,
    flushInterval: undefined,
    flushMinSpans: undefined,
    'iast.maxConcurrentRequests': undefined,
    'iast.maxContextOperations': undefined
  },
  _calculated: {
    url: undefined,
    'dogstatsd.hostname': '127.0.0.1',
    isGitUploadEnabled: undefined,
    spanComputePeerService: false,
    'stats.enabled': false
  },
  _remote: {
    sampleRate: undefined,
    logInjection: undefined,
    headerTags: null,
    tags: null,
    tracing: undefined,
    'sampler.rules': null
  },
  _remoteUnprocessed: { 'sampler.rules': undefined },
  clientIpEnabled: false,
  clientIpHeader: null,
  dbmPropagationMode: 'disabled',
  dogstatsd: { hostname: '127.0.0.1', port: '8125' },
  dsmEnabled: false,
  env: undefined,
  experimental: { enableGetRumData: false, exporter: undefined, runtimeId: false },
  flushInterval: 2000,
  flushMinSpans: 1000,
  gitMetadataEnabled: true,
  headerTags: [],
  hostname: '127.0.0.1',
  iast: {
    deduplicationEnabled: true,
    enabled: false,
    maxConcurrentRequests: 2,
    maxContextOperations: 2,
    redactionEnabled: true,
    redactionNamePattern: null,
    redactionValuePattern: null,
    requestSampling: 30,
    telemetryVerbosity: 'INFORMATION'
  },
  isCiVisibility: false,
  isEarlyFlakeDetectionEnabled: false,
  isGCPFunction: false,
  isGitUploadEnabled: false,
  isIntelligentTestRunnerEnabled: false,
  isManualApiEnabled: false,
  logInjection: false,
  lookup: undefined,
  openAiLogsEnabled: false,
  openaiSpanCharLimit: 128,
  peerServiceMapping: {},
  plugins: true,
  port: '8126',
  profiling: {
    enabled: undefined,
    exporters: 'agent',
    sourceMap: true,
    ssi: false,
    heuristicsEnabled: false,
    longLivedThreshold: undefined
  },
  protocolVersion: '0.4',
  queryStringObfuscation: '(?:p(?:ass)?w(?:or)?d|pass(?:_?phrase)?|secret|(?:api_?|private_?|public_?|access_?|secret_?)key(?:_?id)?|token|consumer_?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?)(?:(?:\\s|%20)*(?:=|%3D)[^&]+|(?:"|%22)(?:\\s|%20)*(?::|%3A)(?:\\s|%20)*(?:"|%22)(?:%2[^2]|%[^2]|[^"%])+(?:"|%22))|bearer(?:\\s|%20)+[a-z0-9\\._\\-]+|token(?::|%3A)[a-z0-9]{13}|gh[opsu]_[0-9a-zA-Z]{36}|ey[I-L](?:[\\w=-]|%3D)+\\.ey[I-L](?:[\\w=-]|%3D)+(?:\\.(?:[\\w.+\\/=-]|%3D|%2F|%2B)+)?|[\\-]{5}BEGIN(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY[\\-]{5}[^\\-]+[\\-]{5}END(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY|ssh-rsa(?:\\s|%20)*(?:[a-z0-9\\/\\.+]|%2F|%5C|%2B){100,}',
  remoteConfig: { enabled: true, pollInterval: 5 },
  reportHostname: false,
  runtimeMetrics: false,
  sampleRate: undefined,
  scope: undefined,
  service: 'watson-nodejs-demo-app',
  site: 'datadoghq.com',
  spanAttributeSchema: 'v0',
  spanComputePeerService: false,
  spanRemoveIntegrationFromService: false,
  startupLogs: false,
  stats: { enabled: false },
  tags: {
    service: 'watson-nodejs-demo-app',
    env: undefined,
    version: '1.0.0',
    'runtime-id': 'd6cc416f-1ead-40b8-91e5-cb35b16b824a'
  },
  tagsHeaderMaxLength: 512,
  telemetry: {
    debug: false,
    dependencyCollection: true,
    enabled: true,
    heartbeatInterval: 60000,
    logCollection: false,
    metrics: true
  },
  traceId128BitGenerationEnabled: true,
  traceId128BitLoggingEnabled: false,
  tracing: true,
  url: undefined,
  version: '1.0.0',
  instrumentation_config_id: undefined,
  repositoryUrl: 'https://github.com/DataDog/debugger-demos.git',
  commitSHA: '0fdd93c21c664efa8eeaf42f1349d4873e484348'
}
Expand to see the config object after hiding the internal-only properties
Config {
  debug: true,
  logger: undefined,
  logLevel: 'debug',
  apiKey: undefined,
  serviceMapping: {},
  tracePropagationStyle: {
    inject: [ 'datadog', 'tracecontext' ],
    extract: [ 'datadog', 'tracecontext' ],
    otelPropagators: false
  },
  tracePropagationExtractFirst: false,
  sampler: {
    spanSamplingRules: [],
    rateLimit: undefined,
    rules: [],
    sampleRate: undefined
  },
  appsec: {
    blockedTemplateGraphql: undefined,
    eventTracking: { enabled: true, mode: 'safe' },
    apiSecurity: { enabled: true, requestSampling: 0.1 },
    blockedTemplateHtml: undefined,
    blockedTemplateJson: undefined,
    enabled: undefined,
    obfuscatorKeyRegex: '(?i)pass|pw(?:or)?d|secret|(?:api|private|public|access)[_-]?key|token|consumer[_-]?(?:id|key|secret)|sign(?:ed|ature)|bearer|authorization|jsessionid|phpsessid|asp\\.net[_-]sessionid|sid|jwt',
    obfuscatorValueRegex: '(?i)(?:p(?:ass)?w(?:or)?d|pass(?:[_-]?phrase)?|secret(?:[_-]?key)?|(?:(?:api|private|public|access)[_-]?)key(?:[_-]?id)?|(?:(?:auth|access|id|refresh)[_-]?)?token|consumer[_-]?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?|jsessionid|phpsessid|asp\\.net(?:[_-]|-)sessionid|sid|jwt)(?:\\s*=[^;]|"\\s*:\\s*"[^"]+")|bearer\\s+[a-z0-9\\._\\-]+|token:[a-z0-9]{13}|gh[opsu]_[0-9a-zA-Z]{36}|ey[I-L][\\w=-]+\\.ey[I-L][\\w=-]+(?:\\.[\\w.+\\/=-]+)?|[\\-]{5}BEGIN[a-z\\s]+PRIVATE\\sKEY[\\-]{5}[^\\-]+[\\-]{5}END[a-z\\s]+PRIVATE\\sKEY|ssh-rsa\\s*[a-z0-9\\/\\.+]{100,}',
    rasp: { enabled: false },
    rateLimit: 100,
    rules: undefined,
    sca: { enabled: null },
    standalone: { enabled: undefined },
    stackTrace: { enabled: true, maxDepth: 32, maxStackTraces: 2 },
    wafTimeout: 5000
  },
  memcachedCommandEnabled: false,
  isAzureFunction: false,
  spanLeakDebug: 0,
  installSignature: { id: null, time: null, type: null },
  clientIpEnabled: false,
  clientIpHeader: null,
  dbmPropagationMode: 'disabled',
  dogstatsd: { hostname: '127.0.0.1', port: '8125' },
  dsmEnabled: false,
  env: undefined,
  experimental: { enableGetRumData: false, exporter: undefined, runtimeId: false },
  flushInterval: 2000,
  flushMinSpans: 1000,
  gitMetadataEnabled: true,
  headerTags: [],
  hostname: '127.0.0.1',
  iast: {
    deduplicationEnabled: true,
    enabled: false,
    maxConcurrentRequests: 2,
    maxContextOperations: 2,
    redactionEnabled: true,
    redactionNamePattern: null,
    redactionValuePattern: null,
    requestSampling: 30,
    telemetryVerbosity: 'INFORMATION'
  },
  isCiVisibility: false,
  isEarlyFlakeDetectionEnabled: false,
  isGCPFunction: false,
  isGitUploadEnabled: false,
  isIntelligentTestRunnerEnabled: false,
  isManualApiEnabled: false,
  logInjection: false,
  lookup: undefined,
  openAiLogsEnabled: false,
  openaiSpanCharLimit: 128,
  peerServiceMapping: {},
  plugins: true,
  port: '8126',
  profiling: {
    enabled: undefined,
    exporters: 'agent',
    sourceMap: true,
    ssi: false,
    heuristicsEnabled: false,
    longLivedThreshold: undefined
  },
  protocolVersion: '0.4',
  queryStringObfuscation: '(?:p(?:ass)?w(?:or)?d|pass(?:_?phrase)?|secret|(?:api_?|private_?|public_?|access_?|secret_?)key(?:_?id)?|token|consumer_?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?)(?:(?:\\s|%20)*(?:=|%3D)[^&]+|(?:"|%22)(?:\\s|%20)*(?::|%3A)(?:\\s|%20)*(?:"|%22)(?:%2[^2]|%[^2]|[^"%])+(?:"|%22))|bearer(?:\\s|%20)+[a-z0-9\\._\\-]+|token(?::|%3A)[a-z0-9]{13}|gh[opsu]_[0-9a-zA-Z]{36}|ey[I-L](?:[\\w=-]|%3D)+\\.ey[I-L](?:[\\w=-]|%3D)+(?:\\.(?:[\\w.+\\/=-]|%3D|%2F|%2B)+)?|[\\-]{5}BEGIN(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY[\\-]{5}[^\\-]+[\\-]{5}END(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY|ssh-rsa(?:\\s|%20)*(?:[a-z0-9\\/\\.+]|%2F|%5C|%2B){100,}',
  remoteConfig: { enabled: true, pollInterval: 5 },
  reportHostname: false,
  runtimeMetrics: false,
  sampleRate: undefined,
  scope: undefined,
  service: 'watson-nodejs-demo-app',
  site: 'datadoghq.com',
  spanAttributeSchema: 'v0',
  spanComputePeerService: false,
  spanRemoveIntegrationFromService: false,
  startupLogs: false,
  stats: { enabled: false },
  tags: {
    service: 'watson-nodejs-demo-app',
    env: undefined,
    version: '1.0.0',
    'runtime-id': '23b27c6c-b3d0-40fa-a04d-1af2a4f78987'
  },
  tagsHeaderMaxLength: 512,
  telemetry: {
    debug: false,
    dependencyCollection: true,
    enabled: true,
    heartbeatInterval: 60000,
    logCollection: false,
    metrics: true
  },
  traceId128BitGenerationEnabled: true,
  traceId128BitLoggingEnabled: false,
  tracing: true,
  url: undefined,
  version: '1.0.0',
  instrumentation_config_id: undefined,
  repositoryUrl: 'https://github.com/DataDog/debugger-demos.git',
  commitSHA: '0fdd93c21c664efa8eeaf42f1349d4873e484348'
}

@watson watson self-assigned this Jul 17, 2024
Copy link

github-actions bot commented Jul 17, 2024

Overall package size

Self size: 6.85 MB
Deduped: 58.81 MB
No deduping: 59.09 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | @datadog/native-appsec | 8.0.1 | 15.59 MB | 15.6 MB | | @datadog/native-iast-taint-tracking | 3.0.0 | 11.14 MB | 11.15 MB | | @datadog/pprof | 5.3.0 | 9.85 MB | 10.22 MB | | protobufjs | 7.2.5 | 2.77 MB | 7.01 MB | | @datadog/native-iast-rewriter | 2.3.1 | 2.15 MB | 2.24 MB | | @opentelemetry/core | 1.14.0 | 872.87 kB | 1.47 MB | | @datadog/native-metrics | 2.0.0 | 898.77 kB | 1.3 MB | | @opentelemetry/api | 1.8.0 | 1.21 MB | 1.21 MB | | import-in-the-middle | 1.8.1 | 71.67 kB | 785.15 kB | | msgpack-lite | 0.1.26 | 201.16 kB | 281.59 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | pprof-format | 2.1.0 | 111.69 kB | 111.69 kB | | @datadog/sketches-js | 2.1.0 | 109.9 kB | 109.9 kB | | semver | 7.6.3 | 95.82 kB | 95.82 kB | | lodash.sortby | 4.7.0 | 75.76 kB | 75.76 kB | | lru-cache | 7.14.0 | 74.95 kB | 74.95 kB | | ignore | 5.3.1 | 51.46 kB | 51.46 kB | | int64-buffer | 0.1.10 | 49.18 kB | 49.18 kB | | shell-quote | 1.8.1 | 44.96 kB | 44.96 kB | | istanbul-lib-coverage | 3.2.0 | 29.34 kB | 29.34 kB | | tlhunter-sorted-set | 0.1.0 | 24.94 kB | 24.94 kB | | limiter | 1.1.5 | 23.17 kB | 23.17 kB | | dc-polyfill | 0.1.4 | 23.1 kB | 23.1 kB | | retry | 0.13.1 | 18.85 kB | 18.85 kB | | jest-docblock | 29.7.0 | 8.99 kB | 12.76 kB | | crypto-randomuuid | 1.0.0 | 11.18 kB | 11.18 kB | | path-to-regexp | 0.1.7 | 6.78 kB | 6.78 kB | | koalas | 1.0.2 | 6.47 kB | 6.47 kB | | module-details-from-path | 1.0.3 | 4.47 kB | 4.47 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@pr-commenter
Copy link

pr-commenter bot commented Jul 17, 2024

Benchmarks

Benchmark execution time: 2024-07-23 12:13:06

Comparing candidate commit 401da13 in PR branch watson/DEBUG-2567/config-hidden-props with baseline commit 6c7b30a in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 259 metrics, 7 unstable metrics.

@watson watson force-pushed the watson/DEBUG-2567/config-hidden-props branch from c05490c to 35c4813 Compare July 18, 2024 17:29
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jul 18, 2024

Library Vulnerabilities

✅ No library vulnerabilities found (scanned dfc947f).

@watson watson force-pushed the watson/DEBUG-2567/config-hidden-props branch from 35c4813 to dfc947f Compare July 18, 2024 17:33
@watson watson force-pushed the watson/DEBUG-2532/log-config branch from c1adefe to 8592587 Compare July 19, 2024 12:28
@watson watson force-pushed the watson/DEBUG-2567/config-hidden-props branch 2 times, most recently from fa300e8 to 0e69d6d Compare July 19, 2024 12:34
Copy link

codecov bot commented Jul 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 17.65%. Comparing base (a34a685) to head (0e69d6d).
Report is 13 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #4521       +/-   ##
===========================================
- Coverage   95.85%   17.65%   -78.21%     
===========================================
  Files         105        6       -99     
  Lines        3451      776     -2675     
  Branches       33       33               
===========================================
- Hits         3308      137     -3171     
- Misses        143      639      +496     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator Author

watson commented Jul 19, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @watson and the rest of your teammates on Graphite Graphite

Base automatically changed from watson/DEBUG-2532/log-config to master July 22, 2024 17:40
@watson watson force-pushed the watson/DEBUG-2567/config-hidden-props branch from 0e69d6d to d2c0b2c Compare July 23, 2024 06:48
@watson watson marked this pull request as ready for review July 23, 2024 06:58
@watson watson requested a review from a team as a code owner July 23, 2024 06:58
Hide internal-only properties so they are not exposed to the rest of the
app. This makes reasoning about what's a config option and what's not
easier.
@watson watson force-pushed the watson/DEBUG-2567/config-hidden-props branch from d2c0b2c to 401da13 Compare July 23, 2024 12:03
@watson watson merged commit 5c5be29 into master Jul 25, 2024
172 checks passed
@watson watson deleted the watson/DEBUG-2567/config-hidden-props branch July 25, 2024 06:45
wconti27 pushed a commit that referenced this pull request Jul 30, 2024
Hide internal-only properties so they are not exposed to the rest of the app.
This makes reasoning about what's a config option and what's not easier.

A better approach would be to use private properties on the class, but it isn't
currently possible since the ESLint config disallows using private properties.

The main motivation about this change is to make it simpler to send the config
options to another thread as all the internal state will no longer be copied,
but only the actual config options themselves. It also means that if you ever
have to `console.log(config)`, the output will be _just_ the config options,
which again is much cleaner.
wconti27 pushed a commit that referenced this pull request Jul 31, 2024
Hide internal-only properties so they are not exposed to the rest of the app.
This makes reasoning about what's a config option and what's not easier.

A better approach would be to use private properties on the class, but it isn't
currently possible since the ESLint config disallows using private properties.

The main motivation about this change is to make it simpler to send the config
options to another thread as all the internal state will no longer be copied,
but only the actual config options themselves. It also means that if you ever
have to `console.log(config)`, the output will be _just_ the config options,
which again is much cleaner.
wconti27 pushed a commit that referenced this pull request Jul 31, 2024
Hide internal-only properties so they are not exposed to the rest of the app.
This makes reasoning about what's a config option and what's not easier.

A better approach would be to use private properties on the class, but it isn't
currently possible since the ESLint config disallows using private properties.

The main motivation about this change is to make it simpler to send the config
options to another thread as all the internal state will no longer be copied,
but only the actual config options themselves. It also means that if you ever
have to `console.log(config)`, the output will be _just_ the config options,
which again is much cleaner.
wconti27 pushed a commit that referenced this pull request Jul 31, 2024
Hide internal-only properties so they are not exposed to the rest of the app.
This makes reasoning about what's a config option and what's not easier.

A better approach would be to use private properties on the class, but it isn't
currently possible since the ESLint config disallows using private properties.

The main motivation about this change is to make it simpler to send the config
options to another thread as all the internal state will no longer be copied,
but only the actual config options themselves. It also means that if you ever
have to `console.log(config)`, the output will be _just_ the config options,
which again is much cleaner.
juan-fernandez pushed a commit that referenced this pull request Aug 5, 2024
Hide internal-only properties so they are not exposed to the rest of the app.
This makes reasoning about what's a config option and what's not easier.

A better approach would be to use private properties on the class, but it isn't
currently possible since the ESLint config disallows using private properties.

The main motivation about this change is to make it simpler to send the config
options to another thread as all the internal state will no longer be copied,
but only the actual config options themselves. It also means that if you ever
have to `console.log(config)`, the output will be _just_ the config options,
which again is much cleaner.
juan-fernandez pushed a commit that referenced this pull request Aug 5, 2024
Hide internal-only properties so they are not exposed to the rest of the app.
This makes reasoning about what's a config option and what's not easier.

A better approach would be to use private properties on the class, but it isn't
currently possible since the ESLint config disallows using private properties.

The main motivation about this change is to make it simpler to send the config
options to another thread as all the internal state will no longer be copied,
but only the actual config options themselves. It also means that if you ever
have to `console.log(config)`, the output will be _just_ the config options,
which again is much cleaner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants