5757logger = logging .getLogger (__name__ )
5858
5959DD_TRACE_MANAGED_SERVICES = "DD_TRACE_MANAGED_SERVICES"
60- DD_DECODE_AUTHORIZER_CONTEXT = "DD_DECODE_AUTHORIZER_CONTEXT"
6160DD_COLD_START_TRACING = "DD_COLD_START_TRACING"
6261DD_REQUESTS_SERVICE_NAME = "DD_REQUESTS_SERVICE_NAME"
6362DD_SERVICE = "DD_SERVICE"
@@ -125,9 +124,6 @@ def __init__(self, func):
125124 depends_on_dd_tracing_enabled = (
126125 lambda original_boolean : config .trace_enabled and original_boolean
127126 )
128- self .decode_authorizer_context = depends_on_dd_tracing_enabled (
129- os .environ .get (DD_DECODE_AUTHORIZER_CONTEXT , "true" ).lower () == "true"
130- )
131127 self .cold_start_tracing = depends_on_dd_tracing_enabled (
132128 os .environ .get (DD_COLD_START_TRACING , "true" ).lower () == "true"
133129 )
@@ -229,7 +225,7 @@ def _before(self, event, context):
229225 event ,
230226 context ,
231227 extractor = self .trace_extractor ,
232- decode_authorizer_context = self .decode_authorizer_context ,
228+ decode_authorizer_context = config .decode_authorizer_context ,
233229 )
234230 self .event_source = event_source
235231 # Create a Datadog X-Ray subsegment with the trace context
@@ -247,7 +243,7 @@ def _before(self, event, context):
247243 set_dd_trace_py_root (trace_context_source , config .merge_xray_traces )
248244 if config .make_inferred_span :
249245 self .inferred_span = create_inferred_span (
250- event , context , event_source , self .decode_authorizer_context
246+ event , context , event_source , config .decode_authorizer_context
251247 )
252248 self .span = create_function_execution_span (
253249 context = context ,
0 commit comments