Skip to content

Commit

Permalink
[Model Monitoring] Log exception trace (mlrun#6544)
Browse files Browse the repository at this point in the history
* [Model Monitoring] Log exception trace

Development version of mlrun#6542.

[ML-8073](https://iguazio.atlassian.net/browse/ML-8073)

* Keep error in event unchanged
  • Loading branch information
gtopper authored Oct 27, 2024
1 parent d194f19 commit e01546b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mlrun/model_monitoring/applications/_application_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import json
import traceback
from typing import Any, Optional, Union

import mlrun.common.schemas.alert as alert_objects
Expand Down Expand Up @@ -164,11 +165,15 @@ def do(self, event):
error_data = {
"Endpoint ID": event.body.endpoint_id,
"Application Class": event.body.application_name,
"Error": event.error,
"Error": "".join(
traceback.format_exception(None, event.error, event.error.__traceback__)
),
"Timestamp": event.timestamp,
}
logger.error("Error in application step", **error_data)

error_data["Error"] = event.error

event_data = alert_objects.Event(
kind=alert_objects.EventKind.MM_APP_FAILED,
entity=alert_objects.EventEntities(
Expand Down

0 comments on commit e01546b

Please sign in to comment.