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

stevesg/hairyhenderson otel tracing support #4036

Conversation

stevesg
Copy link
Contributor

@stevesg stevesg commented Sep 24, 2024

No description provided.

santihernandezc and others added 30 commits April 22, 2024 15:51
This PR makes it possible to store the last error for each receiver in case of notification delivery failure. These errors are exposed via the `/api/v2/receivers` endpoint.

Co-authored-by: gotjosh <[email protected]>
* Add limits for silences

This commit adds limits for silences including the maximum number
of active and pending silences, and the maximum size per silence
(in bytes).

Signed-off-by: George Robinson <[email protected]>

* Remove default limits

Signed-off-by: George Robinson <[email protected]>

* Allow expiration of silences that exceed max size

---------

Signed-off-by: George Robinson <[email protected]>
* Limits should include expired silences

Signed-off-by: George Robinson <[email protected]>

* Fix docs

Signed-off-by: George Robinson <[email protected]>

---------

Signed-off-by: George Robinson <[email protected]>
…lude_expired_silences

Limits should include expired silences (prometheus#3862)
…_receivers

remove changes related to capturing and exposing errors in notificati…
This commit fixes silence tests that relied on the maintenance
function running at a fixed 100ms interval. If the go runtime
that runs the maintenance is not scheduled with 150ms then the
test will fail.

Signed-off-by: George Robinson <[email protected]>
* Silence limits as functions

This commit changes silence limits from a struct of ints to a struct
of functions that return individual limits. This allows limits
to be lazy-loaded and updated without having to call silences.New().

Signed-off-by: George Robinson <[email protected]>

* Add explicit test for no limits

Signed-off-by: George Robinson <[email protected]>

* Fix run()

Signed-off-by: George Robinson <[email protected]>

---------

Signed-off-by: George Robinson <[email protected]>
* Rename silence limit to max-silence-size-bytes

This commit renames an existing (unreleased) limit from
max-per-silence-bytes to max-silence-size-bytes.

Signed-off-by: George Robinson <[email protected]>

* Update help

Signed-off-by: George Robinson <[email protected]>

---------

Signed-off-by: George Robinson <[email protected]>
This commit removes the Id from the method silences.Set(*pb.Silence)
as it is redundant. The Id is still set even when creating a silence
fails. This will be fixed in a later change.

Signed-off-by: George Robinson <[email protected]>
…rometheus#3877)

* Fix MaxSilences limit causes incomplete updates of existing silences

This commit fixes a bug where the MaxSilences limit can cause an
incomplete update of existing silences, where the old silence can
be expired but the new silence cannot be created because it would
exceeded the maximum number of silences.

Signed-off-by: George Robinson <[email protected]>

---------

Signed-off-by: George Robinson <[email protected]>
This commit improves the existing test coverage for silences to
cover a number of additional cases, and also improve the comments
of existing cases.

Signed-off-by: George Robinson <[email protected]>
This commit updates the Upsert method to return just an error
instead of the previous (string, error). This brings it up to
date with changes upstream (prometheus#3881) where we removed the string
return value because it was redundant. If error is non-nil,
then the id is assigned to the *pb.Silence and does not need
to be returned.
This commit adds a unit test for the postSilencesHandler to
create and then update a silence. It shows that changing the
ID of an existing silence returns 404 Not Found, and removing
the ID of an existing silence re-creates that silence with
a different ID.

Signed-off-by: George Robinson <[email protected]>
This commit fixes a bug where an invalid silence causes incomplete
updates of existing silences. This is fixed moving validation
out of the setSilence method and putting it at the start of the
Set method instead.

Signed-off-by: George Robinson <[email protected]>
…ilences (prometheus#3897)

This commit fixes a bug where the MaxSilenceSizeBytes limit can
cause an incomplete update of existing silences, where the old
silence can be expired but the new silence cannot be created
because it would exceed the maximum size limit.

Signed-off-by: George Robinson <[email protected]>
This commit updates the Upsert method to use the latest fixes
from upstream. It must set the UpdatedAt timestamp before
calling setSilence as this code was removed from setSilence,
and it must also change the silence into a *pb.MeshSilence
before calling setSilence as it now expects a *pb.MeshSilence
instead of *pb.Silence.
…fixes

Bring in upstream fixes to silences
This commit improves the test coverage for Upsert to cover a number
of edge cases that are possible when creating and updating silences.
It also covers some cases which are specific to upserting.
@stevesg stevesg closed this Sep 24, 2024
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.

6 participants