Skip to content

Commit

Permalink
TMP: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
JoblersTune committed Aug 6, 2024
1 parent 9333411 commit 3240b9c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 30 deletions.
3 changes: 0 additions & 3 deletions packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -48,7 +47,6 @@ export interface ServiceDependencies extends BaseService {
accountingService: AccountingService
walletAddressService: WalletAddressService
config: IAppConfig
telemetry?: TelemetryService
}

export async function createIncomingPaymentService(
Expand Down Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class Rafiki<T = any> {
'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')
Expand Down Expand Up @@ -223,7 +223,7 @@ export class Rafiki<T = any> {
'packet_count_fulfill',
1,
{
description: 'Count of outgoing fulfill packets'
description: 'Count of fulfill packets'
}
)
console.log('TEST RAFIKI FULFILL PACKT COUNT ADDED')
Expand All @@ -232,7 +232,7 @@ export class Rafiki<T = any> {
'packet_count_reject',
1,
{
description: 'Count of outgoing reject packets'
description: 'Count of reject packets'
}
)
console.log('TEST RAFIKI REJECT PACKT COUNT ADDED')
Expand Down
28 changes: 11 additions & 17 deletions packages/documentation/src/content/docs/telemetry/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.

0 comments on commit 3240b9c

Please sign in to comment.