Skip to content

Commit b08148d

Browse files
committed
remove extra call
1 parent 98e8cbe commit b08148d

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

runtimes/v1/azure_functions_runtime_v1/utils/executor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def execute_sync(function, args) -> Any:
2626
def run_sync_func(invocation_id, context, func, params):
2727
# This helper exists because we need to access the current
2828
# invocation_id from ThreadPoolExecutor's threads.
29-
context.thread_local_storage.invocation_id = invocation_id
3029
token = invocation_id_cv.set(invocation_id)
3130
try:
3231
result = functools.partial(execute_sync, func)

runtimes/v2/azure_functions_runtime/utils/executor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def execute_sync(function, args) -> Any:
2525
def run_sync_func(invocation_id, context, func, params):
2626
# This helper exists because we need to access the current
2727
# invocation_id from ThreadPoolExecutor's threads.
28-
context.thread_local_storage.invocation_id = invocation_id
2928
token = invocation_id_cv.set(invocation_id)
3029
try:
3130
result = functools.partial(execute_sync, func)

workers/azure_functions_worker/dispatcher.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,6 @@ def _create_sync_call_tp(
10131013
def _run_sync_func(self, invocation_id, context, func, params):
10141014
# This helper exists because we need to access the current
10151015
# invocation_id from ThreadPoolExecutor's threads.
1016-
context.thread_local_storage.invocation_id = invocation_id
10171016
try:
10181017
return ExtensionManager.get_sync_invocation_wrapper(context,
10191018
func)(params)

workers/tests/unittests/test_opentelemetry.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from tests.utils import testutils
99

1010
from azure_functions_worker import protos
11+
from azure_functions_worker.protos.FunctionRpc_pb2 import RpcTraceContext
1112

1213

1314
class TestOpenTelemetry(unittest.TestCase):
@@ -309,7 +310,7 @@ def test_otel_configured_before_first_log_in_invocation_request(
309310
invocation_request=protos.InvocationRequest(
310311
invocation_id="test-inv-123",
311312
function_id="test-func-id",
312-
trace_context=protos.RpcTraceContext(
313+
trace_context=RpcTraceContext(
313314
trace_parent="00-trace-parent",
314315
trace_state="state"
315316
)
@@ -392,7 +393,7 @@ def test_azure_monitor_configured_before_first_log(
392393
invocation_request=protos.InvocationRequest(
393394
invocation_id="test-inv-456",
394395
function_id="test-func-id",
395-
trace_context=protos.RpcTraceContext(
396+
trace_context=RpcTraceContext(
396397
trace_parent="00-trace-parent",
397398
trace_state="state"
398399
)
@@ -466,7 +467,7 @@ def test_otel_configured_before_first_log_sync_function(
466467
invocation_request=protos.InvocationRequest(
467468
invocation_id="test-inv-sync",
468469
function_id="test-func-id",
469-
trace_context=protos.RpcTraceContext(
470+
trace_context=RpcTraceContext(
470471
trace_parent="00-trace-parent",
471472
trace_state="state"
472473
)

0 commit comments

Comments
 (0)