diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index ec4c82a7ba..bd72bba1fa 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -292,9 +292,6 @@ export function initIocContainer( knex: await deps.use('knex'), accountingService: await deps.use('accountingService'), walletAddressService: await deps.use('walletAddressService'), - telemetry: config.enableTelemetry - ? await deps.use('telemetry') - : undefined, config: await deps.use('config') }) }) diff --git a/packages/backend/src/open_payments/payment/incoming/service.ts b/packages/backend/src/open_payments/payment/incoming/service.ts index 143da508b2..afad128bbe 100644 --- a/packages/backend/src/open_payments/payment/incoming/service.ts +++ b/packages/backend/src/open_payments/payment/incoming/service.ts @@ -17,7 +17,6 @@ import { import { Amount } from '../../amount' import { IncomingPaymentError } from './errors' import { IAppConfig } from '../../../config/app' -import { TelemetryService } from '../../../telemetry/service' export const POSITIVE_SLIPPAGE = BigInt(1) // First retry waits 10 seconds @@ -48,7 +47,6 @@ export interface ServiceDependencies extends BaseService { accountingService: AccountingService walletAddressService: WalletAddressService config: IAppConfig - telemetry?: TelemetryService } export async function createIncomingPaymentService( @@ -222,10 +220,6 @@ async function handleDeactivated( ) await incomingPayment.$query(deps.knex).patch({ processAt: null }) return - } else if (deps.telemetry) { - deps.telemetry.incrementCounter('transactions_count_incoming', 1, { - description: 'Count of funded incoming transactions' - }) } const type = diff --git a/packages/backend/src/open_payments/payment/outgoing/lifecycle.ts b/packages/backend/src/open_payments/payment/outgoing/lifecycle.ts index 30585c1399..d8e56b45fc 100644 --- a/packages/backend/src/open_payments/payment/outgoing/lifecycle.ts +++ b/packages/backend/src/open_payments/payment/outgoing/lifecycle.ts @@ -85,7 +85,7 @@ export async function handleSending( const payEndTime = Date.now() if (deps.telemetry) { - deps.telemetry.incrementCounter('transactions_count_outgoing', 1, { + deps.telemetry.incrementCounter('transactions_count', 1, { description: 'Count of funded outgoing transactions' }) diff --git a/packages/backend/src/payment-method/ilp/connector/core/rafiki.ts b/packages/backend/src/payment-method/ilp/connector/core/rafiki.ts index 8cfe8fdf44..d07c32dd81 100644 --- a/packages/backend/src/payment-method/ilp/connector/core/rafiki.ts +++ b/packages/backend/src/payment-method/ilp/connector/core/rafiki.ts @@ -168,7 +168,7 @@ export class Rafiki { 'packet_count_prepare', 1, { - description: 'Count of incoming prepare packets' + description: 'Count of prepare packets that are sent' } ) console.log('TEST RAFIKI PREPARE PACKT COUNT ADDED') @@ -223,7 +223,7 @@ export class Rafiki { 'packet_count_fulfill', 1, { - description: 'Count of outgoing fulfill packets' + description: 'Count of fulfill packets' } ) console.log('TEST RAFIKI FULFILL PACKT COUNT ADDED') @@ -232,7 +232,7 @@ export class Rafiki { 'packet_count_reject', 1, { - description: 'Count of outgoing reject packets' + description: 'Count of reject packets' } ) console.log('TEST RAFIKI REJECT PACKT COUNT ADDED') diff --git a/packages/documentation/src/content/docs/telemetry/overview.md b/packages/documentation/src/content/docs/telemetry/overview.md index 973f51d9c3..e724f3ea66 100644 --- a/packages/documentation/src/content/docs/telemetry/overview.md +++ b/packages/documentation/src/content/docs/telemetry/overview.md @@ -7,7 +7,7 @@ title: Overview The objective of the telemetry feature is to gather metrics and establish an infrastructure for visualizing valuable network insights. The metrics we at the Interledger Foundation collect include: - The total amount of money transferred via packet data within a specified time frame (daily, weekly, monthly). -- The number of transactions from incoming payments that have been at least partially successful. +- The number of transactions that have been at least partially successful. - The number of ILP packets flowing through the network. - The average amount of money held within the network per transaction. - The avergae time it takes for an outgoing payment to complete. @@ -64,29 +64,23 @@ If an ASE does not provide the necessary exchange rate for a transaction, the te Data points for all metrics (e.g. counter increases) are exported to collection endpoints at a configurable interval (default recommended to 15s). -Metrics collected from the the sending side of a transaction: +Currently collected metrics: -- `transactions_count_outgoing` - Counter metric +- `transactions_count` - Counter metric - Description: “Count of funded outgoing transactions” - This counter metric increases by 1 for each successfully funded outgoing payment resource. -- `ilp_pay_time_ms` - Histogram metric - - Description: “Time to complete an outgoing ILP payment” - - This histogram metric records the time taken to make an ILP payment. - -Metrics collected from the the receiving side of a transaction: - - `packet_count_prepare` - Counter metric - - Description: “Count of incoming prepare packets” + - Description: “Count of prepare packets that are sent” - This counter metric increases by 1 for each prepare packet that is sent. - `packet_count_fulfill` - Counter metric - - Description: “Count of outgoing fulfill packets” - - This counter metric increases by 1 for each fulfill packet that is sent. + - Description: “Count of fulfill packets” + - This counter metric increases by 1 for each fulfill packet that is received. - `packet_count_reject` - Counter metric - - Description: “Count of outgoing reject packets” - - This counter metric increases by 1 for each reject packet that is sent. -- `transactions_count_incoming` - Counter metric - - Description: “Count of funded incoming transactions” - - This counter metric increases by 1 for each successfully funded incoming payment resource. + - Description: “Count of reject packets” + - This counter metric increases by 1 for each reject packet that is received. - `packet_amount_fulfill` - Counter metric - Description: “Amount sent through the network” - This amount metric increases by the amount sent in each ILP packet. +- `ilp_pay_time_ms` - Histogram metric + - Description: “Time to complete an outgoing ILP payment” + - This histogram metric records the time taken to make an ILP payment.