Skip to content

Commit

Permalink
Merge pull request #6150 from espoon-voltti/otel-async-job-exceptions
Browse files Browse the repository at this point in the history
Kerrotaan async jobien virheet OpenTelemetrylle
  • Loading branch information
Gekkio authored Dec 18, 2024
2 parents 727ce14 + 017ec27 commit 950d791
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ class AsyncJobPool<T : AsyncJobPayload>(
metrics.get()?.failedJobs?.increment()
Span.current().setStatus(StatusCode.ERROR)
val exception = (e as? UndeclaredThrowableException)?.cause ?: e
Span.current().recordException(exception)
logger.error(exception, logMeta) { "Failed to run async job $job" }
} finally {
MdcKey.USER_ID_HASH.unset()
Expand Down

0 comments on commit 950d791

Please sign in to comment.