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
Thanks for raising this issue. I've taken a look at the code you posted, and it looks like you're spot on. The Absinthe integration sets the span's namespace whenever it's started. Your plug runs before the Absinthe span is started, so it doesn't set a namespace if no root span has been started.
One way to resolve this is to set the namespace after the span has been started. For example, you could set the namespace while resolving the request or requesting data from the database.
We can't currently conditionally apply the namespace, because we pass the namespace to the agent immediately. That being a one-way data pipeline, we can't determine if the namespace has been set previously.
Describe the bug
If you have multiple graphql endpoints, setting a custom namespace doesn't work.
To Reproduce
I have two graphql endpoints,
/api/graphql/user
and/api/graphql/admin
Calls to
/api/graphql/admin
still end up in thegraphql
namespace.This line seems to be responsible:
https://github.com/appsignal/appsignal-elixir/blob/main/lib/appsignal/absinthe.ex#L55
Could you modify it to conditionally apply the namespace only if it's currently set to the default?
The text was updated successfully, but these errors were encountered: