Full Service API
  • Welcome!
  • Overview
  • API Endpoints
    • v2
      • Account
        • Account
          • Create Account
          • Import Account
          • Import Account Legacy
          • Get Accounts
          • Get Account Status
          • Get Balance
          • Update Account Name
          • Set Require Spend Subaddress
          • Remove Account
        • Account Secrets
          • Export Account Secrets
        • Address
          • Assign Address For Account
          • Get Address For Account
          • Get Addresses
          • Get Address Status
          • Verify Address
        • View Only Account
          • Import View Only Account
          • Create View Only Account Import Request
          • Create View Only Account Sync Request
          • Sync View Only Account
      • Transaction
        • Transaction
          • Build Transaction
          • Submit Transaction
          • Build And Submit Transaction
          • Build Burn Transaction
          • Build Unsigned Transaction
          • Build Unsigned Burn Transaction
        • Transaction Output TXO
          • Memo
            • Validate Sender Memo
          • Get TXO
          • Get TXOs
          • Get MobileCoin Protocol TXO
          • Get TXO Membership Proofs
          • Sample Mixins
          • Get TXO Block Index
        • Confirmation
          • Get Confirmations
          • Validate Confirmations
        • Receiver Receipt
          • Check Receiver Receipt Status
          • Create Receiver Receipts
        • Transaction Log
          • Get Transaction Log
          • Get Transaction Logs
          • Get MobileCoin Protocol Transaction
        • Payment Request
          • Create Payment Request
          • Check B58 Type
      • Block
        • Get Block
        • Get Blocks
        • Get Recent Blocks
        • Search Ledger
      • Network Status
        • Get Network Status
      • Wallet Status
        • Get Wallet Status
      • Version
        • Get Version
    • v1 (deprecated)
      • Account
        • Account
          • Create Account
          • Import Account
          • Import Account Legacy
          • Get Account
          • Get All Accounts
          • Get Account Status
          • Update Account Name
          • Remove Account
        • Account Secrets
          • Export Account Secrets
        • Address
          • Assign Address For Account
          • Get Addresses For Account
          • Verify Address
        • Balance
          • Get Balance For Account
          • Get Balance For Address
      • Transaction
        • Transaction
          • Build Transaction
          • Submit Transaction
          • Build And Submit Transaction
          • Build Split Txo Transaction
        • Transaction Output TXO
          • Get TXO
          • Get MobileCoin Protocol TXO
          • Get TXOs For Account
          • Get TXOs For View Only Account
          • Get All TXOs For Address
        • Confirmation
          • Get Confirmations
          • Validate Confirmations
        • Receiver Receipt
          • Check Receiver Receipt Status
          • Create Receiver Receipts
        • Transaction Log
          • Get Transaction Object
          • Get Transaction Log
          • Get Transaction Logs For Account
          • Get All Transaction Logs For Block
          • Get All Transaction Logs Ordered By Block
          • Get MobileCoin Protocol Transaction
        • Payment Request
          • Create Payment Request
          • Check B58 Type
      • Gift Code
        • Build Gift Code
        • Submit Gift Code
        • Get Gift Code
        • Get All Gift Codes
        • Check Gift Code Status
        • Claim Gift Code
        • Remove Gift Code
      • Block
        • Get Block
      • Network Status
        • Get Network Status
      • Wallet Status
        • Get Wallet Status
      • Version
        • Get Version
    • Signer Service
      • Create Account
      • Get Account
      • Sign Transaction
      • Sync Txos
  • Usage
    • Getting Started
      • Running Full Service
      • Create an Account
      • Receiving MobileCoin
      • Sending MobileCoin
      • Next Steps
    • Full Service Network Diagram
    • Supported Token Metadata
    • Database Usage
    • API Key
    • View Only Account
      • Signer
      • Signer Service
    • No Wallet Mode
    • Validator Service
      • Running
      • Running With TLS
    • Mirror Service
      • Running
      • Running With TLS
      • Running With Encryption
    • Logging
      • Text Logs (syslog style)
      • Crash Reports
    • T3
    • Sender Memos
  • FAQ
    • Resolving Disputes
    • How do I check if Full-Service is operational?
    • Where are logs stored?
    • How do I speed up account import?
    • What is the precision of MOB?
  • Glossary
    • Account
    • Block
    • Blockchain
    • Consensus Protocol
    • Fog
    • Full Service
    • Key Image
    • Ledger
    • MOB
    • Public Address
    • Secure Enclave
    • Subaddress
    • Transaction
    • Transaction Proposal
    • Validator Node
    • Validator Service
Powered by GitBook
On this page

Was this helpful?

  1. Usage
  2. Logging

Crash Reports

PreviousText Logs (syslog style)NextT3

Last updated 2 years ago

Was this helpful?

In full-service and fog, we are using to track crash reports.

There are several ways to use sentry. One is that we could use something like google breakpad to get stacktraces from the process without instrumenting it. That is not what we do right now -- we instrument the servers to send "Error" and "Critical" logs to sentry.

We also have a special rust panic handler that formats the stack trace and sends it to the logs as a critical-level message, so that sentry will get it.

This is currently the only way that sentry gets stack traces. This is a problem because the rust panic handler only handles rust-language panics, but there are lots of ways the process can die without triggering a rust panic. For example, if the OS kills the process with OOM, or if the process dies with SIGSEGV in some C code that we have linked in. In these cases, sentry won't get a stacktrace, and we wouldn't get any stacktrace in production. An alternative would be to get the stacktrace using google breakpad, which runs outside the code being monitored and captures a stacktrace directly when it crashes, (and captures its recent logs on STDERR) and ship that to sentry.

Another known problem with this is that because of the way we use a background thread, the most recent logs may not actually get out of the process before it dies. We try to work around this by installing a rust panic handler that sleeps for 5 seconds, so that the logs probably escape the process before it dies. This is a hack, and it won't work if there is a SIGSEGV for instance. A more robust solution would be to use process isolation and not a background thread, so that log messages get out of the current process' memory (and into a pipe or some other place that will still exist after SIGSEGV) as quickly as possible. The external logging process would be responsible to actually ship them over the network to the final destination.

This goes back to 12-factor app guidance, that the app should be writing its logs unbuffered to STDOUT and all routing and handling of the logs happens in a different process (which survives a crash).

Sentry