Skip to content

No transactions for Absinthe #327

Closed

Description

@cshanes

Describe the bug
After setting up the new_relix_elixir agent and new_relic_absinthe agent, the only data that shows up in the New Relic dashboard are database queries. No transactions.

I did add it to the middleware like so:

  def middleware(middleware, _field, %Absinthe.Type.Object{
        identifier: identifier
      })
      when identifier in [:query, :subscription, :mutation] do
    [NewRelic.Absinthe.Middleware, Instrument, RequestLogger] ++ middleware
  end

Environment

  • Elixir & Erlang version: Erlang/OTP 23, Elixir 1.11.3
  • Agent version: new_relic_agent 1.23.6, new_relic_absinthe 0.0.4
  • Absinthe version: absinthe 1.5.5

Am I missing additional configuration?

Activity

  1. cshanes commented on Mar 12, 2021

    @cshanes
    Author

    Just to add a bit more information, I spent time adding debug output to the New Relic middleware and confirmed the complete function (https://github.com/binaryseed/new_relic_absinthe/blob/master/lib/new_relic/absinthe/middleware.ex#L42) is getting called. I printed out some of the values and everything looks fine as far as I can tell:

    span: 
    {["roundSubmissionPerformance", "roundDailyPerformances"],
     #Reference<0.2859887835.2323906562.39014>}
    primary name: APITournament.Models.UserProfile.round_daily_performances_resolver
    secondary name: APITournament.Schemata.roundSubmissionPerformance.roundDailyPerformances
    
  2. tpitale commented on Nov 9, 2021

    @tpitale
    Contributor

    It looks like we need to add Telemetry support for Absinthe maybe?

  3. binaryseed commented on Nov 10, 2021

    @binaryseed
    Collaborator

    I started that a while back, the branch is here: https://github.com/binaryseed/elixir_agent/commits/absinthe-telemetry I never got around to finishing it...

    It requires an extension of the span reporting API that's not quite so simple. Spans via Absinthe don't have a reliable nested "parenting" relationship and that's what the automatic @trace based span generation relies on. Parenting has to be tracked manually using the id emitted in the telemetry events

  4. scottming commented on Jan 13, 2022

    @scottming

    @tpitale @binaryseed Hi, I think this pr #375 can solve the "parenting" problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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