tricorder-observability / Starship

Starship: next-generation Observability platform built with eBPF+WASM
GNU Affero General Public License v3.0
164 stars 24 forks source link

Write a detailed doc for users to write eBPF+WASM module and use CLI to submit the module to Starship #20

Open nascentcore-eng opened 1 year ago

nascentcore-eng commented 1 year ago

Starship now has the capability to deploy BCC source code and binary WASM program onto all nodes in a kubernetes cluster. To use this feature, one needs to:

  1. Create BCC code
  2. Define C struct describing the data generated by BCC code
  3. Generate c_struct_bindgen.h from the C struct mentioned above
  4. Include c_struct_bindgen.h in wasm code
  5. Write data processing code in WASM
  6. Include cJSON header, and use cJSON APIs to generate JSON string from the resultant data
  7. Allocate memory for output buffer
  8. Output JSON string to output buffer
  9. Deallocate output buffer's memory

In the process of writing this document, we'll hopefully find many issues that can be quickly fixed, and improve the overall user experience.

But we do not plan to have major feature or large changes during the process.

Depends on:

Design doc (in active writing and updating): https://tricorder.feishu.cn/wiki/wikcnOJblcUxd8HAQmbqnLumz3L

nascentcore-eng commented 1 year ago

BTW, given the deprioritized work on frontend development, this doc will instead rely on the CLI (https://github.com/tricorder-observability/starship/issues/528) as the main interface for users to interact with Starship.

tricorder-observability/starship-private#528 is currently worked on by @JaredTan95