속성 제외 프로세서 (Exclude Attribute Processor)
파이프라인 처리 중에 로그에서 지정한 속성을 제거하려면 속성 제외 프로세서(Exclude Attribute Processor)를 사용해요. 로그가 인덱스, 아카이브, 또는 전달 대상에 도달하기 전에 불필요하거나 중복되거나 중간 단계의 속성을 제거해요.
출처: 문서
본문
참고:
- 이 프로세서는 파이프라인 처리 중에 작동하며 수집 비용을 줄이지는 않아요. 계량은 파이프라인 처리 전에 이루어져요.
- 예약 속성(예:
host,source,service,status,message,timestamp)은 제외할 수 없어요. - 이 프로세서는 속성만 제거하지 태그는 제거하지 않아요.
사용 사례 (Use cases)
- 중간 파싱 결과물 정리: 일부 파이프라인은 처리 중에 임시 속성을 만들어요. 예를 들어 Grok 파서가 중첩 파이프라인에 들어가는 원시 청크를 추출할 수 있어요. 속성 제외 프로세서는 최종 로그에서 이러한 중간 속성을 제거해요.
- 로그 가독성 향상: Explorer, 아카이브, 전달 대상에서 로그를 어지럽히는 장황하거나 시끄러운 속성을 제거해요.
로그의 전후 상태 (Before and after state of logs)
예시: 속성 제외 프로세서로 파싱된 속성 제거
전 (Before):
{
"timestamp": "2026-06-10T09:14:02.887Z",
"status": "error",
"service": "payment-processor",
"message": "Transaction failed for customer cust_38271",
"http.response.body": "{\"error\":\"card_declined\",\"tx_id\":\"TX-8847291\",\"amount\":249.99,\"currency\":\"USD\",\"customer_id\":\"cust_38271\",\"provider\":\"stripe\",\"retry_allowed\":false,\"gateway_ref\":\"gw-9182-xk\"}",
"tx_id": "TX-8847291",
"amount": 249.99,
"currency": "USD",
"error_code": "card_declined"
}
속성 제외 프로세서 (Exclude Attribute Processor)
http.response.body 속성을 제거하는 속성 제외 프로세서를 만들어요. 유용한 필드(tx_id, amount, currency, error_code)는 이미 이전 Grok 파서에서 추출되었으므로 전체 응답 본문은 더 이상 필요하지 않아요.
처리 후 (After processing):
{
"timestamp": "2026-06-10T09:14:02.887Z",
"status": "error",
"service": "payment-processor",
"message": "Transaction failed for customer cust_38271",
"tx_id": "TX-8847291",
"amount": 249.99,
"currency": "USD",
"error_code": "card_declined"
}
http.response.body 속성은 로그가 인덱스, 아카이브, 또는 전달 대상에 도달하기 전에 제거돼요.
API
다음 속성 제외 프로세서 JSON 페이로드와 함께 Datadog Log Pipeline API 엔드포인트를 사용하세요:
{
"type": "exclude-attribute",
"name": "<PROCESSOR_NAME>",
"is_enabled": true,
"attribute_to_exclude": "<ATTRIBUTE_NAME>"
}
| 매개변수 | 타입 | 필수 | 설명 |
|---|---|---|---|
type |
String | 예 | 프로세서의 타입. |
name |
String | 아니오 | 프로세서의 이름. |
is_enabled |
Boolean | 아니오 | 프로세서가 활성화되었는지 여부. 기본값: false. |
attribute_to_exclude |
String | 예 | 로그 이벤트에서 제거할 로그 속성의 이름. |