메시징 예외 시맨틱 컨벤션 (Semantic conventions for messaging exceptions)
메시징 작업에서 발생한 예외(exception)를 기록하기 위한 시맨틱 컨벤션을 소개해요.
출처: 문서
본문
이 문서는 메시징 작업에서 발생한 예외를 기록하기 위한 시맨틱 컨벤션을 정의해요.
- 메시징 생성 예외 (Messaging create exception)
- 메시징 전송 예외 (Messaging send exception)
- 메시징 수신 예외 (Messaging receive exception)
- 메시징 정산 예외 (Messaging settle exception)
- 메시징 처리 예외 (Messaging process exception)
메시징 생성 예외 (Messaging create exception)
이벤트 이름은 반드시 messaging.create.exception이어야 해요(MUST).
이 이벤트는 메시징 생성(create) 작업 중에 발생한 예외를 나타내요.
이 이벤트는 메시징 생성 작업 중 예외가 발생하면 기록해야 해요(SHOULD). 이 이벤트를 기록할 때 계측은 심각도(severity)를 WARN(심각도 번호 13)으로 설정해야 해요(SHOULD). 계측은 해당 메시징 생성 스팬에서 캡처한 속성으로 예외 이벤트를 채우는 구성 옵션을 제공할 수 있어요(MAY).
속성 (Attributes):
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
exception.message |
Conditionally Required [1] |
string | The exception message. [2] | Division by zero; Can't convert 'int' object to str implicitly |
|
exception.type |
Conditionally Required [3] |
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. [4] | java.net.ConnectException; OSError |
|
exception.stacktrace |
Recommended |
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) |
[1] exception.message: exception.type이 설정되지 않았다면 필수이고, 그렇지 않으면 권장돼요.
[2] exception.message:
경고 (Warning)
이 속성은 민감한 정보를 포함할 수 있어요.
[3] exception.type: exception.message가 설정되지 않았다면 필수이고, 그렇지 않으면 권장돼요.
[4] exception.type: 기록된 예외 타입이 실패 분류에 의미가 없는 래퍼(wrapper)라면,
계측은 내부(inner) 예외의 타입을 대신 사용할 수 있어요(MAY). 예를 들어 Go에서 fmt.Errorf와
%w로 생성된 오류는 래퍼 타입이 실패 분류에 도움이 되지 않을 때 언랩(unwrap)할 수 있어요(MAY).
메시징 전송 예외 (Messaging send exception)
이벤트 이름은 반드시 messaging.send.exception이어야 해요(MUST).
이 이벤트는 메시징 전송(send) 작업 중에 발생한 예외를 나타내요.
이 이벤트는 메시징 전송 작업 중 예외가 발생하면 기록해야 해요(SHOULD). 이 이벤트를 기록할 때 계측은 심각도를 WARN(심각도 번호 13)으로 설정해야 해요(SHOULD). 계측은 해당 메시징 전송 스팬에서 캡처한 속성으로 예외 이벤트를 채우는 구성 옵션을 제공할 수 있어요(MAY).
속성 (Attributes):
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
exception.message |
Conditionally Required [1] |
string | The exception message. [2] | Division by zero; Can't convert 'int' object to str implicitly |
|
exception.type |
Conditionally Required [3] |
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. [4] | java.net.ConnectException; OSError |
|
exception.stacktrace |
Recommended |
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) |
[1] exception.message: exception.type이 설정되지 않았다면 필수이고, 그렇지 않으면 권장돼요.
[2] exception.message:
경고 (Warning)
이 속성은 민감한 정보를 포함할 수 있어요.
[3] exception.type: exception.message가 설정되지 않았다면 필수이고, 그렇지 않으면 권장돼요.
[4] exception.type: 기록된 예외 타입이 실패 분류에 의미가 없는 래퍼라면,
계측은 내부 예외의 타입을 대신 사용할 수 있어요(MAY). 예를 들어 Go에서 fmt.Errorf와
%w로 생성된 오류는 래퍼 타입이 실패 분류에 도움이 되지 않을 때 언랩할 수 있어요(MAY).
메시징 수신 예외 (Messaging receive exception)
이벤트 이름은 반드시 messaging.receive.exception이어야 해요(MUST).
이 이벤트는 메시징 수신(receive) 작업 중에 발생한 예외를 나타내요.
이 이벤트는 메시징 수신 작업 중 예외가 발생하면 기록해야 해요(SHOULD). 이 이벤트를 기록할 때 계측은 심각도를 WARN(심각도 번호 13)으로 설정해야 해요(SHOULD). 계측은 해당 메시징 수신 스팬에서 캡처한 속성으로 예외 이벤트를 채우는 구성 옵션을 제공할 수 있어요(MAY).
속성 (Attributes):
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
exception.message |
Conditionally Required [1] |
string | The exception message. [2] | Division by zero; Can't convert 'int' object to str implicitly |
|
exception.type |
Conditionally Required [3] |
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. [4] | java.net.ConnectException; OSError |
|
exception.stacktrace |
Recommended |
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) |
[1] exception.message: exception.type이 설정되지 않았다면 필수이고, 그렇지 않으면 권장돼요.
[2] exception.message:
경고 (Warning)
이 속성은 민감한 정보를 포함할 수 있어요.
[3] exception.type: exception.message가 설정되지 않았다면 필수이고, 그렇지 않으면 권장돼요.
[4] exception.type: 기록된 예외 타입이 실패 분류에 의미가 없는 래퍼라면,
계측은 내부 예외의 타입을 대신 사용할 수 있어요(MAY). 예를 들어 Go에서 fmt.Errorf와
%w로 생성된 오류는 래퍼 타입이 실패 분류에 도움이 되지 않을 때 언랩할 수 있어요(MAY).
메시징 정산 예외 (Messaging settle exception)
이벤트 이름은 반드시 messaging.settle.exception이어야 해요(MUST).
이 이벤트는 메시징 정산(settle) 작업 중에 발생한 예외를 나타내요.
이 이벤트는 메시징 정산 작업 중 예외가 발생하면 기록해야 해요(SHOULD). 이 이벤트를 기록할 때 계측은 심각도를 WARN(심각도 번호 13)으로 설정해야 해요(SHOULD). 계측은 해당 메시징 정산 스팬에서 캡처한 속성으로 예외 이벤트를 채우는 구성 옵션을 제공할 수 있어요(MAY).
속성 (Attributes):
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
exception.message |
Conditionally Required [1] |
string | The exception message. [2] | Division by zero; Can't convert 'int' object to str implicitly |
|
exception.type |
Conditionally Required [3] |
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. [4] | java.net.ConnectException; OSError |
|
exception.stacktrace |
Recommended |
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) |
[1] exception.message: exception.type이 설정되지 않았다면 필수이고, 그렇지 않으면 권장돼요.
[2] exception.message:
경고 (Warning)
이 속성은 민감한 정보를 포함할 수 있어요.
[3] exception.type: exception.message가 설정되지 않았다면 필수이고, 그렇지 않으면 권장돼요.
[4] exception.type: 기록된 예외 타입이 실패 분류에 의미가 없는 래퍼라면,
계측은 내부 예외의 타입을 대신 사용할 수 있어요(MAY). 예를 들어 Go에서 fmt.Errorf와
%w로 생성된 오류는 래퍼 타입이 실패 분류에 도움이 되지 않을 때 언랩할 수 있어요(MAY).
메시징 처리 예외 (Messaging process exception)
이벤트 이름은 반드시 messaging.process.exception이어야 해요(MUST).
이 이벤트는 메시징 처리(process) 작업 중에 발생한 예외를 나타내요.
이 이벤트는 메시징 처리 작업 중 예외가 발생하면 기록해야 해요(SHOULD). 이 이벤트를 기록할 때 계측은 심각도를 ERROR(심각도 번호 17)으로 설정해야 해요(SHOULD). 계측은 해당 메시징 처리 스팬에서 캡처한 속성으로 예외 이벤트를 채우는 구성 옵션을 제공할 수 있어요(MAY).
속성 (Attributes):
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
exception.message |
Conditionally Required [1] |
string | The exception message. [2] | Division by zero; Can't convert 'int' object to str implicitly |
|
exception.type |
Conditionally Required [3] |
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. [4] | java.net.ConnectException; OSError |
|
exception.stacktrace |
Recommended |
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) |
[1] exception.message: exception.type이 설정되지 않았다면 필수이고, 그렇지 않으면 권장돼요.
[2] exception.message:
경고 (Warning)
이 속성은 민감한 정보를 포함할 수 있어요.
[3] exception.type: exception.message가 설정되지 않았다면 필수이고, 그렇지 않으면 권장돼요.
[4] exception.type: 기록된 예외 타입이 실패 분류에 의미가 없는 래퍼라면,
계측은 내부 예외의 타입을 대신 사용할 수 있어요(MAY). 예를 들어 Go에서 fmt.Errorf와
%w로 생성된 오류는 래퍼 타입이 실패 분류에 도움이 되지 않을 때 언랩할 수 있어요(MAY).