hs-opentelemetry icon indicating copy to clipboard operation
hs-opentelemetry copied to clipboard

Code detection is flaky when you define helpers for `inSpan`

Open parsonsmatt opened this issue 9 months ago • 3 comments

If you define an inSpan helper function like:

myInSpan :: HasCallStack => Text -> IO a -> IO a
myInSpan name action = inSpan name defaultSpanArguments action

Then every use of myInSpan will be registered as the function that the span originates in. This is because inSpan' uses callerAttributes which only cares about the caller of inSpan.

parsonsmatt avatar Sep 15 '23 22:09 parsonsmatt