-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
tracing
integration
#180
Comments
Rocket (a popular web framework) is currently in the process of migrating to tracing, having this integration for when that happens would be very useful. |
It would also be good to have support for eyre/color-eyre too along with this. |
@kellpossible should open a separate issue for a separate crate to support. |
I've started working on this https://github.com/kellpossible/sentry-tracing I'll make it into a pull request here when I've tested it out more and sure about the feature set. Happy for any comments, or if someone else wants to rip it out and make a PR of it now. |
Some preliminary typedefs related to tracing just landed in #276 |
@kellpossible were you able to generate any useful spans/traces? |
@dashed I've got events working as breadcrumbs, and issues. Span support is limited at the moment I think, haven't tested it much. |
@kellpossible thank you for the work so far! are you still working on the feature? |
@gakonst not really, it was working well enough for my purposes at the time, and I'm currently reassigned on a different project which doesn't involve using sentry, but perhaps will come back to it. |
I've forked @kellpossible's repository to https://github.com/levels3d/sentry-tracing and I'm currently working on adding transaction collection. I've implemented the conversion of tracing spans to sentry span data, but I'm not too sure on how to proceed to submit the transaction to Sentry as wrapping it in an enveloppe and sending that doesn't seem to work properly (there might be an issue in the Sentry SDK as the span IDs are getting serialized as full 32 bytes UUID strings when it looks like they should only be 16 characters long) |
@leops Idk what transaction collection is, but am I right in assuming that I have to use your fork to get span support? It doesn't seem like the official |
Well my fork is sort of halfway there, while my version does collect spans from the tracing library since the Sentry SDK doesn't really support transactions I tried to pass that data into the SDK anyway in the best way I could find but the resulting transactions never show up in Sentry, and unfortunately at the moment I don't have more time to spend on debugging this. |
I'm very excited about the possibility of getting spans to show up on the performance tab. Other than the size alignment issue for the IDs, are there any other barriers? Maybe we won't know until that issue is cleared. |
I finally could free up some time to work on this, and I think I've fixed all the outstanding issues. On the latest revision of my fork and using the changes I've pushed in #349 |
I've been playing around with what's in master here, and @leops's fork, trying to put it together with |
Maybe this is better tracked as a separate issue, but here's the deadlock repro: https://github.com/LaikaStudios/actix-tracing-sentry-repro The repro depends on the newly released 0.23 sdk, but I expect the topic branch here to also have the same issue. It might be there's a problem with the subscriber configuration, but even so I'd bet anyone working in actix-web will stumble into this as things are today. |
@onelson I just ran your repro on mac with a normal debug build ( |
@Swatinem This is good news yet unfortunate for me, I suppose. In this case, I was on a Centos 7 system - my company furnished workstation. Maybe I need to loop my IT department in. |
I just ran the repro project on my home machine (Ubuntu 20.04) and it worked fine, so I don't know what's wrong with my Centos box at work... |
RE: the deadlock - I built the repro as a docker container and found that the deadlock happens when I run the container on |
Thank you @leops for the latest updates! One more question that is left: "How to propagate the trace_id from other services/systems?". As a workaround we can pass trace_id and span_id as parameters to span! macro and parse them in |
It seems like this integration creates a single issue in sentry and lumps all events/issues together under a single issue titled Any idea how to add a label to the event/issue, so that issues for different errors are created separately? Thank you! |
I just played with tracing spans and I can see some trace/span details showing up in Sentry (thanks @leops) but it seems that tracing span fields aren't reported to Sentry. Trying to figure out if I misconfigured something or it's just unsupported. Here is my example application that sends an event to Sentry. What I expect is that function argument ( fn main() {
...
make_an_error("span_field_value");
}
#[instrument]
fn make_an_error(span_field: &str) { // span_field IS NOT sent to sentry
error!(event_field = "event_field_value", "test"); // event_field IS sent to sentry
} .. but it isn't: As a workaround, I don't mind extending sentry event additional data with fields from the span right in the |
@DmitrySamoylov I am working on additional support for tracing with sentry here: #359 |
Can't this issue be closed as sentry-tracing exists? |
Yes, lets do that :-D I think we can file followups for anything that is missing from the integration. |
Yet Another Integration Issue. As with #160, support for
tracing
would be fantastic.The text was updated successfully, but these errors were encountered: