Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RestTemplateBuilder로 생성한 RestTemplate으로 api 호출 시 정상적으로 scouter gxid와 txid가 header에 포함되지 않음 #973

Open
sgh8539 opened this issue Nov 30, 2023 · 0 comments

Comments

@sgh8539
Copy link

sgh8539 commented Nov 30, 2023

About

  • RestTempalteBuilder로 생성한 RestTemplate로 api 호출 시 정상적으로 header gxid가 쌓이지 않습니다
//정상 케이스
  "x-scouter-gxid": ["abc"],
  "x-scouter-callee": ["abc"],
  "x-scouter-caller": ["abc"],
  "x-scouter-caller-obj": ["-123"],

참고

java 17
spring boot 3.1.6

//Builder로 생성 후 호출 시 
RestTemplate restTemplate = new RestTemplateBuilder()
        .build();
restTemplate.exchange(url, HttpMethod.GET, entity, String.class);

//caller (gxid없음)txid    = xi21jk0paoitt3objName = /caller

//calleetxid    = z1u0pnfj57tqtvgxid    = z1u0pnfj57tqtv <<- click to open XLog flow mapobjName = /callee
//일반적인 restTemplate호출 시 
RestTemplate restTemplate2 = new RestTemplate();
restTemplate2.exchange(url, HttpMethod.GET, entity, String.class);

//callergxid    = xi23jk0paoitt3txid    = xi23jk0paoitt3objName = /caller

//calleetxid    = x1s23a9turo8mrigxid    = xi23jk0paoitt3<<- click to open XLog flow mapcaller  = xi23jk0paoitt3objName = /callee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant