- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
This guide goes over how to create a custom scanning rule using a regular expression (regex) pattern to match and redact a Universally Unique Identified (UUID). For example, your organization might have a UUID for internal identification, with additional information appended, such as the user’s:
If you want internal users to access these logs without exposing the UUID and user ID, you can create a custom scanning rule to redact the information.
For this guide, 01e2402104ca99-8641-43ba-b499-642610-0012
is the example internal identifier being used, where:
01e2402104ca99-8641-43ba-b499
is the UUID.6462610
is a 6-digit value that represents the ID in byte format.0012
is A 2-digit department code and 2-digit status code of a user:00
is used for an active user.12
for the department code.In this example, you want to match the format of the example identifier (01e2402104ca99-8641-43ba-b499-642610-0012
) and:
You can use the following basic regex to match the UUID and user ID that you want to redact:
[a-z0-9]{14}-\d{4}-[a-z0-9]{4}-[a-z0-9]{4}-\d{6}
[a-z0-9]{14}-\d{4}-[a-z0-9]{4}-[a-z0-9]{4}-\d{6}
in the regex field.user
:user
as a key word.10
for Characters before match.[removed]
for the replacement text.matched_on:user_id
for the Add tags field.If this example log, which contains the different components of the UUID, is sent to Datadog:
2024-11-14 14:20:22 INFO [transaction-logger] 200 OK shoe:200.000, pen:42.95. iron, 221.55, tasty-sandwich:10.95, big-coffee:11.95, user.name:fred91, user.id:01e2402104ca99-8641-43ba-b499-642610-0012, user.email:fred.jones@scooby.com function:transaction-complete.js, payment.ccn:1111-1111-1111-1111, payment.ccexp:10/30}
The result is the user.id
is redacted and replaced with [removed]
:
추가 유용한 문서, 링크 및 기사: