diff --git a/yarn-project/p2p/src/mem_pools/instrumentation.ts b/yarn-project/p2p/src/mem_pools/instrumentation.ts index 0ae6e4a90e9..d80b2f69d55 100644 --- a/yarn-project/p2p/src/mem_pools/instrumentation.ts +++ b/yarn-project/p2p/src/mem_pools/instrumentation.ts @@ -3,7 +3,7 @@ import { Attributes, type Histogram, LmdbMetrics, - LmdbStatsCallback, + type LmdbStatsCallback, Metrics, type TelemetryClient, type UpDownCounter, diff --git a/yarn-project/prover-client/src/proving_broker/factory.ts b/yarn-project/prover-client/src/proving_broker/factory.ts index 11840b3e716..67295fb6011 100644 --- a/yarn-project/prover-client/src/proving_broker/factory.ts +++ b/yarn-project/prover-client/src/proving_broker/factory.ts @@ -1,6 +1,6 @@ import { type ProverBrokerConfig } from '@aztec/circuit-types'; import { AztecLmdbStore } from '@aztec/kv-store/lmdb'; -import { TelemetryClient } from '@aztec/telemetry-client'; +import { type TelemetryClient } from '@aztec/telemetry-client'; import { ProvingBroker } from './proving_broker.js'; import { InMemoryBrokerDatabase } from './proving_broker_database/memory.js'; diff --git a/yarn-project/prover-client/src/proving_broker/proving_agent.ts b/yarn-project/prover-client/src/proving_broker/proving_agent.ts index d734d7879cc..333ac91a4a9 100644 --- a/yarn-project/prover-client/src/proving_broker/proving_agent.ts +++ b/yarn-project/prover-client/src/proving_broker/proving_agent.ts @@ -11,7 +11,7 @@ import { import { createDebugLogger } from '@aztec/foundation/log'; import { RunningPromise } from '@aztec/foundation/running-promise'; import { Timer } from '@aztec/foundation/timer'; -import { TelemetryClient } from '@aztec/telemetry-client'; +import { type TelemetryClient } from '@aztec/telemetry-client'; import { type ProofStore } from './proof_store.js'; import { ProvingAgentInstrumentation } from './proving_agent_instrumentation.js'; diff --git a/yarn-project/prover-client/src/proving_broker/proving_agent_instrumentation.ts b/yarn-project/prover-client/src/proving_broker/proving_agent_instrumentation.ts index fa5f1858ff8..2b1b98ad1b7 100644 --- a/yarn-project/prover-client/src/proving_broker/proving_agent_instrumentation.ts +++ b/yarn-project/prover-client/src/proving_broker/proving_agent_instrumentation.ts @@ -1,6 +1,5 @@ -import { ProvingRequestType } from '@aztec/circuit-types'; import { Timer } from '@aztec/foundation/timer'; -import { Attributes, Histogram, Metrics, TelemetryClient, UpDownCounter, ValueType } from '@aztec/telemetry-client'; +import { type Histogram, Metrics, type TelemetryClient, ValueType } from '@aztec/telemetry-client'; export class ProvingAgentInstrumentation { private idleTime: Histogram; @@ -9,7 +8,7 @@ export class ProvingAgentInstrumentation { const meter = client.getMeter(name); this.idleTime = meter.createHistogram(Metrics.PROVING_AGENT_IDLE, { - description: 'Records how long an agent was in between jobs', + description: 'Records how long an agent was idle', unit: 'ms', valueType: ValueType.INT, }); diff --git a/yarn-project/prover-client/src/proving_broker/proving_broker.ts b/yarn-project/prover-client/src/proving_broker/proving_broker.ts index bb08da40942..1c73b62b84a 100644 --- a/yarn-project/prover-client/src/proving_broker/proving_broker.ts +++ b/yarn-project/prover-client/src/proving_broker/proving_broker.ts @@ -13,12 +13,12 @@ import { createDebugLogger } from '@aztec/foundation/log'; import { type PromiseWithResolvers, RunningPromise, promiseWithResolvers } from '@aztec/foundation/promise'; import { PriorityMemoryQueue } from '@aztec/foundation/queue'; import { Timer } from '@aztec/foundation/timer'; -import { TelemetryClient } from '@aztec/telemetry-client'; +import { type TelemetryClient } from '@aztec/telemetry-client'; import assert from 'assert'; import { type ProvingBrokerDatabase } from './proving_broker_database.js'; -import { MonitorCallback, ProvingBrokerInstrumentation } from './proving_broker_instrumentation.js'; +import { type MonitorCallback, ProvingBrokerInstrumentation } from './proving_broker_instrumentation.js'; type InProgressMetadata = { id: ProvingJobId; @@ -111,7 +111,7 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer { return count; }; - public async start(): Promise { + public start(): Promise { for (const [item, result] of this.database.allProvingJobs()) { this.logger.info(`Restoring proving job id=${item.id} settled=${!!result}`); @@ -131,6 +131,8 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer { this.instrumentation.monitorQueueDepth(this.measureQueueDepth); this.instrumentation.monitorActiveJobs(this.countActiveJobs); + + return Promise.resolve(); } public stop(): Promise { diff --git a/yarn-project/prover-client/src/proving_broker/proving_broker_database/persisted.ts b/yarn-project/prover-client/src/proving_broker/proving_broker_database/persisted.ts index 4d6262691bf..61ca5232015 100644 --- a/yarn-project/prover-client/src/proving_broker/proving_broker_database/persisted.ts +++ b/yarn-project/prover-client/src/proving_broker/proving_broker_database/persisted.ts @@ -1,7 +1,7 @@ import { type ProofUri, ProvingJob, type ProvingJobId, ProvingJobSettledResult } from '@aztec/circuit-types'; import { jsonParseWithSchema, jsonStringify } from '@aztec/foundation/json-rpc'; import { type AztecKVStore, type AztecMap } from '@aztec/kv-store'; -import { LmdbMetrics, Metrics, TelemetryClient } from '@aztec/telemetry-client'; +import { LmdbMetrics, Metrics, type TelemetryClient } from '@aztec/telemetry-client'; import { type ProvingBrokerDatabase } from '../proving_broker_database.js'; diff --git a/yarn-project/telemetry-client/src/lmdb_metrics.ts b/yarn-project/telemetry-client/src/lmdb_metrics.ts index 6cc11696e79..7a261769e86 100644 --- a/yarn-project/telemetry-client/src/lmdb_metrics.ts +++ b/yarn-project/telemetry-client/src/lmdb_metrics.ts @@ -1,4 +1,4 @@ -import { BatchObservableResult, type Meter, type Metrics, ObservableGauge, ValueType } from './telemetry.js'; +import { type BatchObservableResult, type Meter, type Metrics, ObservableGauge, ValueType } from './telemetry.js'; export type LmdbMetricDescriptor = { name: Metrics; diff --git a/yarn-project/telemetry-client/src/telemetry.ts b/yarn-project/telemetry-client/src/telemetry.ts index ad8c7092ee1..60e55b8b1c6 100644 --- a/yarn-project/telemetry-client/src/telemetry.ts +++ b/yarn-project/telemetry-client/src/telemetry.ts @@ -1,8 +1,8 @@ import { type AttributeValue, - BatchObservableCallback, + type BatchObservableCallback, type MetricOptions, - Observable, + type Observable, type BatchObservableResult as OtelBatchObservableResult, type Gauge as OtelGauge, type Histogram as OtelHistogram,