Enable Telemetry in Protocol Servers (BAP & BPP)

Overview

The Telemetry Service is a critical component of the UBI Network infrastructure. It captures and logs key runtime events such as:

  • API invocations by both BAP (Seeker) and BPP (Provider)

  • Request/response metadata (message IDs, transaction IDs, domains, etc.)

  • Performance metrics such as latency and error rates

  • Network-level traceability between participants

Telemetry data helps in monitoring, debugging, and analyzing the overall network behavior. This data can later be used for visualization dashboards or audit systems to ensure network transparency and reliability.

Telemetry runs in the background, batching and asynchronously pushing event data to a centralized telemetry endpoint, ensuring no delay in normal API responses.

Purpose

Enabling Telemetry helps you:

  • Track Beckn/UBI transaction volume across APIs (search, select, init, confirm, status, etc.)

  • Monitor API response times and success/failure ratios

  • Collect event and audit logs across all participants

  • Push batched metrics to the centralized UBI Telemetry Service

Data Model

Each telemetry record contains identifiers and contextual metadata such as:

{
  "eid": "API",
  "ets": 1755644414380,
  "mid": "44370ec0-7d50-11f0-97ca-f5a7be262a70",
  "ver": "1.0",
  "data": {
    "url": "/on_status",
    "msgid": "1a7c680a-344c-4e12-bedc-7cec3c15f2f2",
    "action": "on_status",
    "exdata": [],
    "method": "POST",
    "transactionid": "391ba65c-a55e-40cc-9bf9-0da7b5eb23db"
  },
  "context": {
    "cdata": [
      { "type": "country", "value": "India", "valueType": "string" },
      { "type": "city", "value": "Bangalore", "valueType": "string" }
    ],
    "pdata": {
      "id": "dev-uba-bpp.ubi-network.com",
      "uri": "https://dev-uba-bpp.ubi-network.com/"
    },
    "domain": "ubi:financial-support",
    "source": {
      "id": "dev-uba-bpp.ubi-network.com",
      "uri": "https://dev-uba-bpp.ubi-network.com/",
      "type": "provider"
    },
    "target": {
      "id": "dev-uba-bap.ubi-network.com",
      "uri": "https://dev-uba-bap.ubi-network.com/",
      "type": "seeker"
    },
    "channel": "dev-uba-bpp.ubi-network.com"
  }
}

This structure allows network operators to trace requests across all participants and correlate transactions between Seeker and Provider.

Configuration Location

Telemetry configuration resides in the default.yaml file of each protocol server.

Example paths:

  • BAP Server: /app/config/default.yaml

  • BPP Server: /app/config/default.yaml

Configuration Parameters

Below is the configuration block used to enable telemetry:

telemetry:
  enabled: true
  url: https://telemetry-sandbox.the-ubi.io/telemetry/v1/telemetry
  batchSize: 2
  syncInterval: 1  # in minutes
  redis_db: 3
Parameter
Description
Example

enabled

Enables or disables telemetry for the service.

true

url

Endpoint to which telemetry data is sent.

https://telemetry-sandbox.the-ubi.io/telemetry/v1/telemetry

batchSize

Number of telemetry events to batch before sending.

2

syncInterval

Frequency (in minutes) for sending telemetry batches.

1

redis_db

Redis DB index used for temporary event storage.

3

If telemetry is disabled:

telemetry:
  enabled: false
  url: ""
  batchSize: 100
  syncInterval: 30
  redis_db: 3

Important Notes

  • Mandatory for Network Participants: All Network Participants (NPs) — both BAP and BPP — must enable Telemetry in their protocol servers. This ensures end-to-end visibility of transaction flows across the network.

  • Unique Identification: Each telemetry record includes both message_id and transaction_id, linking logs to the corresponding network transaction.

  • Integration Simplicity: Once enabled in the configuration, telemetry automatically captures all incoming and outgoing Beckn API events without additional code changes.

  • Centralized Monitoring: The UBI Telemetry Service aggregates this data and can be visualized via monitoring dashboards (e.g., Grafana, Kibana) to analyze network health and participant performance.

Last updated