Skip to content

Commit

Permalink
fix telemetry tracing variable name (#30)
Browse files Browse the repository at this point in the history
* fix telemetry tracing variable name

* fix proposed block msg handler telemetry event titles block height
  • Loading branch information
Geo25rey authored Apr 9, 2024
1 parent 66718a4 commit 2444468
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/services/new/witness/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -800,25 +800,25 @@ export class WitnessServiceV2 {
const {message, drain, from} = pubReq;

let recvCtx: ReturnType<typeof telemetry['continueTracedEvent']> | null = null
if (message?.payload?.traceInfo) {
if (message?.traceInfo) {
const block_height = this.self.chainBridge.streamParser.stream.lastBlock

const slotHeight = (block_height - (block_height % networks[this.self.config.get('network.id')].roundLength)) //+ networks[this.self.config.get('network.id')].roundLength

recvCtx = telemetry.continueTracedEvent(`received block proposal ${block_height}`, message.payload.traceInfo, {
recvCtx = telemetry.continueTracedEvent(`received block proposal ${slotHeight}`, message.traceInfo, {
block_height: slotHeight,
latest_block: block_height,
from: from?.toString(),
})
}

let cadBlockCtx: ReturnType<typeof telemetry['continueTracedEvent']> | null = null
if (message?.payload?.traceInfo) {
if (message?.traceInfo) {
const block_height = this.self.chainBridge.streamParser.stream.lastBlock

const slotHeight = (block_height - (block_height % networks[this.self.config.get('network.id')].roundLength)) //+ networks[this.self.config.get('network.id')].roundLength

cadBlockCtx = telemetry.continueTracedEvent(`computing candidate block ${block_height}`, message.payload.traceInfo, {
cadBlockCtx = telemetry.continueTracedEvent(`computing candidate block ${slotHeight}`, message.traceInfo, {
block_height: slotHeight,
latest_block: block_height,
from: from?.toString(),
Expand All @@ -840,12 +840,12 @@ export class WitnessServiceV2 {
cadBlockCtx?.finish()

let verifyingCtx: ReturnType<typeof telemetry['continueTracedEvent']> | null = null
if (message?.payload?.traceInfo) {
if (message?.traceInfo) {
const block_height = this.self.chainBridge.streamParser.stream.lastBlock

const slotHeight = (block_height - (block_height % networks[this.self.config.get('network.id')].roundLength)) //+ networks[this.self.config.get('network.id')].roundLength

verifyingCtx = telemetry.continueTracedEvent(`verifying block proposal ${block_height}`, message.payload.traceInfo, {
verifyingCtx = telemetry.continueTracedEvent(`verifying block proposal ${slotHeight}`, message.traceInfo, {
block_height: slotHeight,
latest_block: block_height,
from: from?.toString(),
Expand Down

0 comments on commit 2444468

Please sign in to comment.