Unverified Commit f28b965a authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Add module type to build-module trace (#28128)



Add `-js` `-ts` `-tsx` `-css` to `build-module` in traces to allow for easier filtering. 

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
parent 24b09ad4
...@@ -99,7 +99,18 @@ export class ProfilingPlugin { ...@@ -99,7 +99,18 @@ export class ProfilingPlugin {
return return
} }
const span = trace('build-module', compilerSpan.id) const moduleType = (() => {
if (!module.userRequest) {
return ''
}
return module.userRequest.split('.').pop()
})()
const span = trace(
`build-module${moduleType ? `-${moduleType}` : ''}`,
compilerSpan.id
)
span.setAttribute('name', module.userRequest) span.setAttribute('name', module.userRequest)
spans.set(module, span) spans.set(module, span)
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment