Skip to content

Commit

Permalink
Merge remote-tracking branch 'sdf/develop' into feature/anchor-533-ad…
Browse files Browse the repository at this point in the history
…d-gradle-task-to-start-servers
  • Loading branch information
lijamie98 committed Nov 21, 2023
2 parents 5706760 + b4c8061 commit 04aaed7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.stellar.anchor.platform.service;

public enum AnchorMetrics {
SEP24_TRANSACTION("sep24.transaction"),
SEP31_TRANSACTION("sep31.transaction"),
SEP24_TRANSACTION_OBSERVED("sep24.transaction.observed"),
SEP31_TRANSACTION_OBSERVED("sep31.transaction.observed"),
SEP31_TRANSACTION_DB("sep31.transaction.db"),
SEP24_TRANSACTION_DB("sep24.transaction.db"),
PAYMENT_RECEIVED("payment.received"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void handleSep31Transaction(ObservedPayment payment, JdbcSep31Transaction txn)

// Update metrics
Metrics.counter(
AnchorMetrics.SEP31_TRANSACTION.toString(),
AnchorMetrics.SEP31_TRANSACTION_OBSERVED.toString(),
"status",
SepTransactionStatus.PENDING_RECEIVER.toString())
.increment();
Expand Down Expand Up @@ -219,7 +219,13 @@ void handleSep24Transaction(ObservedPayment payment, JdbcSep24Transaction txn)
rpcConfig.getCustomMessages().getIncomingPaymentReceived());
}

// TODO(ANCHOR-545): Disable metrics temporarily
Metrics.counter(
AnchorMetrics.SEP24_TRANSACTION_OBSERVED.toString(),
"status",
SepTransactionStatus.PENDING_ANCHOR.toString())
.increment();
Metrics.counter(AnchorMetrics.PAYMENT_RECEIVED.toString(), "asset", payment.getAssetName())
.increment(Double.parseDouble(payment.getAmount()));
}

void handleSep6Transaction(ObservedPayment payment, JdbcSep6Transaction txn)
Expand Down

0 comments on commit 04aaed7

Please sign in to comment.