Skip to content

Commit

Permalink
fixing context propagation open-telemetry#2
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelewski committed Jul 5, 2023
1 parent 71d4b86 commit 1dd89d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions instrgen/lib/context_propagation.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,17 @@ func (pass *ContextPropagationPass) Execute(
if recv != nil {
recvStr = "." + recv.Type().String()
}
fun := FuncDescriptor{node.Name.Name, recvStr, node.Name.String(), ftype.String()}
fun := FuncDescriptor{node.Name.Name, recvStr, xNode.Name.String(), ftype.String()}
currentFun = fun
// inject context only
// functions available in the call graph
if !isFunPartOfCallGraph(fun, analysis.Callgraph) {
break
}

if Contains(analysis.RootFunctions, fun) {
break
}

visited := map[FuncDescriptor]bool{}

if isPath(analysis.Callgraph, fun, analysis.RootFunctions[0], visited) {
Expand Down

0 comments on commit 1dd89d7

Please sign in to comment.