New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[All] Entity-centric tracing #1243
Conversation
…thub.com:onflow/flow-go into ramtin/allocate-storage-addresses-under-accounts
@@ -484,13 +484,15 @@ func NewExecutionCollector(tracer module.Tracer, registerer prometheus.Registere | |||
// StartBlockReceivedToExecuted starts a span to trace the duration of a block | |||
// from being received for execution to execution being finished | |||
func (ec *ExecutionCollector) StartBlockReceivedToExecuted(blockID flow.Identifier) { | |||
ec.tracer.StartSpan(blockID, executionBlockReceivedToExecuted).SetTag("block_id", blockID.String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to define a metric instead of tracing here, e.g. blockExecutionWaitTime
cmd/scaffold.go
Outdated
@@ -291,7 +291,8 @@ func (fnb *FlowNodeBuilder) initMetrics() { | |||
|
|||
fnb.Tracer = trace.NewNoopTracer() | |||
if fnb.BaseConfig.tracerEnabled { | |||
tracer, err := trace.NewTracer(fnb.Logger, fnb.BaseConfig.NodeRole) | |||
serviceName := fnb.BaseConfig.NodeRole + "-" + fnb.BaseConfig.nodeIDHex[:8] | |||
tracer, err := trace.NewTracer(fnb.Logger, serviceName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We consider each node role + the first 8 digits of the id as service id since info like consensus-001
is not available here.
…flow-go into ramtin/entity-life-cycle-tracing
Co-authored-by: Leo Zhang <zhangchiqing@gmail.com>
…flow-go into ramtin/entity-life-cycle-tracing
This reverts commit edcd95b.
…flow-go into ramtin/entity-life-cycle-tracing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the change, but (there is always a but) - I really think we should have some tests for it.
Even adding a tracer for existing tests and asserting is traces matches what we would expect will greatly increase confidence
|
||
e.log.Debug(). | ||
Hex("tx_id", logging.Entity(txBody)). | ||
Msg("executing transaction") | ||
|
||
txView := collectionView.NewChild() | ||
|
||
tx := fvm.Transaction(txBody, txIndex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want to move this below trace span as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if I understand? you mean the NewChild() call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SetTraceSpan won't start a trace, it would only pass the parent span reference to transaction object
@m4ksio this PR is already really big, going to add tests for the tracers in a follow up PR to this one. |
Co-authored-by: Leo Zhang <zhangchiqing@gmail.com>
2824: chore(tests): remove unused mock r=SaveTheRbtz a=SaveTheRbtz `MutationContext` was removed in 019f7b4 (part of #1243). PS. `@gomisha` I'm curious how many of these unused mack files we have in the repo. Maybe we can automagically detect them during the lint phase? Co-authored-by: Alexey Ivanov <rbtz@dapperlabs.com>
This PR