@@ -135,6 +135,8 @@ export class TraceAgent implements TraceAgentInterface {
135135 }
136136
137137 return this . namespace ! . runAndReturn ( ( ) => {
138+ this . logger ! . info ( `TraceApi#runInRootSpan: [${
139+ this . pluginName } ] Created root span [${ options . name } ]`) ;
138140 // Attempt to read incoming trace context.
139141 let incomingTraceContext : IncomingTraceContext = { } ;
140142 if ( isString ( options . traceContext ) && ! this . config ! . ignoreContextHeader ) {
@@ -205,7 +207,7 @@ export class TraceAgent implements TraceAgentInterface {
205207 // with continuously growing number of child spans. The second case
206208 // seems to have some value, but isn't representable. The user probably
207209 // needs a custom outer span that encompasses the entirety of work.
208- this . logger ! . warn ( `TraceApi#createChildspan : [${
210+ this . logger ! . warn ( `TraceApi#createChildSpan : [${
209211 this . pluginName } ] Creating phantom child span [${
210212 options . name } ] because root span [${
211213 rootSpan . span . name } ] was already closed.`) ;
@@ -219,14 +221,16 @@ export class TraceAgent implements TraceAgentInterface {
219221 options . name , /* Span name */
220222 rootSpan . span . spanId , /* Parent's span ID */
221223 skipFrames ) ; /* # of frames to skip in stack trace */
224+ this . logger ! . info ( `TraceApi#createChildSpan: [${
225+ this . pluginName } ] Created child span [${ options . name } ]`) ;
222226 return childContext ;
223227 } else if ( rootSpan . type === SpanDataType . UNTRACED ) {
224228 // Context wasn't lost, but there's no root span, indicating that this
225229 // request should not be traced.
226230 return UNTRACED_SPAN ;
227231 } else {
228232 // Context was lost.
229- this . logger ! . warn ( `TraceApi#createChildspan : [${
233+ this . logger ! . warn ( `TraceApi#createChildSpan : [${
230234 this . pluginName } ] Creating phantom child span [${
231235 options . name } ] because there is no root span.`) ;
232236 return UNCORRELATED_SPAN ;
0 commit comments