eunomia-bpf / bpftime

Userspace eBPF runtime for Observability, Network & General Extensions Framework
https://eunomia.dev/bpftime/
MIT License
754 stars 73 forks source link

[FEATURE] Rename agent_config to runtime_config #330

Open yunwei37 opened 4 weeks ago

yunwei37 commented 4 weeks ago

Is your feature request related to a problem? Please describe.

As time envolve, The agent config in https://github.com/eunomia-bpf/bpftime/blob/master/runtime/include/bpftime_config.hpp is no longer only for the agent. It should contain all the runtime config.

And also, the two config in https://github.com/eunomia-bpf/bpftime/blob/87a8901d6eca582812ee84f8ab2ae3d10740adce/runtime/syscall-server/syscall_context.cpp#L35 should be merged into the runtime config data struct and init in https://github.com/eunomia-bpf/bpftime/blob/87a8901d6eca582812ee84f8ab2ae3d10740adce/runtime/src/bpftime_config.cpp#L41

Describe the solution you'd like

Officeyutong commented 4 weeks ago

Should we consider using configuration library like https://www.boost.org/doc/libs/1_85_0/libs/config/doc/html/index.html ?

Since it will be more convenient to manage and parse configuration from multiple sources

yunwei37 commented 4 weeks ago

It seems what you mentioned is not a config library, but how to config the boost library for different compiler/usecases

yunwei37 commented 4 weeks ago

Any recommendations for libraries?

yunwei37 commented 4 weeks ago

https://github.com/hyperrealm/libconfig maybe?

It seems our configurations are simple and don't need such libraries for management

Officeyutong commented 4 weeks ago

Any recommendations for libraries?

Sorry, my fault, too sleepy now. Try libconfig

Officeyutong commented 4 weeks ago

https://github.com/hyperrealm/libconfig maybe?

It seems our configurations are simple and don't need such libraries for management

Yes, this is what I would like to reocmmend. Though the configuration structure of bpftime is simple now, but it has a big chance to get more complicated in the future.

yunwei37 commented 4 weeks ago

it has a big chance to get more complicated in the future

well...what kinds of new configuration would bpftime have in the future? I'm not quite sure about that.

I would suggest that we focus on the small number of configurations we have now, and don't need a library to handle that

Officeyutong commented 4 weeks ago

it has a big chance to get more complicated in the future

well...what kinds of new configuration would bpftime have in the future? I'm not quite sure about that.

I would suggest that we focus on the small number of configurations we have now, and don't need a library to handle that

Ok, let's focus on configurations now and don't adopt a config library