feat(database_observability): Make targets optional#5924
Merged
matthewnolf merged 1 commit intomainfrom Apr 1, 2026
Merged
Conversation
Contributor
|
💻 Deploy preview deleted (feat(database_observability): Make targets optional). |
9a7f35e to
69be7e5
Compare
cristiangreco
approved these changes
Mar 31, 2026
…ts is omitted Makes `targets` optional for both `database_observability.mysql` and `database_observability.postgres`. When no targets are provided, the embedded exporter is started automatically using default args. An explicit `prometheus_exporter` block can still be used to customise the embedded exporter. Providing both `prometheus_exporter` and `targets` remains a validation error. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
69be7e5 to
bb08aee
Compare
gaantunes
pushed a commit
that referenced
this pull request
Apr 3, 2026
<!-- CONTRIBUTORS GUIDE: https://github.com/grafana/alloy/blob/main/docs/developer/contributing.md If this is your first PR or you have not contributed in a while, we recommend taking the time to review the guide. **NOTE** Your PR title must adhere to Conventional Commit style. For details on this, check out the Contributors Guide linked above. --> <!-- Human-readable description of the PR used as squash commit body. --> This change makes the `targets` for database_observability components optional. If it is not provided, we instead create an embedded prometheus exporter to scrape required metrics. This removes the need for users to configure the `prometheus.exporter.mysql` and `prometheus.exporter.postgres` components in addition to the respective `database_observability` components. <!-- Detailed descripion of the Pull Request, if needed. --> <!-- Fixes #issue_id --> <!-- Relevant notes for reviewers/testers. --> <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [x] Documentation added - [x] Tests updated - [ ] Config converters updated Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief description of Pull Request
This change makes the
targetsfor database_observability components optional. If it is not provided, we instead create an embedded prometheus exporter to scrape required metrics.This removes the need for users to configure the
prometheus.exporter.mysqlandprometheus.exporter.postgrescomponents in addition to the respectivedatabase_observabilitycomponents.Pull Request Details
Issue(s) fixed by this Pull Request
Notes to the Reviewer
PR Checklist