[tracing] Propagate TraceID to the backend. Create a new setupEnv span. Fix span hierarchy
This PR tackles three main issues:
- Propagate TraceID to the backend: this change enables Datadog APM to link the SDK traces with the backend traces and logs
- Use a dedicated
spanfor the setup actions: this change traces the setup actions performed by everytest suiteand links thesetup spanto thesuite span
TODO:
- [x] Fix span hierarchy: Actions performed inside each
test caseare linked to thesuite spaninstead of thetest span. The test span created in thebeforeEachhook needs to be activated before the test code runs.
⚠️ No Changeset found
Latest commit: 78d5497987553dc1fdaecf6a05d5b0476a1116b6
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "@xata.io/client" specified in the `linked` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@xata.io/codegen" specified in the `linked` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
size-limit report 📦
| Path | Size |
|---|---|
| packages/client/dist/index.mjs | 10.92 KB (+0.39% 🔺) |
| packages/client/dist/index.cjs | 11.98 KB (+0.57% 🔺) |
| packages/codegen/dist/index.mjs | 2.01 MB (0%) |
| packages/codegen/dist/index.cjs | 2.01 MB (0%) |
Your pull request has been published to npm.
You can install it by running:
npm install @xata.io/[email protected]
To test the CLI, run:
npx @xata.io/[email protected]
Looking good! The hierarchy of spans is maintained till the backend 👌
One downside with the final refactor is that we lost the parent Span, and now we have a bunch of top-level spans that belong to the same suite but we don't have a way to point to "all of them".
I will look at it! Thanks @sgirones