Skip to content
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

No transactions for Absinthe #327

Open
cshanes opened this issue Mar 11, 2021 · 4 comments · May be fixed by #471
Open

No transactions for Absinthe #327

cshanes opened this issue Mar 11, 2021 · 4 comments · May be fixed by #471

Comments

@cshanes
Copy link

cshanes commented Mar 11, 2021

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?

@cshanes
Copy link
Author

cshanes commented Mar 12, 2021

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

@tpitale
Copy link
Contributor

tpitale commented Nov 9, 2021

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

@binaryseed
Copy link
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

@scottming
Copy link

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

@binaryseed binaryseed linked a pull request Dec 31, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants