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

Add metric for instrumented processes #928

Merged
merged 6 commits into from
Jun 17, 2024
Merged

Conversation

marctc
Copy link
Contributor

@marctc marctc commented Jun 13, 2024

This PR adds a Gauge to track all services registered by Beyla.
Useful for debugging purpouses. Displays something like this:

beyla_instrumented_processes{service="php"} 1
beyla_instrumented_processes{service="productcatalogservice"} 1
beyla_instrumented_processes{service="prometheus"} 1
beyla_instrumented_processes{service="python3.12"} 2

Current limtation is for intepreted languanges such Python, Ruby or Java, as we won't visualize
which program are we discovering.

@marctc marctc changed the title Add discovered svc metric Add discovered services metric Jun 13, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jun 13, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 79.31%. Comparing base (6c04f76) to head (a166014).
Report is 4 commits behind head on main.

Files Patch % Lines
pkg/internal/imetrics/iprom.go 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #928      +/-   ##
==========================================
+ Coverage   79.16%   79.31%   +0.15%     
==========================================
  Files         131      131              
  Lines        9948    10139     +191     
==========================================
+ Hits         7875     8042     +167     
- Misses       1569     1586      +17     
- Partials      504      511       +7     
Flag Coverage Δ
integration-test 55.27% <73.33%> (+0.40%) ⬆️
k8s-integration-test 59.20% <86.66%> (-0.08%) ⬇️
oats-test 35.50% <13.33%> (-0.95%) ⬇️
unittests 47.19% <0.00%> (+1.73%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marctc marctc requested a review from mariomac June 14, 2024 12:50
@marctc marctc changed the title Add discovered services metric Add metric for instrumented processes Jun 14, 2024
Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

LGTM! What do you think about extending one of our integration tests to ensure this works? Maybe one of those which test multiple processes, then you can enable the internal metrics and confirm we see all services we expect to see?

@marctc marctc merged commit e1aa5ab into main Jun 17, 2024
8 checks passed
@marctc marctc deleted the add_discovered_svc_metric branch June 17, 2024 14:51
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.

4 participants