Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

info: expose additional bpf_prog_info fields in ProgramInfo #1512

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

tyrone-wu
Copy link
Contributor

Hello! 👋

I'm implementing a Telegraf plugin that extracts metadata information from the bpf_prog_info object. There's some additional fields that I'd like to include in the metric, that aren't exposed in ProgramInfo.

The additional fields that are exposes are:

  • jited_prog_len
  • xlated_prog_len
  • load_time
  • verified_insns

@tyrone-wu tyrone-wu requested a review from a team as a code owner July 11, 2024 22:56
@tyrone-wu tyrone-wu marked this pull request as draft July 11, 2024 22:56
@lmb
Copy link
Collaborator

lmb commented Jul 15, 2024

Hi @tyrone-wu, thanks for your contribution! Please take a look at the comment I wrote in #1515 which explains how to extend the Info API. Please also add tests for the API you're introducing.

@tyrone-wu tyrone-wu force-pushed the info/expose-info-fields branch from f8c72b7 to 56324bb Compare July 19, 2024 21:25
Copy link
Collaborator

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tyrone-wu Ping, are you still interested in merging this? This is good to go IMO with one fixup. I'll pull it out of draft so it's more visible.

@ti-mo ti-mo marked this pull request as ready for review September 5, 2024 14:08
info.go Show resolved Hide resolved
info.go Outdated Show resolved Hide resolved
@tyrone-wu
Copy link
Contributor Author

tyrone-wu commented Sep 5, 2024

Sorry for the delay, I've been caught in some other things. I can definitely get this done by the end of today. 😺 🙏

@tyrone-wu tyrone-wu force-pushed the info/expose-info-fields branch 3 times, most recently from 2bef624 to 9fcab04 Compare September 5, 2024 22:16
@tyrone-wu tyrone-wu requested review from florianl and ti-mo September 5, 2024 22:17
Copy link
Member

@dylandreimerink dylandreimerink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you!

Copy link
Contributor

@florianl florianl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the update 👍

Copy link
Collaborator

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I'd already left a code review earlier, sorry for the delay.

info.go Outdated Show resolved Hide resolved
info.go Outdated Show resolved Hide resolved
info.go Outdated Show resolved Hide resolved
info.go Outdated Show resolved Hide resolved
@tyrone-wu tyrone-wu force-pushed the info/expose-info-fields branch from 9fcab04 to 4ad10eb Compare September 11, 2024 15:55
@tyrone-wu tyrone-wu requested a review from ti-mo September 11, 2024 15:58
Exposes additional metadata fields from `bpf_prog_info` to
`ProgramInfo`:
- jited_prog_len
- xlated_prog_len
- load_time
- verified_insns

Signed-off-by: tyrone-wu <wudevelops@gmail.com>
@ti-mo ti-mo force-pushed the info/expose-info-fields branch from 4ad10eb to c63f95d Compare September 12, 2024 09:27
Copy link
Collaborator

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch! I gave this a quick rebase due to #1563, CI needed to have its toolchain image upgraded.

@ti-mo ti-mo merged commit f0b3993 into cilium:main Sep 12, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants