본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

예외 (Exception)

원문 보기 위키 갱신

이 문서는 스팬(span) 또는 로그(log)와 연관된 단일 예외(exception)를 보고하는 데 사용하는 공유 속성을 정의해요.

출처: 문서

본문

  • 예외 속성 (Exception Attributes)
  • 폐기된 예외 속성 (Deprecated Exception Attributes)

예외 속성 (Exception Attributes)

이 문서는 스팬 또는 로그와 연관된 단일 예외를 보고하는 데 사용하는 공유 속성을 정의해요.

속성 (Attributes):

Key Stability Value Type Description Example Values
exception.message string The exception message. [1] Division by zero; Can't convert 'int' object to str implicitly
exception.stacktrace string A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. Exception in thread "main" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)
exception.type string The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. [2] java.net.ConnectException; OSError

[1] exception.message:

경고 (Warning)

이 속성은 민감한 정보를 포함할 수 있어요.

[2] exception.type: 기록된 예외 타입이 실패 분류에 의미가 없는 래퍼(wrapper)라면, 계측은 내부(inner) 예외의 타입을 대신 사용할 수 있어요(MAY). 예를 들어 Go에서 fmt.Errorf와 %w로 생성된 오류는 래퍼 타입이 실패 분류에 도움이 되지 않을 때 언랩(unwrap)할 수 있어요(MAY).

폐기된 예외 속성 (Deprecated Exception Attributes)

폐기된 예외 속성이에요.

속성 (Attributes):

Key Stability Value Type Description Example Values
exception.escaped It’s no longer recommended to record exceptions that are handled and do not escape the scope of a span. boolean Indicates that the exception is escaping the scope of the span.

더 알아보기 (Learn more)