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

Alerting: Fix attachment of external labels to Loki state history log streams #65140

Merged
merged 1 commit into from Mar 21, 2023

Conversation

alexweav
Copy link
Contributor

What is this feature?

The Loki state history did not properly map configured external labels through the config struct. As a result, external labels were missing.

Why do we need this feature?

Fix the above bug.

Who is this feature for?

Operators wanting to use external labels.

Which issue(s) does this PR fix?:

n/a

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.
  • There are no known compatibility issues with older supported versions of Grafana, or plugins.
  • It passes the Hosted Grafana feature readiness review for observability, scalability, performance, and security.

@alexweav alexweav added type/bug area/alerting Grafana Alerting area/backend add to changelog backport v9.4.x Mark PR for automatic backport to v9.4.x labels Mar 21, 2023
@alexweav alexweav added this to the 9.4.8 milestone Mar 21, 2023
@alexweav alexweav requested a review from a team as a code owner March 21, 2023 21:39
@@ -74,6 +74,7 @@ func NewLokiConfig(cfg setting.UnifiedAlertingStateHistorySettings) (LokiConfig,
BasicAuthUser: cfg.LokiBasicAuthUsername,
BasicAuthPassword: cfg.LokiBasicAuthPassword,
TenantID: cfg.LokiTenantID,
ExternalLabels: cfg.ExternalLabels,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the entire fix, everything else is just tests

@alexweav alexweav merged commit 07368de into main Mar 21, 2023
17 checks passed
@alexweav alexweav deleted the alexweav/external-labels-fix branch March 21, 2023 23:01
grafanabot pushed a commit that referenced this pull request Mar 21, 2023
… streams (#65140)

Fix attachment of external labels, add tests

(cherry picked from commit 07368de)
alexweav added a commit that referenced this pull request Mar 22, 2023
…story log streams (#65142)

Alerting: Fix attachment of external labels to Loki state history log streams (#65140)

Fix attachment of external labels, add tests

(cherry picked from commit 07368de)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
gotjosh pushed a commit that referenced this pull request Mar 27, 2023
… streams (#65140)

Fix attachment of external labels, add tests
@zerok zerok modified the milestones: 9.4.x, 9.4.8, 9.5.0 Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants