We extend the EVMEnvironment with a method to get the EVM context using in Otel (returning nil means it's disabled)
As ops are executed sequentially in the EVM, we create a span per op based on the fetched context from the EVM implementation
The fetched context is considered the root context, and if a span was already created, then all spans created here will be child spans to that one
This is an initial design that doesn't have to make a lot of changes to the codebase, we can extend it later with more events that are needed for observability.
Note: This is a breaking change as it introduce a new method to the EVMEnvironment interface. We should update the docs to take this into account and explain how someone could use Otel with fhevm-go.
EVMEnvironment
with a method to get the EVM context using in Otel (returningnil
means it's disabled)This is an initial design that doesn't have to make a lot of changes to the codebase, we can extend it later with more events that are needed for observability.
Note: This is a breaking change as it introduce a new method to the
EVMEnvironment
interface. We should update the docs to take this into account and explain how someone could use Otel withfhevm-go
.