-
Notifications
You must be signed in to change notification settings - Fork 22
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
[trace] add strack trace info with trace #18
Comments
PTAL🙏 @CoderPoet |
Usually, you can use logs to report stack traces zap or logrus code detail: obs-opentelemetry/logging/logrus/hook.go Line 91 in f719a52
or report this by calling methods yourself. eg: span := trace.SpanFromContext(c)
span.RecordError(errors.New("error info"), trace.WithStackTrace(true)) |
@futurist Hello, can this solve your problem? |
@rogerogers Yes it's solved by add extra line of code, like below: span := trace.SpanFromContext(c)
span.SetStatus(codes.Error, desc)
span.RecordError(errors.New("error info"), trace.WithStackTrace(true)) Without |
Is your feature request related to a problem? Please describe.
Cannot find option for record stack trace of span:
https://pkg.go.dev/go.opentelemetry.io/otel/trace@v1.14.0#WithStackTrace
Describe the solution you'd like
Want same option for: https://pkg.go.dev/go.opentelemetry.io/otel/trace@v1.14.0#WithStackTrace
Additional context
Want show stacktrace info in APMPlus in VolcEngine(currently always empty):
The text was updated successfully, but these errors were encountered: