OpenTelemetry: Errors need to be written to specific tags?

Hi all,

So while New Relic does correctly pick up errors from the span’s events collection (as viewable in Events > Errors), seemingly though these errors don’t register within the actual trace itself (i.e drilling into traces in Monitor > Distributed Tracing) unless we manually add exception information into custom attributes error.*. We are using the dotnet otel library and we had to add some boilerplate code to enrich the span with these attributes e.g error.msg. Also, the error pane on the left always seems to be empty
image

Thanks

@domholmes Thank you for your question. There is a Best practices for OpenTelemetry with New Relic | New Relic Documentation that has information around setting up traces that you may find helpful. I’m also going to reach out to one of the Relics that contributes to this repo to see if they have suggestions for you.

Hello @domholmes!

Happy New Year! I know you posted this question quite a while ago, but I wanted to see if you still had any questions around this. If you are still interested in pursuing this topic, there are a few questions for you that would help us help you:

  • What does your app do?
  • What instrumentation are you using?
  • What error(s) do you expect to see from this app using OpenTelemetry instrumentation?
  • What do you see without the error.* attributes added?

Our DT UI does have a way of handling OpenTelemetry status codes and OpenTelemetry error descriptions, in the right-hand side panel (when you click into a trace):

You do not have to add error.* attribute - in fact, we would recommend not doing this. New Relic supports OpenTelemetry’s notion of an error based off its notion of status, and handles it as an error.

With the information you provide, we could then see whether your configuration is working to record errors, or if the configuration is not working (in which case, we may want to proceed to opening an issue with the OpenTelemetry project).