feat(core): Add spanToJSON() method to get span properties#10074
feat(core): Add spanToJSON() method to get span properties#10074
spanToJSON() method to get span properties#10074Conversation
size-limit report 📦
|
| "madge": { | ||
| "detectiveOptions": { | ||
| "ts": { | ||
| "skipTypeImports": true | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
Circ deps (even types) are usually very smelly. Is this 100% necessary?
There was a problem hiding this comment.
yes, it is - as we need the util in spanUtils, and we need spanUtils in span, and for the util we need the span class from span 😬 at least I couldn't think of a way to make this work properly :( we can remove it in v8 though, then we don't need to import from spanUtils in span anymore!
There was a problem hiding this comment.
Alright then! Let's add a comment/todo somewhere then to remove this opt-out again (if you also think that it's worth keeping in general in the future).
There was a problem hiding this comment.
(or open for other ideas, of course)
| * Convert a span to a JSON representation. | ||
| * Note that all fields returned here are optional and need to be guarded against. | ||
| * | ||
| * Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json). |
There was a problem hiding this comment.
@lforst added this comment here for the future!
This is supposed to be an internal API and not necessarily to be used by users. add comment for circular dependency
This is supposed to be an internal API and not necessarily to be used by users.
Naming wise, it's a bit tricky... I went with
JSONto make it very clear what this is for, but 🤷