-
Notifications
You must be signed in to change notification settings - Fork 8
[RUM-13448] Add source code context injection for microfrontend #255
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
Conversation
f38fce4 to
761d68d
Compare
yoannmoinet
left a comment
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 super good.
Thanks for tackling this.
Do you think you could also update ownership of the plugin?
build-plugins/.github/CODEOWNERS
Line 26 in ae68609
| packages/plugins/rum @yoannmoinet |
I mostly had small comments.
packages/tests/src/e2e/sourceCodeContext/sourceCodeContext.spec.ts
Outdated
Show resolved
Hide resolved
|
Looks good! |
761d68d to
da7caff
Compare
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: 906889e | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
da7caff to
405d4b4
Compare
70018c9 to
536f84d
Compare
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.
Added some comments.
Nothing too bad.
packages/tests/src/e2e/sourceCodeContext/sourceCodeContext.spec.ts
Outdated
Show resolved
Hide resolved
packages/tests/src/e2e/sourceCodeContext/sourceCodeContext.spec.ts
Outdated
Show resolved
Hide resolved
packages/tests/src/e2e/sourceCodeContext/sourceCodeContext.spec.ts
Outdated
Show resolved
Hide resolved
BeltranBulbarellaDD
left a comment
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.
LGTM
|
|
||
| export type SourceCodeContextOptions = { | ||
| service: string; | ||
| version?: string; |
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.
❓ question: is there a use case that we want to explicitly support with omitting version?
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.
What if you want to enrich the event with the owner (service) but don’t care about the version or unminification?
Do you think we should enforce the version to prepare customers for the unminification use case?
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.
hum, maybe we add could have everything optional then 🤔
And later add context in the options as well.
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.
Yeah, for now the use case is ownership assignment. Since we don’t have other features to inject yet, I’d rather make the field required to prevent empty options. We can definitely reassess once we add new capabilities.
packages/tests/src/e2e/sourceCodeContext/sourceCodeContext.spec.ts
Outdated
Show resolved
Hide resolved
packages/tests/src/e2e/sourceCodeContext/sourceCodeContext.spec.ts
Outdated
Show resolved
Hide resolved
bcaudan
left a comment
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.
Nice work
yoannmoinet
left a comment
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.
LGTM, well done!
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
This pull request was merged directly. |
What and why?
This PR adds source code context injection capabilities to the RUM plugin, enabling customers to identify which microfrontend originates each RUM event in their applications. It focuses on setups with separated bundles loaded via dynamic imports (e.g., module federation) by injecting source code metadata at entry points.
How?
Usage