Skip to content

Commit

Permalink
change DD_AWS_SDK_DYNAMODB_TABLE_PRIMARY_KEYS env var to `DD_TRACE_…
Browse files Browse the repository at this point in the history
…DYNAMODB_TABLE_PRIMARY_KEYS`
  • Loading branch information
nhulston committed Feb 13, 2025
1 parent c209772 commit df24756
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/datadog-plugin-aws-sdk/src/services/dynamodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ class DynamoDb extends BaseAwsSdkPlugin {
return this.dynamoPrimaryKeyConfig
}

const configStr = this._tracerConfig?.aws?.dynamoDb?.tablePrimaryKeys
const configStr = this._tracerConfig?.trace?.dynamoDb?.tablePrimaryKeys
if (!configStr) {
log.warn('Missing DD_AWS_SDK_DYNAMODB_TABLE_PRIMARY_KEYS env variable. ' +
log.warn('Missing DD_TRACE_DYNAMODB_TABLE_PRIMARY_KEYS env variable. ' +
'Please add your table\'s primary keys under this env variable.')
return
}
Expand Down
6 changes: 3 additions & 3 deletions packages/dd-trace/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ class Config {
this._setValue(defaults, 'version', pkg.version)
this._setValue(defaults, 'instrumentation_config_id', undefined)
this._setValue(defaults, 'trace.aws.addSpanPointers', true)
this._setValue(defaults, 'aws.dynamoDb.tablePrimaryKeys', undefined)
this._setValue(defaults, 'trace.dynamoDb.tablePrimaryKeys', undefined)
}

_applyEnvironment () {
Expand All @@ -599,7 +599,6 @@ class Config {
DD_APPSEC_RASP_ENABLED,
DD_APPSEC_TRACE_RATE_LIMIT,
DD_APPSEC_WAF_TIMEOUT,
DD_AWS_SDK_DYNAMODB_TABLE_PRIMARY_KEYS,
DD_CRASHTRACKING_ENABLED,
DD_CODE_ORIGIN_FOR_SPANS_ENABLED,
DD_DATA_STREAMS_ENABLED,
Expand Down Expand Up @@ -670,6 +669,7 @@ class Config {
DD_TRACE_BAGGAGE_MAX_ITEMS,
DD_TRACE_CLIENT_IP_ENABLED,
DD_TRACE_CLIENT_IP_HEADER,
DD_TRACE_DYNAMODB_TABLE_PRIMARY_KEYS,
DD_TRACE_ENABLED,
DD_TRACE_EXPERIMENTAL_EXPORTER,
DD_TRACE_EXPERIMENTAL_GET_RUM_DATA_ENABLED,
Expand Down Expand Up @@ -906,7 +906,7 @@ class Config {
this._setString(env, 'version', DD_VERSION || tags.version)
this._setBoolean(env, 'inferredProxyServicesEnabled', DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED)
this._setBoolean(env, 'trace.aws.addSpanPointers', DD_TRACE_AWS_ADD_SPAN_POINTERS)
this._setString(env, 'aws.dynamoDb.tablePrimaryKeys', DD_AWS_SDK_DYNAMODB_TABLE_PRIMARY_KEYS)
this._setString(env, 'trace.dynamoDb.tablePrimaryKeys', DD_TRACE_DYNAMODB_TABLE_PRIMARY_KEYS)
this._setArray(env, 'graphqlErrorExtensions', DD_TRACE_GRAPHQL_ERROR_EXTENSIONS)
}

Expand Down

0 comments on commit df24756

Please sign in to comment.