Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

Please consider using prepend rather than alias_method #22

@rosenfeld

Description

@rosenfeld

Please, read this article from NewRelic on the subject. I feel that it will become more and more usual for people to use the prepend method introduced in Ruby 2.0 than keep using alias_method. Since you are starting this project recently, it would be a good time to change the approach to prefer prepend over alias_method:

https://blog.newrelic.com/2016/12/15/ruby-agent-module-prepend-alias-method-chains/

Thanks for building tracebin! I've been thinking about building my own APM solution for quite some time but never found the time to do that, so it's nice to see such projects being created :)

I haven't tried your solution yet, but I'm curious about one thing. I find it great that you store and start and end times and not only the duration. We have an special case in one of our expensive requests where we fetch multiple data from the database concurrently, using separate connections in separate threads to speed things up. It seems that out of the box it won't work with your solution or any other I'm aware of because usually you'll set those values in thread-local variables, which is fine. However, supposing I would instrument those queries run in separate threads manually, I'm curious how those would be presented in a transaction. I mean, I'd expect to see them like I see the static resources in Google Chrome's DevTools for example, in which I can see when each resource is starting and when they finish running. Simply summing all times to calculate the total duration would lead to a greater duration than the actual total request duration, of course, that's why it would be interested to see such requests in a timeline view. Does your UI support something like that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions