Fix spelling/typos (#4921)

* Fix spelling/typos

Fix spelling/typos reported by codespell/misspell.
* UK -> US spelling changes.

Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
Ben Kochie 2018-11-27 17:44:29 +01:00 committed by GitHub
parent 0bb810d126
commit c6399296dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 41 additions and 41 deletions

View file

@ -60,7 +60,7 @@ This release includes multiple bugfixes and features. Further, the WAL implement
* [ENHANCEMENT] Send EndsAt along with the alert to Alertmanager #4550
* [ENHANCEMENT] Limit the samples returned by remote read endpoint #4532
* [ENHANCEMENT] Limit the data read in through remote read #4239
* [ENHANCEMENT] Coalesce identical SD configuations #3912
* [ENHANCEMENT] Coalesce identical SD configurations #3912
* [ENHANCEMENT] `promtool`: Add new commands for debugging and querying #4247 #4308 #4346 #4454
* [ENHANCEMENT] Update console examples for node_exporter v0.16.0 #4208
* [ENHANCEMENT] Optimize PromQL aggregations #4248
@ -90,13 +90,13 @@ This release includes multiple bugfixes and features. Further, the WAL implement
* [BUGFIX] discovery/kubernetes/ingress: fix scheme discovery #4329
* [BUGFIX] Fix race in zookeeper sd #4355
* [BUGFIX] Better timeout handling in promql #4291 #4300
* [BUGFIX] Propogate errors when selecting series from the tsdb #4136
* [BUGFIX] Propagate errors when selecting series from the tsdb #4136
## 2.3.1 / 2018-06-19
* [BUGFIX] Avoid infinite loop on duplicate NaN values. #4275
* [BUGFIX] Fix nil pointer deference when using various API endpoints #4282
* [BUGFIX] config: set target group source index during unmarshalling #4245
* [BUGFIX] config: set target group source index during unmarshaling #4245
* [BUGFIX] discovery/file: fix logging #4178
* [BUGFIX] kubernetes_sd: fix namespace filtering #4285
* [BUGFIX] web: restore old path prefix behavior #4273
@ -110,7 +110,7 @@ This release includes multiple bugfixes and features. Further, the WAL implement
* [FEATURE] Add security headers to HTTP server responses
* [FEATURE] Pass query hints via remote read API
* [FEATURE] Basic auth passwords can now be configured via file across all configuration
* [ENHANCEMENT] Optimise PromQL and API serialization for memory usage and allocations
* [ENHANCEMENT] Optimize PromQL and API serialization for memory usage and allocations
* [ENHANCEMENT] Limit number of dropped targets in web UI
* [ENHANCEMENT] Consul and EC2 service discovery allow using server-side filtering for performance improvement
* [ENHANCEMENT] Add advanced filtering configuration to EC2 service discovery
@ -133,7 +133,7 @@ This release includes multiple bugfixes and features. Further, the WAL implement
* [BUGFIX] Fix data loss in TSDB on compaction
* [BUGFIX] Correctly stop timer in remote-write path
* [BUGFIX] Fix deadlock triggerd by loading targets page
* [BUGFIX] Fix deadlock triggered by loading targets page
* [BUGFIX] Fix incorrect buffering of samples on range selection queries
* [BUGFIX] Handle large index files on windows properly
@ -526,7 +526,7 @@ This is a breaking change to the Kubernetes service discovery.
* [ENHANCEMENT] Message on empty Alerts page.
* [ENHANCEMENT] Various internal code refactorings and clean-ups.
* [ENHANCEMENT] Various improvements in the build system.
* [BUGFIX] Catch errors when unmarshalling delta/doubleDelta encoded chunks.
* [BUGFIX] Catch errors when unmarshaling delta/doubleDelta encoded chunks.
* [BUGFIX] Fix data race in lexer and lexer test.
* [BUGFIX] Trim stray whitespace from bearer token file.
* [BUGFIX] Avoid divide-by-zero panic on query_range?step=0.
@ -1211,4 +1211,4 @@ All changes:
* [BUGFIX] Built from Go 1.2.1, which has internal fixes to race conditions in garbage collection handling.
* [ENHANCEMENT] Internal storage interface refactoring that allows building e.g. the `rule_checker` tool without LevelDB dynamic library dependencies.
* [ENHANCEMENT] Cleanups around shutdown handling.
* [PERFORMANCE] Preparations for better memory reuse during marshalling / unmarshalling.
* [PERFORMANCE] Preparations for better memory reuse during marshaling / unmarshaling.

View file

@ -40,7 +40,7 @@ go build ./cmd/prometheus/
make test # Make sure all the tests pass before you commit and push :)
```
All our issues are regularly tagged so that you can also filter down the issues involving the components you want to work on. For our labelling policy refer [the wiki page](https://github.com/prometheus/prometheus/wiki/Label-Names-and-Descriptions).
All our issues are regularly tagged so that you can also filter down the issues involving the components you want to work on. For our labeling policy refer [the wiki page](https://github.com/prometheus/prometheus/wiki/Label-Names-and-Descriptions).
## Pull Request Checklist

View file

@ -563,7 +563,7 @@ func (c *RelabelConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
return nil
}
// Regexp encapsulates a regexp.Regexp and makes it YAML marshallable.
// Regexp encapsulates a regexp.Regexp and makes it YAML marshalable.
type Regexp struct {
*regexp.Regexp
original string

View file

@ -601,7 +601,7 @@ func TestLoadConfig(t *testing.T) {
testutil.Equals(t, expectedConf, c)
}
// YAML marshalling must not reveal authentication credentials.
// YAML marshaling must not reveal authentication credentials.
func TestElideSecrets(t *testing.T) {
c, err := LoadFile("testdata/conf.good.yml")
testutil.Ok(t, err)

View file

@ -15,7 +15,7 @@ what makes a good SD and covers some of the common implementation issues.
The first question to be asked is does it make sense to add this particular
SD? An SD mechanism should be reasonably well established, and at a minimum in
use across multiple organisations. It should allow discovering of machines
use across multiple organizations. It should allow discovering of machines
and/or services running somewhere. When exactly an SD is popular enough to
justify being added to Prometheus natively is an open question.
@ -140,7 +140,7 @@ type Discoverer interface {
}
```
Prometheus will call the `Run()` method on a provider to initialise the discovery mechanism. The mechanism will then send *all* the `TargetGroup`s into the channel.
Prometheus will call the `Run()` method on a provider to initialize the discovery mechanism. The mechanism will then send *all* the `TargetGroup`s into the channel.
Now the mechanism will watch for changes. For each update it can send all `TargetGroup`s, or only changed and new `TargetGroup`s, down the channel. `Manager` will handle
both cases.

View file

@ -218,7 +218,7 @@ type virtualMachine struct {
func newAzureResourceFromID(id string, logger log.Logger) (azureResource, error) {
// Resource IDs have the following format.
// /subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP/providers/PROVIDER/TYPE/NAME
// or if embeded resource then
// or if embedded resource then
// /subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP/providers/PROVIDER/TYPE/NAME/TYPE/NAME
s := strings.Split(id, "/")
if len(s) != 9 && len(s) != 11 {

View file

@ -34,7 +34,7 @@ func TestConfiguredService(t *testing.T) {
consulDiscovery, err := NewDiscovery(conf, nil)
if err != nil {
t.Errorf("Unexpected error when initialising discovery %v", err)
t.Errorf("Unexpected error when initializing discovery %v", err)
}
if !consulDiscovery.shouldWatch("configuredServiceName", []string{""}) {
t.Errorf("Expected service %s to be watched", "configuredServiceName")
@ -52,7 +52,7 @@ func TestConfiguredServiceWithTag(t *testing.T) {
consulDiscovery, err := NewDiscovery(conf, nil)
if err != nil {
t.Errorf("Unexpected error when initialising discovery %v", err)
t.Errorf("Unexpected error when initializing discovery %v", err)
}
if consulDiscovery.shouldWatch("configuredServiceName", []string{""}) {
t.Errorf("Expected service %s to not be watched without tag", "configuredServiceName")
@ -73,7 +73,7 @@ func TestNonConfiguredService(t *testing.T) {
consulDiscovery, err := NewDiscovery(conf, nil)
if err != nil {
t.Errorf("Unexpected error when initialising discovery %v", err)
t.Errorf("Unexpected error when initializing discovery %v", err)
}
if !consulDiscovery.shouldWatch("nonConfiguredServiceName", []string{""}) {
t.Errorf("Expected service %s to be watched", "nonConfiguredServiceName")

View file

@ -214,7 +214,7 @@ func (d *Discovery) refresh(ctx context.Context, name string, ch chan<- []*targe
//
// There are three possible outcomes:
//
// 1. One of the permutations of the given name is recognised as
// 1. One of the permutations of the given name is recognized as
// "valid" by the DNS, in which case we consider ourselves "done"
// and that answer is returned. Note that, due to the way the DNS
// handles "name has resource records, but none of the specified type",

View file

@ -241,6 +241,6 @@ func (f *clientGoWorkqueueMetricsProvider) NewWorkDurationMetric(name string) wo
})
}
func (clientGoWorkqueueMetricsProvider) NewRetriesMetric(name string) workqueue.CounterMetric {
// Retries are not used so the metric is ommited.
// Retries are not used so the metric is omitted.
return noopMetric{}
}

View file

@ -150,7 +150,7 @@ func (e *Endpoints) process(ctx context.Context, ch chan<- []*targetgroup.Group)
namespace, name, err := cache.SplitMetaNamespaceKey(key)
if err != nil {
level.Error(e.logger).Log("msg", "spliting key failed", "key", key)
level.Error(e.logger).Log("msg", "splitting key failed", "key", key)
return true
}

View file

@ -332,7 +332,7 @@ func Test500ErrorHttpResponseWithValidJSONBody(t *testing.T) {
}()
// Setup conf for the test case.
conf = SDConfig{Servers: []string{ts.URL}}
// Execute test case and validate behaviour.
// Execute test case and validate behavior.
if err := testUpdateServices(client, ch); err == nil {
t.Fatalf("Expected error for 5xx HTTP response from marathon server")
}

View file

@ -51,7 +51,7 @@ The following binary comparison operators exist in Prometheus:
* `<=` (less-or-equal)
Comparison operators are defined between scalar/scalar, vector/scalar,
and vector/vector value pairs. By default they filter. Their behaviour can be
and vector/vector value pairs. By default they filter. Their behavior can be
modified by providing `bool` after the operator, which will return `0` or `1`
for the value rather than filtering.

View file

@ -75,7 +75,7 @@ Whenever the scrape manager receives an updated list of targets for a given scra
### Target hashing and scrape timing
To spread out scrapes within a scrape pool and in a consistenly slotted way across the `scrape_config`'s scrape interval, each target is [hashed by its label set and its final scrape URL](https://github.com/prometheus/prometheus/blob/v2.3.1/scrape/target.go#L75-L82). This hash is then used to [choose a deterministic offset](https://github.com/prometheus/prometheus/blob/v2.3.1/scrape/target.go#L84-L98) within that interval.
To spread out scrapes within a scrape pool and in a consistently slotted way across the `scrape_config`'s scrape interval, each target is [hashed by its label set and its final scrape URL](https://github.com/prometheus/prometheus/blob/v2.3.1/scrape/target.go#L75-L82). This hash is then used to [choose a deterministic offset](https://github.com/prometheus/prometheus/blob/v2.3.1/scrape/target.go#L84-L98) within that interval.
### Target scrapes

View file

@ -596,7 +596,7 @@ func (s *alertmanagerSet) sync(tgs []*targetgroup.Group) {
continue
}
// This will initialise the Counters for the AM to 0.
// This will initialize the Counters for the AM to 0.
s.metrics.sent.WithLabelValues(us)
s.metrics.errors.WithLabelValues(us)

View file

@ -21,7 +21,7 @@ const (
// NormalNaN is a quiet NaN. This is also math.NaN().
NormalNaN uint64 = 0x7ff8000000000001
// StaleNaN is a signalling NaN, due to the MSB of the mantissa being 0.
// StaleNaN is a signaling NaN, due to the MSB of the mantissa being 0.
// This value is chosen with many leading 0s, so we have scope to store more
// complicated values in the future. It is 2 rather than 1 to make
// it easier to distinguish from the NormalNaN by a human when debugging.

View file

@ -70,7 +70,7 @@ type (
ErrQueryTimeout string
// ErrQueryCanceled is returned if a query was canceled during processing.
ErrQueryCanceled string
// ErrTooManySamples is returned if a query would woud load more than the maximum allowed samples into memory.
// ErrTooManySamples is returned if a query would load more than the maximum allowed samples into memory.
ErrTooManySamples string
// ErrStorage is returned if an error was encountered in the storage layer
// during query handling.

View file

@ -43,7 +43,7 @@ type Function struct {
// enh.out is a pre-allocated empty vector that you may use to accumulate
// output before returning it. The vectors in vals should not be returned.a
// Range vector functions need only return a vector with the right value,
// the metric and timestamp are not neded.
// the metric and timestamp are not needed.
// Instant vector functions need only return a vector with the right values and
// metrics, the timestamp are not needed.
// Scalar results should be returned as the value of a sample in a Vector.

View file

@ -498,7 +498,7 @@ eval instant at 0m year(vector(1230767999))
eval instant at 0m year(vector(1230768000))
{} 2009
# 2016-02-29 23:59:59 Febuary 29th in leap year.
# 2016-02-29 23:59:59 February 29th in leap year.
eval instant at 0m month(vector(1456790399)) + day_of_month(vector(1456790399)) / 100
{} 2.29
@ -506,11 +506,11 @@ eval instant at 0m month(vector(1456790399)) + day_of_month(vector(1456790399))
eval instant at 0m month(vector(1456790400)) + day_of_month(vector(1456790400)) / 100
{} 3.01
# Febuary 1st 2016 in leap year.
# February 1st 2016 in leap year.
eval instant at 0m days_in_month(vector(1454284800))
{} 29
# Febuary 1st 2017 not in leap year.
# February 1st 2017 not in leap year.
eval instant at 0m days_in_month(vector(1485907200))
{} 28

View file

@ -141,7 +141,7 @@ func (vec Vector) String() string {
}
// ContainsSameLabelset checks if a vector has samples with the same labelset
// Such a behaviour is semantically undefined
// Such a behavior is semantically undefined
// https://github.com/prometheus/prometheus/issues/4562
func (vec Vector) ContainsSameLabelset() bool {
l := make(map[uint64]struct{}, len(vec))
@ -184,7 +184,7 @@ func (m Matrix) Less(i, j int) bool { return labels.Compare(m[i].Metric, m[j].Me
func (m Matrix) Swap(i, j int) { m[i], m[j] = m[j], m[i] }
// ContainsSameLabelset checks if a matrix has samples with the same labelset
// Such a behaviour is semantically undefined
// Such a behavior is semantically undefined
// https://github.com/prometheus/prometheus/issues/4562
func (m Matrix) ContainsSameLabelset() bool {
l := make(map[uint64]struct{}, len(m))

View file

@ -480,7 +480,7 @@ func (r *AlertingRule) String() string {
byt, err := yaml.Marshal(ar)
if err != nil {
return fmt.Sprintf("error marshalling alerting rule: %s", err.Error())
return fmt.Sprintf("error marshaling alerting rule: %s", err.Error())
}
return string(byt)
@ -515,7 +515,7 @@ func (r *AlertingRule) HTMLSnippet(pathPrefix string) html_template.HTML {
byt, err := yaml.Marshal(ar)
if err != nil {
return html_template.HTML(fmt.Sprintf("error marshalling alerting rule: %q", html_template.HTMLEscapeString(err.Error())))
return html_template.HTML(fmt.Sprintf("error marshaling alerting rule: %q", html_template.HTMLEscapeString(err.Error())))
}
return html_template.HTML(byt)
}

View file

@ -558,7 +558,7 @@ func TestStaleness(t *testing.T) {
testutil.Equals(t, want, samples)
}
// Convert a SeriesSet into a form useable with reflect.DeepEqual.
// Convert a SeriesSet into a form usable with reflect.DeepEqual.
func readSeriesSet(ss storage.SeriesSet) (map[string][]promql.Point, error) {
result := map[string][]promql.Point{}

View file

@ -111,7 +111,7 @@ func (rule *RecordingRule) String() string {
byt, err := yaml.Marshal(r)
if err != nil {
return fmt.Sprintf("error marshalling recording rule: %q", err.Error())
return fmt.Sprintf("error marshaling recording rule: %q", err.Error())
}
return string(byt)
@ -189,7 +189,7 @@ func (rule *RecordingRule) HTMLSnippet(pathPrefix string) template.HTML {
byt, err := yaml.Marshal(r)
if err != nil {
return template.HTML(fmt.Sprintf("error marshalling recording rule: %q", template.HTMLEscapeString(err.Error())))
return template.HTML(fmt.Sprintf("error marshaling recording rule: %q", template.HTMLEscapeString(err.Error())))
}
return template.HTML(byt)

View file

@ -870,7 +870,7 @@ func (sl *scrapeLoop) endOfRunStaleness(last time.Time, ticker *time.Ticker, int
// Scraping has stopped. We want to write stale markers but
// the target may be recreated, so we wait just over 2 scrape intervals
// before creating them.
// If the context is cancelled, we presume the server is shutting down
// If the context is canceled, we presume the server is shutting down
// and will restart where is was. We do not attempt to write stale markers
// in this case.

View file

@ -162,7 +162,7 @@ func (r *sampleRing) reset() {
r.f = 0
}
// Returns the current iterator. Invalidates previously retuned iterators.
// Returns the current iterator. Invalidates previously returned iterators.
func (r *sampleRing) iterator() SeriesIterator {
r.it.r = r
r.it.i = -1

View file

@ -189,7 +189,7 @@ func NewQueueManager(logger log.Logger, cfg config.QueueConfig, externalLabels m
numShards.WithLabelValues(t.queueName).Set(float64(t.numShards))
shardCapacity.WithLabelValues(t.queueName).Set(float64(t.cfg.Capacity))
// Initialise counter labels to zero.
// Initialize counter labels to zero.
sentBatchDuration.WithLabelValues(t.queueName)
succeededSamplesTotal.WithLabelValues(t.queueName)
failedSamplesTotal.WithLabelValues(t.queueName)

View file

@ -1082,7 +1082,7 @@ func (api *API) respond(w http.ResponseWriter, data interface{}) {
Data: data,
})
if err != nil {
level.Error(api.logger).Log("msg", "error marshalling json response", "err", err)
level.Error(api.logger).Log("msg", "error marshaling json response", "err", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
@ -1103,7 +1103,7 @@ func (api *API) respondError(w http.ResponseWriter, apiErr *apiError, data inter
Data: data,
})
if err != nil {
level.Error(api.logger).Log("msg", "error marshalling json response", "err", err)
level.Error(api.logger).Log("msg", "error marshaling json response", "err", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}