Comments (1)
Or TracingContext
exposes a TracingConfig
property, and then adds ErrorOccurred
method to TracingContext
by way of extension method.
或者TracingContext
暴露一个TracingConfig
属性,然后通过扩展方法的方式为TracingContext
增加ErrorOccurred
方法。
public interface ITracingContext
{
// ...
TracingConfig TracingConfig { get; }
}
public static void ErrorOccurred(this ITracingContext tracingContext, SegmentContext context, Exception exception)
{
if (context == null || context.Span == null)
return;
context.Span.IsError = true;
if (exception == null)
return;
var stackTrace = exception.HasInnerExceptions() ? exception.ToDemystifiedString(tracingContext.TracingConfig.ExceptionMaxDepth) : exception.StackTrace;
context.Span.AddLog(LogEvent.Event("error"),
LogEvent.ErrorKind(exception.GetType().FullName),
LogEvent.Message(exception.Message),
LogEvent.ErrorStack(stackTrace));
}
from skyapm-dotnet.
Related Issues (20)
- 请问怎么将SkyAPM-dotnet添加到wpf客户端或者Console客户端,形成一条从客户端到后台api的链路跟踪。 HOT 1
- May I ask if the log folder can be named after the month and year HOT 3
- 集成MagicOnion做Grpc链路追踪 HOT 1
- SkyAPM.Diagnostics.CAP System.MissingMethodException: Method not found sometimes HOT 2
- this is no service name display in Virtual Database HOT 3
- Does SkyAPM support Console Application?
- skywalking前端页面查询不到 HOT 5
- SKYWALKING__SERVICENAME 是否直接支持组名? 或者组名的环境变量是? HOT 1
- SkyApm.Transport.Grpc.V8.ServiceRegister : Report service instance properties fail. HOT 2
- How to support multiple environments. HOT 1
- CAP trace broken when using latest skyapm-dotnet code HOT 6
- How to modify the endpoint name of skywalking HOT 1
- SkyAPM.Agent.AspNetCore Version 2.1.0 cannot monitor the data of the IIS program HOT 2
- SkyApm.Transport.Grpc.LogReporter : Report log fail.
- 使用2.2 版本前端总是空的,2.1版本正常
- `AddSkyAPM` Break Change HOT 2
- Can QueueSize and BatchSize in skyapm.json be configured to 0? What impact will this configuration have on .NET programs hosted on IIS?
- Can you solve the problem of having two instance IDs for the same service after restarting IIS? HOT 3
- Method not found: 'Serilog.LoggerConfiguration Serilog.LoggerConfigurationAsyncExtensions.Async
- How do I configure endpoint filtering? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skyapm-dotnet.