Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mojaloop/3471): prism optimization #962

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vijayg10
Copy link
Contributor

feat(mojaloop/3471): prism optimization

@vijayg10 vijayg10 self-assigned this Aug 24, 2023
@mdebarros
Copy link
Member

Example Position Prepare event, with the added context:

{
  "from": "perffsp1",
  "to": "perffsp2",
  "id": "6155933c-a5d5-4c15-a93c-cf1d1be560c4",
  "content": {
    "uriParams": {
      "id": "6155933c-a5d5-4c15-a93c-cf1d1be560c4"
    },
    "headers": {
      "host": "ml-api-adapter:3000",
      "user-agent": "k6/0.45.0 (https://k6.io/)",
      "content-length": 1314,
      "accept": "application/vnd.interoperability.transfers+json;version=1.1",
      "content-type": "application/vnd.interoperability.transfers+json;version=1.1",
      "date": "2023-08-24T12:52:18.000Z",
      "fspiop-destination": "perffsp2",
      "fspiop-source": "perffsp1",
      "traceparent": "00-cd34604805fa54449ab8b307cb9819fd-f0381336ad458fc6-01",
      "tracestate": "tx_end2end_start_ts=1692881538527"
    },
    "payload": "data:application/vnd.interoperability.transfers+json;version=1.1;base64,eyJ0cmFuc2ZlcklkIjoiNjE1NTkzM2MtYTVkNS00YzE1LWE5M2MtY2YxZDFiZTU2MGM0IiwicGF5ZXJGc3AiOiJwZXJmZnNwMSIsInBheWVlRnNwIjoicGVyZmZzcDIi...",
    "context": {
      "settlementModel": {
        "settlementModelId": 1,
        "name": "DEFERREDNETUSD",
        "isActive": 1,
        "settlementGranularityId": 2,
        "settlementInterchangeId": 2,
        "settlementDelayId": 2,
        "currencyId": "USD",
        "requireLiquidityCheck": 1,
        "ledgerAccountTypeId": 1,
        "autoPositionReset": 1,
        "adjustPosition": 0,
        "settlementAccountTypeId": 2
      },
      "participants": {
        "payer": {
          "id": "perffsp1",
          "accounts": {
            "POSITION": {
              "participantId": 2,
              "name": "perffsp1",
              "description": null,
              "isActive": 1,
              "createdDate": "2023-08-24T12:48:53.000Z",
              "createdBy": "unknown",
              "participantCurrencyId": 7,
              "currencyId": "USD",
              "currencyIsActive": 1
            },
            "SETTLEMENT": {
              "participantId": 2,
              "name": "perffsp1",
              "description": null,
              "isActive": 1,
              "createdDate": "2023-08-24T12:48:53.000Z",
              "createdBy": "unknown",
              "participantCurrencyId": 8,
              "currencyId": "USD",
              "currencyIsActive": 1
            }
          }
        },
        "payee": {
          "id": "perffsp2",
          "accounts": {
            "POSITION": {
              "participantId": 3,
              "name": "perffsp2",
              "description": null,
              "isActive": 1,
              "createdDate": "2023-08-24T12:49:03.000Z",
              "createdBy": "unknown",
              "participantCurrencyId": 15,
              "currencyId": "USD",
              "currencyIsActive": 1
            }
          }
        }
      }
    }
  },
  "type": "application/json",
  "metadata": {
    "correlationId": "6155933c-a5d5-4c15-a93c-cf1d1be560c4",
    "event": {
      "type": "position",
      "action": "prepare",
      "createdAt": "2023-08-24T12:52:18.528Z",
      "state": {
        "status": "success",
        "code": 0,
        "description": "action successful"
      },
      "id": "3b1cc412-8427-4888-a388-f78b6149e33f"
    },
    "trace": {
      "service": "cl_transfer_prepare",
      "traceId": "cd34604805fa54449ab8b307cb9819fd",
      "spanId": "932385c4d53fea28",
      "sampled": 1,
      "flags": "01",
      "parentSpanId": "9c2a74f8ce866116",
      "startTimestamp": "2023-08-28T13:10:31.317Z",
      "tags": {
        "tracestate": "acmevendor=eyJzcGFuSWQiOiI5MzIzODVjNGQ1M2ZlYTI4IiwidGltZUFwaVByZXBhcmUiOiIxNjkyODgxNTM4NTI4In0=,tx_end2end_start_ts=1692881538527",
        "transactionType": "transfer",
        "transactionAction": "prepare",
        "transactionId": "6155933c-a5d5-4c15-a93c-cf1d1be560c4",
        "source": "perffsp1",
        "destination": "perffsp2",
        "payerFsp": "perffsp1",
        "payeeFsp": "perffsp2"
      },
      "tracestates": {
        "acmevendor": {
          "spanId": "932385c4d53fea28",
          "timeApiPrepare": "1692881538528"
        },
        "tx_end2end_start_ts": "1692881538527"
      }
    },
    "protocol.createdAt": 1693228231325
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants