-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'prometheus:main' into add-route-id
- Loading branch information
Showing
55 changed files
with
17,716 additions
and
148 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Releases | ||
This page describes the release process and the currently planned schedule for upcoming releases as well as the respective release shepherd. Release shepherds are chosen on a voluntary basis. | ||
|
||
## Release Schedule | ||
|
||
Release cadence of first pre-releases being cut is 12 weeks. | ||
|
||
| release series | date (year-month-day) | release shepherd | | ||
|----------------|-----------------------|-------------------------------| | ||
| v0.26 | 2023-08-23 | Josh Abreu (Github: @gotjosh) | | ||
| v0.27 | 2023-11-01 | Josh Abreu (Github: @gotjosh) | | ||
|
||
If you are interested in volunteering please create a pull request against the [prometheus/alertmanager](https://github.com/prometheus/alertmanager) repository and propose yourself for the release of your choice. | ||
|
||
If you'd like to know more about the shepherd responsibilities or the release instructions please [refer to the `RELEASE.MD`](https://github.com/prometheus/prometheus/blob/main/RELEASE.md) in [prometheus/prometheus](https://github.com/prometheus/prometheus). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.25.0 | ||
0.26.0 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// Copyright 2023 Prometheus Team | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package featurecontrol | ||
|
||
import ( | ||
"fmt" | ||
"strings" | ||
|
||
"github.com/go-kit/log" | ||
"github.com/go-kit/log/level" | ||
) | ||
|
||
const ( | ||
fcReceiverNameInMetrics = "receiver-name-in-metrics" | ||
) | ||
|
||
var AllowedFlags = []string{fcReceiverNameInMetrics} | ||
|
||
type Flagger interface { | ||
EnableReceiverNamesInMetrics() bool | ||
} | ||
|
||
type Flags struct { | ||
logger log.Logger | ||
enableReceiverNamesInMetrics bool | ||
} | ||
|
||
func (f *Flags) EnableReceiverNamesInMetrics() bool { | ||
return f.enableReceiverNamesInMetrics | ||
} | ||
|
||
type flagOption func(flags *Flags) | ||
|
||
func enableReceiverNameInMetrics() flagOption { | ||
return func(configs *Flags) { | ||
configs.enableReceiverNamesInMetrics = true | ||
} | ||
} | ||
|
||
func NewFlags(logger log.Logger, features string) (Flagger, error) { | ||
fc := &Flags{logger: logger} | ||
opts := []flagOption{} | ||
|
||
if len(features) == 0 { | ||
return NoopFlags{}, nil | ||
} | ||
|
||
for _, feature := range strings.Split(features, ",") { | ||
switch feature { | ||
case fcReceiverNameInMetrics: | ||
opts = append(opts, enableReceiverNameInMetrics()) | ||
level.Warn(logger).Log("msg", "Experimental receiver name in metrics enabled") | ||
default: | ||
return nil, fmt.Errorf("Unknown option '%s' for --enable-feature", feature) | ||
} | ||
} | ||
|
||
for _, opt := range opts { | ||
opt(fc) | ||
} | ||
|
||
return fc, nil | ||
} | ||
|
||
type NoopFlags struct{} | ||
|
||
func (n NoopFlags) EnableReceiverNamesInMetrics() bool { return false } |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Copyright 2023 Prometheus Team | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package featurecontrol | ||
|
||
import ( | ||
"errors" | ||
"strings" | ||
"testing" | ||
|
||
"github.com/go-kit/log" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestFlags(t *testing.T) { | ||
tc := []struct { | ||
name string | ||
featureFlags string | ||
err error | ||
}{ | ||
{ | ||
name: "with only valid feature flags", | ||
featureFlags: fcReceiverNameInMetrics, | ||
}, | ||
{ | ||
name: "with only invalid feature flags", | ||
featureFlags: "somethingsomething", | ||
err: errors.New("Unknown option 'somethingsomething' for --enable-feature"), | ||
}, | ||
{ | ||
name: "with both, valid and invalid feature flags", | ||
featureFlags: strings.Join([]string{fcReceiverNameInMetrics, "somethingbad"}, ","), | ||
err: errors.New("Unknown option 'somethingbad' for --enable-feature"), | ||
}, | ||
} | ||
|
||
for _, tt := range tc { | ||
t.Run(tt.name, func(t *testing.T) { | ||
fc, err := NewFlags(log.NewNopLogger(), tt.featureFlags) | ||
if tt.err != nil { | ||
require.EqualError(t, err, tt.err.Error()) | ||
} else { | ||
require.NoError(t, err) | ||
require.NotNil(t, fc) | ||
} | ||
}) | ||
} | ||
} |
Oops, something went wrong.