일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Session Registry
- 14891
- openTelemetry
- github
- RequiredArgsConstructor
- 12100
- Value annotation
- AWS
- Spring
- RestControllerAdvice
- Java
- Spring Authorization Server
- 1260
- 백준
- aws-mysql-jdbc
- github actions
- tailsamplingprocessor
- 15686
- self-hosted runners
- 14889
- HttpRequestMethodNotSupportedException
- Session Fixation Protection
- 프로그래머스
- Spring Security
- 자바
- 1916
- 17144
- amazon-ecr-login
- ConcurrentSessionControlAuthenticationStrategy
- SpringCloudConfig
Archives
- Today
- Total
한울이
[AWS X-Ray] Tail Sampling with OpenTelemetry 본문
1. 문제상황
- 상용환경에서 aws xray 비용이 많이 나오는 이슈가 발생
2. 환경
- ECS
- AWS Distro for Opentelemetry Collector
3. 현재 상황 및 해결
- X-Ray remote sampling 을 사용하면서 비율을 설정해서 사용 중
- 새로운 api 들이 추가 될 때 마다 비율을 생각해서 추가 해줬어야 함
- ex) 계속 polling 하는 api 는 비율을 어떻게 해야할지..?
- sampling 비율을 낮게 하면 원하는 trace 를 못 보는 경우도 생김
- 높게 하면 비용이 문제가 됨
- 팀에서 분산 추적을 사용하는 목적은 error 가 났을 때 확인 하기 위한 용도
- 새로운 api 들이 추가 될 때 마다 비율을 생각해서 추가 해줬어야 함
- opentelemetry processor 중 tail sampling processor 를 사용하여 error 인 경우만 샘플링하여 처리하기로 결정
- 예시 config.yml
extensions:
health_check:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
awsxray:
endpoint: 0.0.0.0:2000
transport: udp
processors:
batch/traces:
timeout: 1s
send_batch_size: 50
batch/metrics:
timeout: 60s
tail_sampling:
decision_wait: 10s
num_traces: 100
expected_new_traces_per_sec: 10
policies:
[
{
name: trace-status-policy,
type: status_code,
status_code: { status_codes: [ERROR] },
},
]
exporters:
awsxray:
awsemf:
service:
pipelines:
traces:
receivers: [otlp,awsxray]
processors: [tail_sampling,batch/traces]
exporters: [awsxray]
metrics:
receivers: [otlp]
processors: [batch/metrics]
exporters: [awsemf]
extensions: [health_check]
'PROGRAMMING' 카테고리의 다른 글
[AWS RDS] aws rds scale up (0) | 2024.07.22 |
---|---|
[GITHUB ACTIONS] github actions no space left on device error (0) | 2024.03.16 |
[GITHUB ACTIONS] github actions ec2 self hosted runner no basic auth credentials Error (0) | 2024.03.16 |
[SPRING] Spring security ChangeSessionIdAuthenticationStrategy 이슈 (1) | 2023.10.13 |
[SPRING] Spring Authorization Server Default Session Registry (0) | 2023.07.31 |
Comments