SIENTIAPDE-1445
Enhance PI Web API integration and update test configurations - Adjusted execution counts in tests.ipynb for better notebook state management. - Introduced a new pi_web_api_query structure in tests.ipynb for improved API configuration. - Updated API class to format timestamps using DATETIME_FORMAT_WITH_TZ. - Refactored PIWebAPIClient to ensure correct web ID retrieval and emit metrics accurately. - Streamlined workflow parameters in pi_web_api_scouter.py for clarity and flexibility.
This commit is contained in:
@@ -11,7 +11,7 @@ with workflow.unsafe.imports_passed_through():
|
||||
from sientia_do.observability.sientia_monitoring import SientiaMonitoring
|
||||
|
||||
from scouter.utils.clients.pi_web_api_client import PIWebAPIClient
|
||||
|
||||
from sientia_do.temporal.constants import DATETIME_FORMAT_WITH_TZ
|
||||
|
||||
class API(SientiaMonitoring):
|
||||
"""
|
||||
@@ -127,6 +127,8 @@ class API(SientiaMonitoring):
|
||||
)
|
||||
raise e
|
||||
|
||||
latest_values['timestamp'] = latest_values['timestamp'].dt.strftime(DATETIME_FORMAT_WITH_TZ)
|
||||
|
||||
self.debug(f'Latest values: {latest_values}', metadata=metadata)
|
||||
self.info(f'Gathered {len(latest_values)} tag values', metadata=metadata)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user