Skip to content

Commit

Permalink
fix op code span
Browse files Browse the repository at this point in the history
  • Loading branch information
piux2 committed Feb 1, 2024
1 parent 7c3bebc commit c83d412
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions gnovm/pkg/gnolang/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1069,10 +1069,6 @@ func (m *Machine) Run() {
var span *traces.Span
if telemetry.IsEnabled() && traces.IsTraceOp() {
traces.InitNamespace(nil, traces.NamespaceMachineRun)
span = traces.StartSpan(
"Machine.Run",
)

// Ensure that span.End() is called on panic.
defer func() {
if span != nil {
Expand All @@ -1089,7 +1085,8 @@ func (m *Machine) Run() {
if span != nil {
span.End()
}
span.SetAttributes(
span = traces.StartSpan(
"Machine.Run",
attribute.String("op", opString[op]),
attribute.Int64("cycles", opCPU[op]),
)
Expand Down

0 comments on commit c83d412

Please sign in to comment.