tricorder-observability / Starship

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

Need to populate pre-built eBPF+WASM module data SQLite DB #36

Closed nascentcore-eng closed 1 year ago

nascentcore-eng commented 1 year ago

In addition to eBPF+WASM modules created by users, pre-built ones, for example, socket_trace.c and protocol parsing code, needs to be populated into sqlite DB.

One way to do that is to let bazel run a genrule() [0] that calls sqlite CLI to populate ebpf+WASM module data. And then include the resultant sqlite db file into API server's container image.

[0] https://bazel.build/reference/be/general

nascentcore-eng commented 1 year ago

Have talked to Zhihui about this issue, and assign to him

nascentcore-eng commented 1 year ago

Right now we have a modules dir under repo root. modules stores individual modules in each and every subdir. We need to provide .json template inside each module's directory, which describes the metadata of the module, for example, the name of the module, its ebpf code's perf buffer name, its wasm output's schema etc.

This tool can be implemented as a sub command of the starship CLI in src/cli

The purpose of this tool, as stated, is to pre-populate modules into tricorder.db file, which will be included in the api-server image.

nascentcore-eng commented 1 year ago

CLI tool has been added in src/load, under review.