Skip to content

Commit

Permalink
chore(mwcp): update use of TraceInit() param
Browse files Browse the repository at this point in the history
  • Loading branch information
waitingsong committed May 23, 2024
1 parent 058c07e commit 8981db9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/midway-component-koid/src/lib/koid.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ export class KoidComponent {

@TraceInit<KoidComponent['_init']>({
namespace: ConfigKey.componentName,
after: ([config], decoratorCtx) => {
if (decoratorCtx.traceSpan) {
decoratorCtx.traceSpan.setAttribute('koid-config', JSON.stringify(config))
after: (_, [config]) => {
const attrs = {
[ConfigKey.config]: JSON.stringify(config),
}
return { attrs }
},
})
protected async _init(config: Config): Promise<void> {
Expand Down

0 comments on commit 8981db9

Please sign in to comment.