You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.
For some context, we are in the process of evaluating New Relic for our new Rust projects. For that, we're using this C SDK along with the crate newrelic.
When using the function newrelic_notice_error(), a stack trace is internally generated with newrelic_get_stack_trace_as_json() and appears like so:
Naturally, all the Rust symbols are mangled and there is no mapping to source location (filename and line). We'd like to use the backtrace crate to capture the stacktrace from Rust, proving our developers a more familiar and readable feedback.
It is possible to overwrite the stacktrace today? I did a quick search of source code, but I could not find a way to do it.
If that is not possible, would it be a valid feature to add? Maybe other languages without a dedicated agent could also profit from this pattern of capturing native stack traces and passing it to the C SDK.
Best regards,
The text was updated successfully, but these errors were encountered:
Great to see Rust apps reporting to New Relic. Unfortunately, the C SDK doesn't currently provide the possibility to use custom stack traces. At the moment the only way to do that would be by modifying the C SDK yourself (e. g., making newrelic_get_stack_trace_as_json a hook that can accept a user defined function).
If that is not possible, would it be a valid feature to add?
Yes, definitely. We will file an internal issue for this and keep you updated about the progress.
I've implemented a sister function to newrelic_notice_error called newrelic_notice_error_with_stacktrace, that allows passing the stacktrace in the final (JSON) string format in this branch: master...sitegui:newrelic_notice_error_with_stacktrace
This works for our use case and we are no longer blocked by this feature request.
Yes, a PR with this change would be much appreciated! I already have an internal issue filed, I will link it to your PR and we'll evaluate your solution once we start working on this.
Hello,
For some context, we are in the process of evaluating New Relic for our new Rust projects. For that, we're using this C SDK along with the crate
newrelic
.When using the function
newrelic_notice_error()
, a stack trace is internally generated withnewrelic_get_stack_trace_as_json()
and appears like so:Naturally, all the Rust symbols are mangled and there is no mapping to source location (filename and line). We'd like to use the
backtrace
crate to capture the stacktrace from Rust, proving our developers a more familiar and readable feedback.It is possible to overwrite the stacktrace today? I did a quick search of source code, but I could not find a way to do it.
If that is not possible, would it be a valid feature to add? Maybe other languages without a dedicated agent could also profit from this pattern of capturing native stack traces and passing it to the C SDK.
Best regards,
The text was updated successfully, but these errors were encountered: