Skip to content

Commit

Permalink
Set span status if realization fails
Browse files Browse the repository at this point in the history
  • Loading branch information
HakonSohoel committed Jan 14, 2025
1 parent be7f637 commit 735ea0e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ert/scheduler/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from typing import TYPE_CHECKING, Any

from lxml import etree
from opentelemetry.trace import Status, StatusCode
from pydantic_core._pydantic_core import ValidationError

from _ert.events import Id, RealizationTimeout, event_from_dict
Expand Down Expand Up @@ -176,6 +177,7 @@ async def run(
self.returncode = asyncio.Future()
self.started.clear()
else:
current_span.set_status(Status(StatusCode.ERROR))
await self._send(JobState.FAILED)

async def _max_runtime_task(self) -> None:
Expand Down

0 comments on commit 735ea0e

Please sign in to comment.