5959logger = logging .getLogger (__name__ )
6060
6161DD_TRACE_MANAGED_SERVICES = "DD_TRACE_MANAGED_SERVICES"
62- DD_DECODE_AUTHORIZER_CONTEXT = "DD_DECODE_AUTHORIZER_CONTEXT"
6362DD_COLD_START_TRACING = "DD_COLD_START_TRACING"
6463DD_REQUESTS_SERVICE_NAME = "DD_REQUESTS_SERVICE_NAME"
6564DD_SERVICE = "DD_SERVICE"
@@ -128,9 +127,6 @@ def __init__(self, func):
128127 depends_on_dd_tracing_enabled = (
129128 lambda original_boolean : config .trace_enabled and original_boolean
130129 )
131- self .decode_authorizer_context = depends_on_dd_tracing_enabled (
132- os .environ .get (DD_DECODE_AUTHORIZER_CONTEXT , "true" ).lower () == "true"
133- )
134130 self .cold_start_tracing = depends_on_dd_tracing_enabled (
135131 os .environ .get (DD_COLD_START_TRACING , "true" ).lower () == "true"
136132 )
@@ -246,7 +242,7 @@ def _before(self, event, context):
246242 event ,
247243 context ,
248244 extractor = self .trace_extractor ,
249- decode_authorizer_context = self .decode_authorizer_context ,
245+ decode_authorizer_context = config .decode_authorizer_context ,
250246 )
251247 self .event_source = event_source
252248 # Create a Datadog X-Ray subsegment with the trace context
@@ -264,7 +260,7 @@ def _before(self, event, context):
264260 set_dd_trace_py_root (trace_context_source , config .merge_xray_traces )
265261 if config .make_inferred_span :
266262 self .inferred_span = create_inferred_span (
267- event , context , event_source , self .decode_authorizer_context
263+ event , context , event_source , config .decode_authorizer_context
268264 )
269265 if self .data_streams_enabled :
270266 set_dsm_context (event , event_source )
0 commit comments