Skip to content

feat(database_observability): Make targets optional#5924

Merged
matthewnolf merged 1 commit intomainfrom
mn/embedded-exporter-default
Apr 1, 2026
Merged

feat(database_observability): Make targets optional#5924
matthewnolf merged 1 commit intomainfrom
mn/embedded-exporter-default

Conversation

@matthewnolf
Copy link
Copy Markdown
Contributor

Brief description of Pull Request

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.

Pull Request Details

Issue(s) fixed by this Pull Request

Notes to the Reviewer

PR Checklist

  • Documentation added
  • Tests updated
  • Config converters updated

@matthewnolf matthewnolf requested review from a team and clayton-cornell as code owners March 30, 2026 15:43
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 30, 2026

💻 Deploy preview deleted (feat(database_observability): Make targets optional).

@matthewnolf matthewnolf force-pushed the mn/embedded-exporter-default branch 2 times, most recently from 9a7f35e to 69be7e5 Compare March 30, 2026 16:12
…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>
@matthewnolf matthewnolf force-pushed the mn/embedded-exporter-default branch from 69be7e5 to bb08aee Compare April 1, 2026 10:25
@matthewnolf matthewnolf enabled auto-merge (squash) April 1, 2026 10:39
@matthewnolf matthewnolf merged commit 54664b2 into main Apr 1, 2026
52 of 53 checks passed
@matthewnolf matthewnolf deleted the mn/embedded-exporter-default branch April 1, 2026 11:17
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>
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants