lablup / lablup/backend.ai

Request ID Tracking and Propagation Enhancement

Open
#7,745 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

## Motivation

Request ID is essential for distributed tracing and debugging across Backend.AI components (Manager, Agent, Storage-Proxy, App-Proxy). Currently, request ID propagation is incomplete when requests flow between components, resulting in "unknown" request IDs in logs and making it difficult to trace issues across services.

- Request ID is lost when Manager calls Agent/Storage-Proxy/App-Proxy clients
- Message queue event propagation does not consistently apply request ID context
- API responses do not include request ID in headers for client-side correlation

## Objective

Ensure complete request ID propagation across all Backend.AI components and include request ID in API response headers for end-to-end traceability.

- Automatically include `X-BackendAI-RequestID` header in all inter-component client calls
- Verify and fix message queue event context propagation
- Add request ID to all API response headers

## Expected Sub Issues

- Fix Request ID Header Propagation in Client Calls
- Verify and Fix Message Queue Event Request ID Propagation
- Add Request ID to API Response Headers

JIRA Issue: BA-3717

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.