Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore exit success #91

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Ignore exit success
parsonsmatt committed Sep 11, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 2f4575a9713207f9ce6ea74de341694dd2d78799
10 changes: 7 additions & 3 deletions api/src/OpenTelemetry/Trace/Core.hs
Original file line number Diff line number Diff line change
@@ -381,9 +381,13 @@ inSpan'' t cs n args f = do
pure (lookupSpan ctx, s)
)
( \e (parent, s) -> liftIO $ do
forM_ e $ \(SomeException inner) -> do
setStatus s $ Error $ T.pack $ displayException inner
recordException s [] Nothing inner
forM_ e $ \someExn@(SomeException inner) -> do
case fromException someExn of
Just ExitSuccess ->
pure ()
_ -> do
setStatus s $ Error $ T.pack $ displayException inner
recordException s [] Nothing inner
endSpan s Nothing
adjustContext $ \ctx ->
maybe (removeSpan ctx) (`insertSpan` ctx) parent