-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat(gatsby-source-drupal): Add tracing for full/delta fetches and http requests #33142
Conversation
@@ -375,6 +375,7 @@ const runAPI = async (plugin, api, args, activity) => { | |||
const apiCallArgs = [ | |||
{ | |||
...args, | |||
parentSpan: pluginSpan, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plugin spans were being set as children of the run-api
span instead of the run-plugin
span — this fixes that
res.body.entities.length | ||
) | ||
|
||
const touchNodesSpan = tracer.startSpan(`touchNodes`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
touchNodes seems to start taking an inordinate amount of time as the node count grows. So let's track it.
agent, | ||
cache: false, | ||
// request: http2wrapper.auto, | ||
// http2: true, | ||
...options, | ||
}) | ||
|
||
httpSpan.setTag(`http.status_code`, response.statusCode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me :)
Trace the key parts of the gatsby-source-drupal lifecycle.
Full fetch:
Delta fetch (fastbuilds):
I've been working out a schema we can use across source plugins. The idea being that each source plugin is semantically similar so if we use span names then we can directly compare source plugins to each other.
Rules:
sourceNodes.fetch
sourceNodes.fetch
,sourceNodes.touchNodes
, andsourceNodes.createNodes