ydb-platform / ydb-platform/ydb-cpp-sdk

Support tracing in SDK and add loading to OpenTelemetry client

Open
#376 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #517 by @zarinatlupova — closed without merging
  • #588 by @maladetska — closed without merging
enhancement student-projects
Dominant language
C++
Stars
19
Forks
31
Avg merge
2d 5h
Merged PRs (30d)
10

Description

Трейсинг - очень мощный инструмент Observability, позволяет расследовать проблемы с запросами.

По-простому, это распределенный stacktrace, который сохраняет вызовы между сервисами. Подробнее можно почитать про это тут

План работы:

  1. Поддержать передачу trace_id в gRPC заголовке traceparent: https://github.com/ydb-platform/ydb-cpp-sdk/issues/326. Это позволит соединить спаны клиента и сервера YDB в единый трейс.
  2. Поддержать загрузку спанов уже от самого SDK:
    • Мы не можем завязываться на один клиент отгрузки трейсов, так что надо придумать единый интерфейс, который мы будем реализовывать в различных плагинах (паттерн Адаптер). Можно посмотреть на YDB Go SDK, или на другие драйвера БД.
    • Реализовать плагин для OpenTelemetry клиента. Он будет реализовывать общий интерфейс, пользователи будут передавать его в NYdb::TDriver. Можно выбрать другой OpenTelemetry клиент, если он будет популярнее, тут есть простор для исследования.
    • Разметить вызовы SDK спанами и отгружать их в плагин, который нам передал пользователь. Со спанами важно соблюдать баланс, их должно быть достаточно, чтобы понимать, что было с запросом в SDK, но и не слишком много, чтобы не перегрузить трейс спанами от SDK

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with NYdb::TDriver, issue #326, the YDB Go SDK, and the OpenTelemetry C++ client. Define the adapter interface, traceparent propagation, and SDK span boundaries before implementing the plugin. Done means users can provide a plugin, SDK and server spans share a trace, and SDK spans are exported without excessive instrumentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, grpc
Domain
distributed-systems, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.