Skip to content

Conversation

danstarns
Copy link
Contributor

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.

@Jolg42 Jolg42 added this to the 4.2.0 milestone Jul 25, 2022
@millsp
Copy link
Contributor

millsp commented Aug 4, 2022

Ping @danstarns, we might need to do some updates here

@Jolg42
Copy link
Contributor

Jolg42 commented Nov 8, 2022

ping @danstarns @millsp, found this PR which looks almost done, would be good to finish it

@danstarns danstarns requested a review from Jolg42 November 9, 2022 21:11

const [trace] = jeagerResponse.data.data
const [rootSpan, ...restOfSpans] = trace.spans
const traceTree = buildTree({ span: rootSpan }, restOfSpans)
Copy link
Contributor

@Jolg42 Jolg42 Nov 10, 2022

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

Copy link
Contributor

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

@Jolg42 Jolg42 modified the milestones: 4.2.0, 4.8.0 Nov 28, 2022
Copy link
Contributor

@janpio janpio left a 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.

@mcbethio mcbethio added kind/tech A technical change. topic: tech debt labels Feb 3, 2023
@mcbethio
Copy link

mcbethio commented Feb 4, 2023

@millsp this has a milestone of 4.8.0 but not started yet - I assume the milestone should be removed?

@millsp
Copy link
Contributor

millsp commented Feb 6, 2023

@mcbethio Work was started but we never got the time to finish it.

@mcbethio mcbethio modified the milestones: 4.8.0, 4.11.0 Feb 6, 2023
@janpio
Copy link
Contributor

janpio commented Feb 6, 2023

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.

@mcbethio mcbethio removed this from the 4.11.0 milestone Feb 7, 2023
@millsp millsp added the tech/typescript Issue for tech TypeScript. label Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/tech A technical change. tech/typescript Issue for tech TypeScript. topic: tech debt topic: tracing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants