diff --git a/internal/trace/context.go b/internal/trace/context.go index ea6bcb1..c04c4f9 100644 --- a/internal/trace/context.go +++ b/internal/trace/context.go @@ -48,7 +48,7 @@ var DefaultTraceExtractor = getHeadersFromEventHeaders // contextWithRootTraceContext uses the incoming event and context object payloads to determine // the root TraceContext and then adds that TraceContext to the context object. func contextWithRootTraceContext(ctx context.Context, ev json.RawMessage, mergeXrayTraces bool, extractor ContextExtractor) (context.Context, error) { - fmt.Printf("[DEBUG] [context.go] [contextWithRootTraceContext()]\n") + fmt.Printf("[DEBUG] [context.go] [contextWithRootTraceContext()] full context: %+v\n", ctx) datadogTraceContext, gotDatadogTraceContext := getTraceContext(ctx, extractor(ctx, ev)) xrayTraceContext, errGettingXrayContext := convertXrayTraceContextFromLambdaContext(ctx) @@ -132,7 +132,7 @@ func createDummySubsegmentForXrayConverter(ctx context.Context, traceCtx TraceCo } func getTraceContext(ctx context.Context, headers map[string]string) (TraceContext, bool) { - fmt.Printf("[DEBUG] [context.go] [getTraceContext()]\n") + fmt.Printf("[DEBUG] [context.go] [getTraceContext()] headers: %v\n", headers) tc := TraceContext{} traceID := headers[traceIDHeader] @@ -192,6 +192,7 @@ func getHeadersFromEventHeaders(ctx context.Context, ev json.RawMessage) map[str lowercaseHeaders := map[string]string{} for k, v := range eh.Headers { lowercaseHeaders[strings.ToLower(k)] = v + fmt.Printf("[DEBUG lambda] context.go: [%s, %s]\n", strings.ToLower(k), v) } return lowercaseHeaders