Skip to content

Commit

Permalink
Spelling (#2014)
Browse files Browse the repository at this point in the history
* spelling: access

* spelling: actual

* spelling: asynchronously

* spelling: circleci

* spelling: circle

* spelling: cognitive

* spelling: comment

* spelling: computation

* spelling: correct

* spelling: daemon

* spelling: elliott

* spelling: enabled

* spelling: encbuf

* spelling: extracted

* spelling: explicitly

* spelling: independent

* spelling: languages

* spelling: loose

* spelling: message

* spelling: metrics

* spelling: mismatch

* spelling: nonexistent

* spelling: output

* spelling: pipeline

* spelling: pipe line

* spelling: position

* spelling: prepend

* spelling: query

* spelling: receive

* spelling: received

* spelling: reducible

* spelling: registry

* spelling: response

* spelling: retryable

* spelling: scanning

* spelling: sourced

* spelling: supported

* spelling: template

* spelling: timeout

* spelling: unsupported

* spelling: adapter

* spelling: deferring

* spelling: expirable
  • Loading branch information
jsoref authored Apr 30, 2020
1 parent 521999c commit 0d9cf49
Show file tree
Hide file tree
Showing 35 changed files with 76 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2

.tags: &tags # tags need to be explicitely defined (whitelist)
.tags: &tags # tags need to be explicitly defined (whitelist)
tags: { only: "/.*/" }

.only-tags: &only-tags
Expand Down
2 changes: 1 addition & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ markComment: >
# Comment to post when closing a stale issue. Leave as
# false to disable.
closeCommnent: false
closeComment: false
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ There are many other important fixes and improvements to Loki, way too many to c
* [1671](https://github.com/grafana/loki/pull/1671) **shokada**: Update tanka.md so that promtail.yml is the correct format
* [1648](https://github.com/grafana/loki/pull/1648) **ShotaKitazawa**: loki-canary: fix indent of DaemonSet manifest written in .md file
* [1642](https://github.com/grafana/loki/pull/1642) **slim-bean**: Improve systemd field docs
* [1641](https://github.com/grafana/loki/pull/1641) **pastatopf**: Correcte syntax of rate example
* [1641](https://github.com/grafana/loki/pull/1641) **pastatopf**: Correct syntax of rate example
* [1634](https://github.com/grafana/loki/pull/1634) **takanabe**: Unite docs for fluentd plugin
* [1619](https://github.com/grafana/loki/pull/1619) **shaikatz**: PeriodConfig documentation fix dynamodb -> aws-dynamo
* [1611](https://github.com/grafana/loki/pull/1611) **owen-d**: loki frontend docs additions
Expand All @@ -223,7 +223,7 @@ There are many other important fixes and improvements to Loki, way too many to c
#### Logcli
* [1808](https://github.com/grafana/loki/pull/1808) **slim-bean**: logcli: log the full stats and send to stderr instead of stdout
* [1682](https://github.com/grafana/loki/pull/1682) **adityacs**: BugFix: Fix logcli --quiet parameter parsing issue
* [1644](https://github.com/grafana/loki/pull/1644) **cyriltovena**: This improves the log ouput for statistics in the logcli.
* [1644](https://github.com/grafana/loki/pull/1644) **cyriltovena**: This improves the log output for statistics in the logcli.
* [1638](https://github.com/grafana/loki/pull/1638) **owen-d**: adds query stats and org id options in logcli
* [1573](https://github.com/grafana/loki/pull/1573) **cyriltovena**: Improve logql query statistics collection.

Expand Down Expand Up @@ -739,7 +739,7 @@ A **huge** thanks to the **36 contributors** who submitted **148 PR's** since 0.
* **Build** [1121](https://github.com/grafana/loki/pull/1121) **pracucci**: Publish loki-canary binaries on release
* **Build** [1054](https://github.com/grafana/loki/pull/1054) **pstibrany**: Fix dep check warnings by running dep ensure
* **Build/release** [1018](https://github.com/grafana/loki/pull/1018) **slim-bean**: updating the image version for loki-canary and adding the version increment to the release_prepare script
* **Build/CI** [997](https://github.com/grafana/loki/pull/997) **slim-bean**: full cirlce
* **Build/CI** [997](https://github.com/grafana/loki/pull/997) **slim-bean**: full circle
* **Build/CI** [996](https://github.com/grafana/loki/pull/996) **rfratto**: ci/drone: fix deploy command by escaping double quotes in JSON body
* **Build/CI** [995](https://github.com/grafana/loki/pull/995) **slim-bean**: use the loki-build-image for calling circle
* **Build/CI** [994](https://github.com/grafana/loki/pull/994) **slim-bean**: Also need bash for the deploy step from drone
Expand Down
4 changes: 2 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ Response (streamed):
## `POST /loki/api/v1/push`

`/loki/api/v1/push` is the endpoint used to send log entries to Loki. The default
behavior is for the POST body to be a snappy-compressed protobuf messsage:
behavior is for the POST body to be a snappy-compressed protobuf message:

- [Protobuf definition](/pkg/logproto/logproto.proto)
- [Go client library](/pkg/promtail/client/client.go)
Expand Down Expand Up @@ -721,7 +721,7 @@ $ curl -G -s "http://localhost:3100/api/prom/label/foo/values" | jq
> instead.
`/api/prom/push` is the endpoint used to send log entries to Loki. The default
behavior is for the POST body to be a snappy-compressed protobuf messsage:
behavior is for the POST body to be a snappy-compressed protobuf message:

- [Protobuf definition](/pkg/logproto/logproto.proto)
- [Go client library](/pkg/promtail/client/client.go)
Expand Down
10 changes: 5 additions & 5 deletions docs/clients/promtail/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Supported contents and default values of `config.yaml`:
# Describes how Promtail connects to multiple instances
# of Loki, sending logs to each.
# WARNING: If one of the remote Loki servers fails to respond or responds
# with any error which is retriable, this will impact sending logs to any
# with any error which is retryable, this will impact sending logs to any
# other configured remote Loki servers. Sending is done on a single thread!
# It is generally recommended to run multiple promtail clients in parallel
# if you want to send to multiple remote Loki instances.
Expand Down Expand Up @@ -258,7 +258,7 @@ of targets using a specified discovery method:
# Name to identify this scrape config in the Promtail UI.
job_name: <string>
# Describes how to parse log lines. Suported values [cri docker raw]
# Describes how to parse log lines. Supported values [cri docker raw]
[entry_parser: <string> | default = "docker"]
# Describes how to transform logs from targets.
Expand Down Expand Up @@ -446,7 +446,7 @@ match:
# Names the pipeline. When defined, creates an additional label in
# the pipeline_duration_seconds histogram, where the value is
# concatenated with job_name using an underscore.
[pipieline_name: <string>]
[pipeline_name: <string>]
# Nested set of pipeline stages only if the selector
# matches the labels of the log entries:
Expand Down Expand Up @@ -551,7 +551,7 @@ config:
# Must be either "inc" or "add" (case insensitive). If
# inc is chosen, the metric value will increase by 1 for each
# log line receieved that passed the filter. If add is chosen,
# log line received that passed the filter. If add is chosen,
# the extracted value most be convertible to a positive float
# and its value will be added to the metric.
action: <string>
Expand Down Expand Up @@ -608,7 +608,7 @@ config:
# Must be either "inc" or "add" (case insensitive). If
# inc is chosen, the metric value will increase by 1 for each
# log line receieved that passed the filter. If add is chosen,
# log line received that passed the filter. If add is chosen,
# the extracted value most be convertible to a positive float
# and its value will be added to the metric.
action: <string>
Expand Down
4 changes: 2 additions & 2 deletions docs/clients/promtail/stages/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ config:

# Must be either "inc" or "add" (case insensitive). If
# inc is chosen, the metric value will increase by 1 for each
# log line receieved that passed the filter. If add is chosen,
# log line received that passed the filter. If add is chosen,
# the extracted value most be convertible to a positive float
# and its value will be added to the metric.
action: <string>
Expand Down Expand Up @@ -116,7 +116,7 @@ config:

# Must be either "inc" or "add" (case insensitive). If
# inc is chosen, the metric value will increase by 1 for each
# log line receieved that passed the filter. If add is chosen,
# log line received that passed the filter. If add is chosen,
# the extracted value most be convertible to a positive float
# and its value will be added to the metric.
action: <string>
Expand Down
2 changes: 1 addition & 1 deletion docs/community/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The current team members are:
- David Kaltschmidt [davkal](https://github.com/davkal)
- Edward Welch [slim-bean](https://github.com/slim-bean)
- Goutham Veeramachaneni [gouthamve](https://github.com/gouthamve)
- Joe Elliott [joe-elliot](https://github.com/joe-elliot)
- Joe Elliott [joe-elliott](https://github.com/joe-elliott)
- Owen Diehl [owen-d](https://github.com/owen-d)
- Robert Fratto [rfratto](https://github.com/rfratto)
- Sandeep Sukhani [sandeepsukhani](https://github.com/sandeepsukhani)
Expand Down
10 changes: 5 additions & 5 deletions docs/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ The `grpc_client_config` block configures a client connection to a gRPC service.
# Enable backoff and retry when a rate limit is hit.
[backoff_on_ratelimits: <bool> | default = false]
# Configures backoff when enbaled.
# Configures backoff when enabled.
backoff_config:
# Minimum delay when backing off.
[min_period: <duration> | default = 100ms]
Expand Down Expand Up @@ -282,7 +282,7 @@ The `ingester_config` block configures Ingesters.
# How long chunks should sit in-memory with no updates before
# being flushed if they don't hit the max block size. This means
# that half-empty chunks will still be flushed after a certain
# period as long as they receieve no further activity.
# period as long as they receive no further activity.
[chunk_idle_period: <duration> | default = 30m]
# The targeted _uncompressed_ size in bytes of a chunk block
Expand Down Expand Up @@ -388,7 +388,7 @@ kvstore:
- <string>
# The Dial timeout for the ETCD connection.
[dial_tmeout: <duration> | default = 10s]
[dial_timeout: <duration> | default = 10s]
# The maximum number of retries to do for failed ops to ETCD.
[max_retries: <int> | default = 10]
Expand Down Expand Up @@ -433,7 +433,7 @@ aws:
# DynamoDB rate cap to back off when throttled.
[throttle_limit: <float> | default = 10.0]
# Metics-based autoscaling configuration.
# Metrics-based autoscaling configuration.
metrics:
# Use metrics-based autoscaling via this Prometheus query URL.
[url: <string>]
Expand All @@ -453,7 +453,7 @@ aws:
# Query to fetch throttle rates per table
[write_throttle_query: <string> | default = "sum(rate(cortex_dynamo_throttled_total{operation="DynamoDB.BatchWriteItem"}[1m])) by (table) > 0"]
# Quer to fetch write capacity usage per table
# Query to fetch write capacity usage per table
[write_usage_query: <string> | default = "sum(rate(cortex_dynamo_consumed_capacity_total{operation="DynamoDB.BatchWriteItem"}[15m])) by (table) > 0"]
# Query to fetch read capacity usage per table
Expand Down
4 changes: 2 additions & 2 deletions docs/design-documents/2020-02-Promtail-Push-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ and is essentially just code duplication.
The
[logproto.Pusher](https://github.com/grafana/loki/blob/f7ee1c753c76ef63338d53cfba782188a165144d/pkg/logproto/logproto.proto#L8-L10)
service could be exposed through Promtail. This would enable clients stubs to be
generated for lanuages that have gRPC support, and, for HTTP1 support, a
generated for languages that have gRPC support, and, for HTTP1 support, a
[gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway) would be embedded
in Promtail itself.

Expand All @@ -101,7 +101,7 @@ Loki uses. There are some concerns with this approach:
3. Log lines will be double-encoded thanks to the reverse proxy.
4. A small overhead of using a reverse proxy in-process will be introduced.
5. This breaks our normal pattern of writing our own shim functions; may add
some cognative overhead of having to deal with the gRPC gateway as an outlier
some cognitive overhead of having to deal with the gRPC gateway as an outlier
in the code.

### Option 3: Plaintext Payload
Expand Down
2 changes: 1 addition & 1 deletion docs/maintaining/release-loki-build-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The [`loki-build-image`](../../loki-build-image/) is the Docker image used to ru
1. Update `BUILD_IMAGE_VERSION` in the `Makefile`
1. Update the image version in all the other places it exists
1. Dockerfiles in `cmd` directory
1. .circlie/config.yml
1. .circleci/config.yml
1. Run `make drone` to rebuild the drone yml file with the new image version (the image version in the Makefile is used)
1. Commit your changes (else you will get a WIP tag)
2. Run `make build-image-push`
2 changes: 1 addition & 1 deletion docs/operations/loki-canary.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ spec:
targetPort: 3500
```

DeamonSet Implementation of loki-canary
DaemonSet Implementation of loki-canary

```
---
Expand Down
2 changes: 1 addition & 1 deletion pkg/chunkenc/encoding_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"hash/crc32"
)

// enbuf is a helper type to populate a byte slice with various types.
// encbuf is a helper type to populate a byte slice with various types.
type encbuf struct {
b []byte
c [binary.MaxVarintLen64]byte
Expand Down
4 changes: 2 additions & 2 deletions pkg/helpers/logerror.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"github.com/go-kit/kit/log/level"
)

// LogError logs any error returned by f; useful when defering Close etc.
// LogError logs any error returned by f; useful when deferring Close etc.
func LogError(message string, f func() error) {
if err := f(); err != nil {
level.Error(util.Logger).Log("message", message, "error", err)
}
}

// LogError logs any error returned by f; useful when defering Close etc.
// LogError logs any error returned by f; useful when deferring Close etc.
func LogErrorWithContext(ctx context.Context, message string, f func() error) {
if err := f(); err != nil {
level.Error(util.WithContext(ctx, util.Logger)).Log("message", message, "error", err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ingester/ingester_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func TestIngester_buildStoreRequest(t *testing.T) {
require.Equal(t, tc.expectedStoreQueryRequest.End, storeRequest.End)

if storeRequest.Start.Sub(tc.expectedStoreQueryRequest.Start) > time.Second {
t.Fatalf("expected upto 1s difference in expected and acutal store request end time but got %d", storeRequest.End.Sub(tc.expectedStoreQueryRequest.End))
t.Fatalf("expected upto 1s difference in expected and actual store request end time but got %d", storeRequest.End.Sub(tc.expectedStoreQueryRequest.End))
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/ingester/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func (i *instance) Series(_ context.Context, req *logproto.SeriesRequest) (*logp
}

// forMatchingStreams will execute a function for each stream that satisfies a set of requirements (time range, matchers, etc).
// It uses a function in order to enable generic stream acces without accidentally leaking streams under the mutex.
// It uses a function in order to enable generic stream access without accidentally leaking streams under the mutex.
func (i *instance) forMatchingStreams(
matchers []*labels.Matcher,
fn func(*stream) error,
Expand Down
10 changes: 5 additions & 5 deletions pkg/logcli/query/tail.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (q *Query) TailQuery(delayFor int, c *client.Client, out output.LogOutput)
os.Exit(0)
}()

tailReponse := new(loghttp.TailResponse)
tailResponse := new(loghttp.TailResponse)

if len(q.IgnoreLabelsKey) > 0 {
log.Println("Ignoring labels key:", color.RedString(strings.Join(q.IgnoreLabelsKey, ",")))
Expand All @@ -44,14 +44,14 @@ func (q *Query) TailQuery(delayFor int, c *client.Client, out output.LogOutput)
}

for {
err := conn.ReadJSON(tailReponse)
err := conn.ReadJSON(tailResponse)
if err != nil {
log.Println("Error reading stream:", err)
return
}

labels := loghttp.LabelSet{}
for _, stream := range tailReponse.Streams {
for _, stream := range tailResponse.Streams {
if !q.NoLabels {

if len(q.IgnoreLabelsKey) > 0 || len(q.ShowLabelsKey) > 0 {
Expand Down Expand Up @@ -79,9 +79,9 @@ func (q *Query) TailQuery(delayFor int, c *client.Client, out output.LogOutput)
}

}
if len(tailReponse.DroppedStreams) != 0 {
if len(tailResponse.DroppedStreams) != 0 {
log.Println("Server dropped following entries due to slow client")
for _, d := range tailReponse.DroppedStreams {
for _, d := range tailResponse.DroppedStreams {
log.Println(d.Timestamp, d.Labels)
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/logentry/metric/counters.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (e *expiringCounter) Add(val float64) {
e.lastModSec = time.Now().Unix()
}

// HasExpired implements Expireable
// HasExpired implements Expirable
func (e *expiringCounter) HasExpired(currentTimeSec int64, maxAgeSec int64) bool {
return currentTimeSec-e.lastModSec >= maxAgeSec
}
2 changes: 1 addition & 1 deletion pkg/logentry/metric/gauges.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (g *expiringGauge) SetToCurrentTime() {
g.lastModSec = time.Now().Unix()
}

// HasExpired implements Expireable
// HasExpired implements Expirable
func (g *expiringGauge) HasExpired(currentTimeSec int64, maxAgeSec int64) bool {
return currentTimeSec-g.lastModSec >= maxAgeSec
}
2 changes: 1 addition & 1 deletion pkg/logentry/metric/histograms.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (h *expiringHistogram) Observe(val float64) {
h.lastModSec = time.Now().Unix()
}

// HasExpired implements Expireable
// HasExpired implements Expirable
func (h *expiringHistogram) HasExpired(currentTimeSec int64, maxAgeSec int64) bool {
return currentTimeSec-h.lastModSec >= maxAgeSec
}
8 changes: 4 additions & 4 deletions pkg/logentry/metric/metricvec.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/prometheus/common/model"
)

// Expireable allows checking if something has exceeded the provided maxAge based on the provided currentTime
type Expireable interface {
// Expirable allows checking if something has exceeded the provided maxAge based on the provided currentTime
type Expirable interface {
HasExpired(currentTimeSec int64, maxAgeSec int64) bool
}

Expand Down Expand Up @@ -58,12 +58,12 @@ func (c *metricVec) With(labels model.LabelSet) prometheus.Metric {
return metric
}

// prune will remove all metrics which implement the Expireable interface and have expired
// prune will remove all metrics which implement the Expirable interface and have expired
// it does not take out a lock on the metrics map so whoever calls this function should do so.
func (c *metricVec) prune() {
currentTimeSec := time.Now().Unix()
for fp, m := range c.metrics {
if em, ok := m.(Expireable); ok {
if em, ok := m.(Expirable); ok {
if em.HasExpired(currentTimeSec, c.maxAgeSec) {
delete(c.metrics, fp)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/logentry/stages/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func parseJSONConfig(config interface{}) (*JSONConfig, error) {
// Process implements Stage
func (j *jsonStage) Process(labels model.LabelSet, extracted map[string]interface{}, t *time.Time, entry *string) {
// If a source key is provided, the json stage should process it
// from the exctracted map, otherwise should fallback to the entry
// from the extracted map, otherwise should fallback to the entry
input := entry

if j.cfg.Source != nil {
Expand Down
10 changes: 5 additions & 5 deletions pkg/logentry/stages/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func TestMetricsPipeline(t *testing.T) {

if err := testutil.GatherAndCompare(registry,
strings.NewReader(expectedMetrics)); err != nil {
t.Fatalf("missmatch metrics: %v", err)
t.Fatalf("mismatch metrics: %v", err)
}
}

Expand Down Expand Up @@ -182,7 +182,7 @@ func TestMetricsWithDropInPipeline(t *testing.T) {

if err := testutil.GatherAndCompare(registry,
strings.NewReader(expectedDropMetrics)); err != nil {
t.Fatalf("missmatch metrics: %v", err)
t.Fatalf("mismatch metrics: %v", err)
}
}

Expand All @@ -200,10 +200,10 @@ func Test(t *testing.T) {
"invalid metric type": {
MetricsConfig{
"metric1": MetricConfig{
MetricType: "Piplne",
MetricType: "Pipe_line",
},
},
errors.Errorf(ErrMetricsStageInvalidType, "piplne"),
errors.Errorf(ErrMetricsStageInvalidType, "pipe_line"),
},
"invalid idle duration": {
MetricsConfig{
Expand Down Expand Up @@ -374,7 +374,7 @@ func TestMetricStage_Process(t *testing.T) {
names := metricNames(metricsConfig)
if err := testutil.GatherAndCompare(registry,
strings.NewReader(goldenMetrics), names...); err != nil {
t.Fatalf("missmatch metrics: %v", err)
t.Fatalf("mismatch metrics: %v", err)
}
}

Expand Down
Loading

0 comments on commit 0d9cf49

Please sign in to comment.