diff --git a/src/python/AgentHubAPI/app/routers/manage.py b/src/python/AgentHubAPI/app/routers/manage.py index 5556b3736c..b08b609e6c 100644 --- a/src/python/AgentHubAPI/app/routers/manage.py +++ b/src/python/AgentHubAPI/app/routers/manage.py @@ -33,7 +33,7 @@ async def refresh_cache(name: str): The name of the cache object to refresh. "config", for example. """ - with tracer.start_as_current_span('refresh_cache') as span: + with tracer.start_span('refresh_cache') as span: span.set_attribute('cache_name', name) span.add_event(f'{API_NAME} {name} cache refresh requested.') diff --git a/src/python/DataSourceHubAPI/app/routers/manage.py b/src/python/DataSourceHubAPI/app/routers/manage.py index 5556b3736c..b08b609e6c 100644 --- a/src/python/DataSourceHubAPI/app/routers/manage.py +++ b/src/python/DataSourceHubAPI/app/routers/manage.py @@ -33,7 +33,7 @@ async def refresh_cache(name: str): The name of the cache object to refresh. "config", for example. """ - with tracer.start_as_current_span('refresh_cache') as span: + with tracer.start_span('refresh_cache') as span: span.set_attribute('cache_name', name) span.add_event(f'{API_NAME} {name} cache refresh requested.') diff --git a/src/python/GatekeeperIntegrationAPI/app/routers/analyze.py b/src/python/GatekeeperIntegrationAPI/app/routers/analyze.py index 8bdc717426..ba49413629 100644 --- a/src/python/GatekeeperIntegrationAPI/app/routers/analyze.py +++ b/src/python/GatekeeperIntegrationAPI/app/routers/analyze.py @@ -34,7 +34,7 @@ async def analyze(request: AnalyzeRequest) -> AnalyzeResponse: If the request includes anonymize=True, the original content will be returned anonymized. """ - #with tracer.start_as_current_span('analyze') as span: + #with tracer.start_span('analyze') as span: try: analyzer = Analyzer(request) return analyzer.analyze() diff --git a/src/python/GatekeeperIntegrationAPI/app/routers/manage.py b/src/python/GatekeeperIntegrationAPI/app/routers/manage.py index 221a9b497d..aacf2b24be 100644 --- a/src/python/GatekeeperIntegrationAPI/app/routers/manage.py +++ b/src/python/GatekeeperIntegrationAPI/app/routers/manage.py @@ -33,7 +33,7 @@ async def refresh_cache(name: str): The name of the cache object to refresh. "config", for example. """ - #with tracer.start_as_current_span('refresh_cache') as span: + #with tracer.start_span('refresh_cache') as span: # span.set_attribute('cache_name', name) # span.add_event(f'{API_NAME} {name} cache refresh requested.') diff --git a/src/python/LangChainAPI/app/routers/completions.py b/src/python/LangChainAPI/app/routers/completions.py index d3558f4165..d4672889c1 100644 --- a/src/python/LangChainAPI/app/routers/completions.py +++ b/src/python/LangChainAPI/app/routers/completions.py @@ -79,7 +79,7 @@ async def submit_completion_request( CompletionOperation Object containing the operation ID and status. """ - with tracer.start_as_current_span('submit_completion_request') as span: + with tracer.start_span('submit_completion_request') as span: try: # Get the operation_id from the completion request. operation_id = completion_request.operation_id @@ -126,7 +126,7 @@ async def create_completion_response( """ Generates the completion response for the specified completion request. """ - with tracer.start_as_current_span(f'create_completion_response') as span: + with tracer.start_span(f'create_completion_response') as span: try: span.set_attribute('operation_id', operation_id) span.set_attribute('instance_id', instance_id) @@ -209,7 +209,7 @@ async def get_operation_status( instance_id: str, operation_id: str ) -> LongRunningOperation: - with tracer.start_as_current_span(f'get_operation_status') as span: + with tracer.start_span(f'get_operation_status') as span: # Create an operations manager to get the operation status. operations_manager = OperationsManager(raw_request.app.extra['config']) @@ -244,7 +244,7 @@ async def get_operation_result( instance_id: str, operation_id: str ) -> CompletionResponse: - with tracer.start_as_current_span(f'get_operation_result') as span: + with tracer.start_span(f'get_operation_result') as span: # Create an operations manager to get the operation result. operations_manager = OperationsManager(raw_request.app.extra['config']) @@ -277,7 +277,7 @@ async def get_operation_logs( instance_id: str, operation_id: str ) -> List[LongRunningOperationLogEntry]: - with tracer.start_as_current_span(f'get_operation_log') as span: + with tracer.start_span(f'get_operation_log') as span: # Create an operations manager to get the operation log. operations_manager = OperationsManager(raw_request.app.extra['config']) diff --git a/src/python/LangChainAPI/app/routers/manage.py b/src/python/LangChainAPI/app/routers/manage.py index 34ca3b743c..93de03b7a4 100644 --- a/src/python/LangChainAPI/app/routers/manage.py +++ b/src/python/LangChainAPI/app/routers/manage.py @@ -33,7 +33,7 @@ async def refresh_cache(instance_id: str, name: str): The name of the cache object to refresh. "config", for example. """ - with tracer.start_as_current_span('refresh_cache') as span: + with tracer.start_span('refresh_cache') as span: span.set_attribute('instance_id', instance_id) span.set_attribute('cache_name', name) span.add_event(f'{API_NAME} {name} cache refresh requested.') diff --git a/src/python/PromptHubAPI/app/routers/manage.py b/src/python/PromptHubAPI/app/routers/manage.py index 5556b3736c..b08b609e6c 100644 --- a/src/python/PromptHubAPI/app/routers/manage.py +++ b/src/python/PromptHubAPI/app/routers/manage.py @@ -33,7 +33,7 @@ async def refresh_cache(name: str): The name of the cache object to refresh. "config", for example. """ - with tracer.start_as_current_span('refresh_cache') as span: + with tracer.start_span('refresh_cache') as span: span.set_attribute('cache_name', name) span.add_event(f'{API_NAME} {name} cache refresh requested.')