-
Notifications
You must be signed in to change notification settings - Fork 108
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
Use Prometheus registry when specified #1034
Conversation
pkg/components/beyla.go
Outdated
@@ -114,9 +114,9 @@ func buildCommonContextInfo( | |||
config.Attributes.Kubernetes.InformersSyncTimeout, | |||
), | |||
} | |||
if config.InternalMetrics.Prometheus.Port != 0 { | |||
if config.InternalMetrics.Prometheus.Port != 0 || config.Prometheus.Registry != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would enable internal metrics by default when using Alloy. Any opinions against it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only concern is open port for a container which is running with elevated permissions. It could increase the attack surface by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! One remark about making internal metrics on by default. Perhaps we can ensure it's listening only on localhost?
pkg/components/beyla.go
Outdated
@@ -114,9 +114,9 @@ func buildCommonContextInfo( | |||
config.Attributes.Kubernetes.InformersSyncTimeout, | |||
), | |||
} | |||
if config.InternalMetrics.Prometheus.Port != 0 { | |||
if config.InternalMetrics.Prometheus.Port != 0 || config.Prometheus.Registry != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only concern is open port for a container which is running with elevated permissions. It could increase the attack surface by default.
e4fa1ca
to
7fba337
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1034 +/- ##
==========================================
- Coverage 81.66% 81.46% -0.21%
==========================================
Files 137 137
Lines 10923 10956 +33
==========================================
+ Hits 8920 8925 +5
- Misses 1496 1515 +19
- Partials 507 516 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This PR enables using the Prometheus Registry (for Alloy) for the following metrics: