Skip to content

how SpringCloud Gateway add traceId to response header? #10686

Answered by darknesstm
ZhangZangQian asked this question in Q&A
Discussion options

You must be logged in to vote

String traceId = WebFluxSkyWalkingOperators.continueTracing(exchange, TraceContext::traceId);

exchange is org.springframework.web.server.ServerWebExchange

<dependency>
  <groupId>org.apache.skywalking</groupId>
  <artifactId>apm-toolkit-trace</artifactId>
  <version>${skywalking.version}</version>
</dependency>

<dependency>
  <groupId>org.apache.skywalking</groupId>
  <artifactId>apm-toolkit-webflux</artifactId>
  <version>${skywalking.version}</version>
</dependency>

Replies: 4 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@darknesstm
Comment options

@lesliey
Comment options

@lesliey
Comment options

@darknesstm
Comment options

Answer selected by wu-sheng
@lesliey
Comment options

@darknesstm
Comment options

Comment options

You must be logged in to vote
2 replies
@darknesstm
Comment options

@lesliey
Comment options

Comment options

You must be logged in to vote
3 replies
@collery
Comment options

@darknesstm
Comment options

@collery
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants