-
Notifications
You must be signed in to change notification settings - Fork 26
test: add tracing #2968
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
base: dev
Are you sure you want to change the base?
test: add tracing #2968
Conversation
Co-authored-by: Joël Galeran <[email protected]>
Co-authored-by: Joël Galeran <[email protected]>
Ping @danstarns, we might need to do some updates here |
ping @danstarns @millsp, found this PR which looks almost done, would be good to finish it |
Co-authored-by: Jan Piotrowski <[email protected]>
Co-authored-by: Jan Piotrowski <[email protected]>
|
||
const [trace] = jeagerResponse.data.data | ||
const [rootSpan, ...restOfSpans] = trace.spans | ||
const traceTree = buildTree({ span: rootSpan }, restOfSpans) |
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.
@danstarns I think you might need to order the JSON first to have a stable snapshot below? or find another approach like snapshotting each value separately
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.
The functional tests now implement a more advanced buildTree
, although that looks a bit dangerous that it might actually delete useful information: https://github.com/prisma/prisma/blob/f46bca1625018ebf94ee1b3242cc40c3539c49ea/packages/client/tests/functional/tracing/tests.ts#L25-L74
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.
The snapshot is from a SQLite run, but the test runs PostgreSQL.
@millsp this has a milestone of 4.8.0 but not started yet - I assume the milestone should be removed? |
@mcbethio Work was started but we never got the time to finish it. |
We don't usually update milestones when nothing happens (or remove them when work stops). We have loads of issues and PRs with older milestones. |
Tests that tracing works within another traced application.
Spins up a fastify web server, performs a request against that server, and then asserts that those traces and Prisma traces are nested correctly within each other.