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

Spelling #2014

Merged
merged 43 commits into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
84f15ec
spelling: access
jsoref Apr 30, 2020
214c3b3
spelling: actual
jsoref Apr 30, 2020
f099107
spelling: asynchronously
jsoref Apr 30, 2020
ccc8876
spelling: circleci
jsoref Apr 30, 2020
d15ebdb
spelling: circle
jsoref Apr 30, 2020
8005d54
spelling: cognitive
jsoref Apr 30, 2020
6df63d1
spelling: comment
jsoref Apr 30, 2020
a0a1f15
spelling: computation
jsoref Apr 30, 2020
a673b9e
spelling: correct
jsoref Apr 30, 2020
5b148f1
spelling: daemon
jsoref Apr 30, 2020
3f67e6a
spelling: elliott
jsoref Apr 30, 2020
d4f8a7e
spelling: enabled
jsoref Apr 30, 2020
8b368bf
spelling: encbuf
jsoref Apr 30, 2020
cc7002a
spelling: extracted
jsoref Apr 30, 2020
d84a3b9
spelling: explicitly
jsoref Apr 30, 2020
73cd4c5
spelling: independent
jsoref Apr 30, 2020
300e6df
spelling: languages
jsoref Apr 30, 2020
9bf6ecc
spelling: loose
jsoref Apr 30, 2020
5b56233
spelling: message
jsoref Apr 30, 2020
ca61112
spelling: metrics
jsoref Apr 30, 2020
5068378
spelling: mismatch
jsoref Apr 30, 2020
3110635
spelling: nonexistent
jsoref Apr 30, 2020
a549eaa
spelling: output
jsoref Apr 30, 2020
61e9d61
spelling: pipeline
jsoref Apr 30, 2020
3fe5243
spelling: pipe line
jsoref Apr 30, 2020
580a030
spelling: position
jsoref Apr 30, 2020
7d7af0c
spelling: prepend
jsoref Apr 30, 2020
00e357a
spelling: query
jsoref Apr 30, 2020
7613e7a
spelling: receive
jsoref Apr 30, 2020
06f77d9
spelling: received
jsoref Apr 30, 2020
6fb843d
spelling: reducible
jsoref Apr 30, 2020
804fe51
spelling: registry
jsoref Apr 30, 2020
57cdb10
spelling: response
jsoref Apr 30, 2020
9b54cb1
spelling: retryable
jsoref Apr 30, 2020
c22612b
spelling: scanning
jsoref Apr 30, 2020
d1fc7dd
spelling: sourced
jsoref Apr 30, 2020
96840cf
spelling: supported
jsoref Apr 30, 2020
37181f9
spelling: template
jsoref Apr 30, 2020
e592f4e
spelling: timeout
jsoref Apr 30, 2020
873f1fd
spelling: unsupported
jsoref Apr 30, 2020
9bae037
spelling: adapter
jsoref Apr 30, 2020
598cd81
spelling: deferring
jsoref Apr 30, 2020
ebbafe5
spelling: expirable
jsoref Apr 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Collaborator

Choose a reason for hiding this comment

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

lol this misspelling was intentional FWIW 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm pretty sure I looked at the PR and decided it didn't need to be misspelled.

If something is very clearly intentionally misspelled and doesn't make sense otherwise, I do leave it alone, e.g. a changelog entry of spelling: cirlce -> circle.

My personal preference is to not include misspellings in changelogs, unless it's announcing an API change.

* **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)
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry @joe-elliott I did this.

Copy link
Member

Choose a reason for hiding this comment

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

thanks for the fix :)

- 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]
Copy link
Collaborator

Choose a reason for hiding this comment

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

are we 100% sure this is a typo in the docs and not a config actually spelled wrong?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Afaict, the only instances of that are the document itself:
https://www.google.com/search?q=%22dial_tmeout%22


# 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