Closed rhyek closed 1 year ago
@rhyek using the configuration of customResolverAttributes
and customOperationAttributes
will assign those custom attributes to all resolver or operation spans, depending on how you set it. You appear to be highlighting a root span, you'd need to find the ones that are named /GraphQL/operation/ApolloServer/[operation-type]/[operation-name]/[deepest-unique-path]
or /GraphQL/resolve/ApolloServer/[path]
.
Using our api addCustomAttributes
it will add those attributes to whatever is the active span, so that would require more context into when/where you're calling that method.
I recommend working this through support.newrelic.com. They can help deep-dive into solving the problem. They will also ask to collect the necessary information which may or may not be sensitive (such as logs, account information, etc.). If you have a simple reproduction case, I may be able to take a look but would definitely need more information.
Description
i have the following setup: nextjs app -> apollo federation gateway -> nestjs app with nestjs-graphql + apollo server i am testing out this plugin and am noticing i cannot see any graphql relevant information in my distributed traces aside from the transaction names having the grapqhl operation/fields in them. i am expecting to see something like what is described here: https://github.com/newrelic/newrelic-node-apollo-server-plugin/blob/main/docs/segments-and-spans.md#segments-and-spans
not sure if i'm looking at the correct section in the ui, but none of that is present in the attributes.
Expected Behavior
i expect to see the custom attributes mentioned in the plugin's documentation.
Logs
Steps to Reproduce
code (project is ESM):
Your Environment
Additional context
i also tried explicitly setting custom parameters both using a return value for
customOperationAttributes
andnewrelic.addCustomAttributes
. none of the attributes show up. this makes me think it's not an issue with this plugin, necessarily, but something with the node agent, but wanted to post here as well, thanks.newrelic 11.1.0 @newrelic/apollo-server-plugin 4.0.0 @apollo/gateway: 2.3.2 @apollo/server: 4.3.3
i'm using a newrelic.js file for configuration: