简体   繁体   中英

.Net Core how to get traceId Skywalking

I'm using SkyAPM.Agent.AspNetCore 1.1.0 , and I need to get the trace id in my code and do something.

However, I didn't find enough information anywhere. Any suggestion?

Seems I found the solution from the source code.
First inject the IEntrySegmentContextAccessor in the constuctor, then get the traceId by _entrySegmentContextAccessor.Context.TraceId

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM