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

Issue using label filter prior to unwrapping the same field #6713

Closed
owen-d opened this issue Jul 19, 2022 · 6 comments
Closed

Issue using label filter prior to unwrapping the same field #6713

owen-d opened this issue Jul 19, 2022 · 6 comments
Assignees

Comments

@owen-d
Copy link
Member

owen-d commented Jul 19, 2022

# This works
sum(sum_over_time({job="loki-ops/query-frontend"}
  |= "metrics.go"
  | logfmt
  | subqueries!=0
  | unwrap subqueries
  [5m]
))

# but this does not parse correctly
sum(sum_over_time({job="loki-ops/query-frontend"}
  |= "metrics.go"
  | logfmt
  | subqueries!="0"
  | unwrap subqueries
  [5m]
))

Note the string !="0" does not work, but the numeric version !=0 does. I suspect we're doing some incorrect type conversion/etc somewhere.

@kavirajk
Copy link
Collaborator

quickly checked. Looks like this issue is only when using "!=" operation in label filters. works fine for "=" with both string and numeric values.

And using other binary operations like "<=" or ">=" returns decent error message.

syntax error: unexpected STRING, expecting BYTES or NUMBER or DURATION (<nil>)

Still investigating why is this case for "!=".

kavirajk added a commit that referenced this issue Jul 25, 2022
Consider Log lines

```
msg=hello subqueries=5
msg=hello subqueries=0
msg=hello
```

If you run following logql
```
{foo="bar"}|logfmt|subqueries!=0
```
it returns
```
msg=hello subqueries=5
```

But if you run following logql
```
{foo="bar"}|logfmt|subqueries!="0" # NOTE: "0" as string.
```
it returns
```
msg=hello subqueries=5
msg=hello
```

NOTE: it also returns log lines that doesn't contain `subqueries` label in the first
place.

This cause subtle error if used in metric queries using that `label` in unwrap.

e.g: following logql on above log lines returns
```
sum_over_time({foo="bar"}|logfmt|subqueries!="0"|unwrap subqueries[1m])
```

Returns `pipeline error: 'SampleExtractionErr'`. Because, the lines without `subqueries`
labels are not skipped during `ProcessLine` and during metric extraction, our extractor
sets this `SampleExtractionerror`.

Fixes: #6713
@cyriltovena
Copy link
Contributor

I think the query should be

sum(sum_over_time({job="loki-ops/query-frontend"}
  |= "metrics.go"
  | logfmt
  | subqueries!=""
  | unwrap subqueries
  [5m]
))

but I'm not sure why

sum(sum_over_time({job="loki-ops/query-frontend"}
  |= "metrics.go"
  | logfmt
  | subqueries!=0
  | unwrap subqueries
  [5m]
))

work you might have been lucky ? or we do have an issue because empty label should error when converting to a number.

@owen-d
Copy link
Member Author

owen-d commented Jul 28, 2022

or we do have an issue because empty label should error when converting to a number.

This is what I suspect is the problem too

@kavirajk
Copy link
Collaborator

work you might have been lucky ?

The problem is 100% reproducible btw.

The core of the problem is when trying to extract the metric sample from a logline via unwrap, and if that label doesn't exist on the logline, the this error is set.

it comes from here. https://github.com/grafana/loki/blob/kavirajk%2Flogql-label-check-bug/pkg/logql/log/metrics_extraction.go#L181-L182

Two options here.

  1. We can fix this only on during metrics extraction (if label doesn't exist, assume to have value of 0 as sample value)
  2. Or we ignore log lines that doesn't contain label during != and !~ like in this PR fix(logql): Make LabelSampleExtractor work as expected when label doesn't exist in logline #6766

Before rejecting the option (2). Please have a look at the below screen shots. Is it ok to have two different responses for these queries.

Q1

{job="loki-ops/query-frontend"}
  |= "metrics.go"
  | logfmt
  | query_type="labels"
  | subqueries!=0

Q2

{job="loki-ops/query-frontend"}
  |= "metrics.go"
  | logfmt
  | query_type="labels"
  | subqueries!="0"

Log queries

Screenshot_2022-07-29_09-52-05

With unwrap
Screenshot_2022-07-29_09-54-23

I don't mind going with option (1). But just wanted to make sure the above behavior accepted from user point of view.

@cyriltovena @owen-d

@cyriltovena
Copy link
Contributor

So the problem is difference in behaviour between the filter label and the unwrap operation. Unwrap is stricter.

The problem in using sample value 0 for empty label is that you will be fine for sum_over_time it works, but it might not for quantile or min/max_over_time.

May be we discard empty values ? If that is possible.

Before rejecting the option (2). Please have a look at the below screen shots. Is it ok to have two different responses for these queries.

Then don't return the log result so I think so.

@kavirajk
Copy link
Collaborator

kavirajk commented Aug 1, 2022

May be we discard empty values ? If that is possible.

Yes that's possible. We can skip empty values during metrics extraction when using unwrap without changing any of the existing label filter behavior.

Also the more I think about it, subqueries!="0" and subqueries!=0 are two different label filters and should be treated as such. And former can indeed match log lines that doesn't have subqueries label at all (we are assuming it has default empty string substring=" when doesn't exist).

I have change the PR like it's mentioned here.

lxwzy pushed a commit to lxwzy/loki that referenced this issue Nov 7, 2022
…oesn't exist in logline (grafana#6766)

* fix(logql): Make `StringLabelfilter` work as expected

Consider Log lines

```
msg=hello subqueries=5
msg=hello subqueries=0
msg=hello
```

If you run following logql
```
{foo="bar"}|logfmt|subqueries!=0
```
it returns
```
msg=hello subqueries=5
```

But if you run following logql
```
{foo="bar"}|logfmt|subqueries!="0" # NOTE: "0" as string.
```
it returns
```
msg=hello subqueries=5
msg=hello
```

NOTE: it also returns log lines that doesn't contain `subqueries` label in the first
place.

This cause subtle error if used in metric queries using that `label` in unwrap.

e.g: following logql on above log lines returns
```
sum_over_time({foo="bar"}|logfmt|subqueries!="0"|unwrap subqueries[1m])
```

Returns `pipeline error: 'SampleExtractionErr'`. Because, the lines without `subqueries`
labels are not skipped during `ProcessLine` and during metric extraction, our extractor
sets this `SampleExtractionerror`.

Fixes: grafana#6713

* Add it on changelog

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>

* Fix linter

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>

* Add more tests and fix the edge case with equality to empty strings

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>

* typo on the comment

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>

* handle this edge case during metric extraction. Not in label filter

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>

* Fix linter

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>

* Remove commented code

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>

* Update changelog

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
mastondzn pushed a commit to mastondzn/synopsisbot that referenced this issue Apr 25, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [grafana/loki](https://togithub.com/grafana/loki) | minor | `2.6.1` ->
`2.8.1` |

---

### Release Notes

<details>
<summary>grafana/loki</summary>

###
[`v2.8.1`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;281-2023-04-24)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.8.0...v2.8.1)

##### Loki

##### Fixes

- [9156](https://togithub.com/grafana/loki/pull/9156) **ashwanthgoli**:
Expiration: do not drop index if period is a zero value.
- [8971](https://togithub.com/grafana/loki/pull/8971) **dannykopping**:
Stats: fix `Cache.Chunk.BytesSent` statistic and
loki_chunk_fetcher_fetched_size_bytes metric with correct chunk size.
- [9185](https://togithub.com/grafana/loki/pull/9185) **dannykopping**:
Prevent redis client from incorrectly choosing cluster mode with local
address.

##### Changes

- [9106](https://togithub.com/grafana/loki/pull/9106) **trevorwhitney**:
Update go to 1.20.3.

##### Build

- [9264](https://togithub.com/grafana/loki/pull/9264) **trevorwhitney**:
Update build and other docker image to alpine 3.16.5.

##### Promtail

##### Fixes

- [9095](https://togithub.com/grafana/loki/pull/9095) **JordanRushing**
Fix journald support in amd64 binary build.

###
[`v2.8.0`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;280-2023-04-04)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.7.5...v2.8.0)

##### Loki

##### Enhancements

- [8824](https://togithub.com/grafana/loki/pull/8824) **periklis**:
Expose optional label matcher for label values handler
- [8727](https://togithub.com/grafana/loki/pull/8727) **cstyan**
**jeschkies**: Propagate per-request limit header to querier.
- [8682](https://togithub.com/grafana/loki/pull/8682) **dannykopping**:
Add fetched chunk size distribution metric
`loki_chunk_fetcher_fetched_size_bytes`.
- [8532](https://togithub.com/grafana/loki/pull/8532) **justcompile**:
Adds Storage Class option to S3 objects
- [7951](https://togithub.com/grafana/loki/pull/7951)
**MichelHollands**: Add a count template function to line_format and
label_format.
- [7380](https://togithub.com/grafana/loki/pull/7380) **liguozhong**:
metrics query: range vector support streaming agg when no overlap.
- [7731](https://togithub.com/grafana/loki/pull/7731) **bitkill**: Add
healthchecks to the docker-compose example.
- [7759](https://togithub.com/grafana/loki/pull/7759) **kavirajk**:
Improve error message for loading config with ENV variables.
- [7785](https://togithub.com/grafana/loki/pull/7785) **dannykopping**:
Add query blocker for queries and rules.
- [7817](https://togithub.com/grafana/loki/pull/7817) **kavirajk**:
fix(memcached): panic on send on closed channel.
- [7916](https://togithub.com/grafana/loki/pull/7916) **ssncferreira**:
Add `doc-generator` tool to generate configuration flags documentation.
- [7964](https://togithub.com/grafana/loki/pull/7964) **slim-bean**: Add
a `since` query parameter to allow querying based on relative time.
- [7989](https://togithub.com/grafana/loki/pull/7989) **liguozhong**:
logql support `sort` and `sort_desc`.
- [7997](https://togithub.com/grafana/loki/pull/7997) **kavirajk**:
fix(promtail): Fix cri tags extra new lines when joining partial lines
- [7975](https://togithub.com/grafana/loki/pull/7975) **adityacs**:
Support drop labels in logql
- [7946](https://togithub.com/grafana/loki/pull/7946) **ashwanthgoli**
config: Add support for named stores
- [8027](https://togithub.com/grafana/loki/pull/8027) **kavirajk**:
chore(promtail): Make `batchwait` and `batchsize` config explicit with
yaml tags
- [7978](https://togithub.com/grafana/loki/pull/7978) **chaudum**: Shut
down query frontend gracefully to allow inflight requests to complete.
- [8047](https://togithub.com/grafana/loki/pull/8047) **bboreham**:
Dashboards: add k8s resource requests to CPU and memory panels.
- [8061](https://togithub.com/grafana/loki/pull/8061) **kavirajk**:
Remove circle from Loki OSS
- [8092](https://togithub.com/grafana/loki/pull/8092) **dannykopping**:
add rule-based sharding to ruler.
- [8131](https://togithub.com/grafana/loki/pull/8131) **jeschkies**:
Compile Promtail ARM and ARM64 with journald support.
- [8212](https://togithub.com/grafana/loki/pull/8212) **kavirajk**:
ingester: Add `ingester_memory_streams_labels_bytes metric` for more
visibility of size of metadata of in-memory streams.
- [8271](https://togithub.com/grafana/loki/pull/8271) **kavirajk**:
logql: Support urlencode and urldecode template functions
- [8259](https://togithub.com/grafana/loki/pull/8259) **mar4uk**:
Extract push.proto from the logproto package to the separate module.
- [7906](https://togithub.com/grafana/loki/pull/7906) **kavirajk**: Add
API endpoint that formats LogQL expressions and support new `fmt`
subcommand in `logcli` to format LogQL query.
- [7754](https://togithub.com/grafana/loki/pull/7754) **ashwanthgoli**
index-shipper: add support for multiple stores.
- [6675](https://togithub.com/grafana/loki/pull/6675) **btaani**: Add
logfmt expression parser for selective extraction of labels from logfmt
formatted logs
- [8474](https://togithub.com/grafana/loki/pull/8474) **farodin91**: Add
support for short-lived S3 session tokens
- [8774](https://togithub.com/grafana/loki/pull/8774) **slim-bean**: Add
new logql template functions `bytes`, `duration`, `unixEpochMillis`,
`unixEpochNanos`, `toDateInZone`, `b64Enc`, and `b64Dec`

##### Fixes

- [7784](https://togithub.com/grafana/loki/pull/7784) **isodude**: Fix
default values of connect addresses for compactor and querier workers to
work with IPv6.
- [7880](https://togithub.com/grafana/loki/pull/7880)
**sandeepsukhani**: consider range and offset in queries while looking
for schema config for query sharding.
- [7937](https://togithub.com/grafana/loki/pull/7937) **ssncferreira**:
Deprecate CLI flag `-ruler.wal-cleaer.period` and replace it with
`-ruler.wal-cleaner.period`.
- [7966](https://togithub.com/grafana/loki/pull/7966)
**sandeepsukhani**: Fix query-frontend request load balancing when using
k8s service.
- [8251](https://togithub.com/grafana/loki/pull/8251) **sandeepsukhani**
index-store: fix indexing of chunks overlapping multiple schemas.
- [8151](https://togithub.com/grafana/loki/pull/8151) **sandeepsukhani**
fix log deletion with line filters.
- [8448](https://togithub.com/grafana/loki/pull/8448) **chaudum**: Fix
bug in LogQL parser that caused certain queries that contain a vector
expression to fail.
- [8775](https://togithub.com/grafana/loki/pull/8755)
**sandeepsukhani**: index-gateway: fix failure in initializing index
gateway when boltdb-shipper is not being used.
- [8448](https://togithub.com/grafana/loki/pull/8665)
**sandeepsukhani**: deletion: fix issue in processing delete requests
with tsdb index
- [8753](https://togithub.com/grafana/loki/pull/8753) **slim-bean** A
zero value for retention_period will now disable retention.
- [8959](https://togithub.com/grafana/loki/pull/8959) **periklis**:
Align common instance_addr with memberlist advertise_addr

##### Changes

- [8315](https://togithub.com/grafana/loki/pull/8315) **thepalbi**
Relicense and export `pkg/ingester` WAL code to be used in Promtail's
WAL.
- [8761](https://togithub.com/grafana/loki/pull/8761) **slim-bean**
Remove "subqueries" from the metrics.go log line and instead provide
`splits` and `shards`
- [8887](https://togithub.com/grafana/loki/issues/8887) **3deep5me**
Helm: Removed support for PodDisruptionBudget in policy/v1alpha1 and
upgraded it to policy/v1.

##### Build

##### Promtail

##### Enhancements

- [8231](https://togithub.com/grafana/loki/pull/8231) **CCOLLOT**:
Lambda-promtail: add support for AWS SQS message ingestion.
- [7619](https://togithub.com/grafana/loki/pull/7619) **cadrake**: Add
ability to pass query params to heroku drain targets for relabelling.
- [7973](https://togithub.com/grafana/loki/pull/7973) **chodges15**: Add
configuration to drop rate limited batches in Loki client and new metric
label for drop reason.
- [8153](https://togithub.com/grafana/loki/pull/8153) **kavirajk**:
promtail: Add `max-line-size` limit to drop on client side
- [8096](https://togithub.com/grafana/loki/pull/8096) **kavirajk**:
doc(promtail): Doc about how log rotate works with promtail
- [8233](https://togithub.com/grafana/loki/pull/8233) **nicoche**:
promtail: Add `max-line-size-truncate` limit to truncate too long lines
on client side
- [7462](https://togithub.com/grafana/loki/pull/7462) **MarNicGit**:
Allow excluding event message from Windows Event Log entries.
- [7597](https://togithub.com/grafana/loki/pull/7597) **redbaron**:
allow ratelimiting by label
- [3493](https://togithub.com/grafana/loki/pull/3493) **adityacs**
Support geoip stage.
- [8382](https://togithub.com/grafana/loki/pull/8382) **kelnage**:
Promtail: Add event log message stage

##### Fixes

- [8231](https://togithub.com/grafana/loki/pull/8231) **CCOLLOT**:
Lambda-promtail: fix flushing behavior of batches, leading to a
significant increase in performance.

##### Changes

##### LogCLI

##### Enhancement

- [8413](https://togithub.com/grafana/loki/pull/8413) **chaudum**: Try
to load tenant-specific `schemaconfig-{orgID}.yaml` when using
`--remote-schema` argument and fallback to global `schemaconfig.yaml`.
- [8537](https://togithub.com/grafana/loki/pull/8537) **jeschkies**:
Allow fetching all entries with `--limit=0`.

##### Fluent Bit

##### Loki Canary

##### Enhancements

- [8024](https://togithub.com/grafana/loki/pull/8024) **jijotj**:
Support passing loki address as environment variable

##### Jsonnet

- [7923](https://togithub.com/grafana/loki/pull/7923)
**manohar-koukuntla**: Add zone aware ingesters in jsonnet deployment

##### Fixes

- [8247](https://togithub.com/grafana/loki/pull/8247) **Whyeasy** fix
usage of cluster label within Mixin.

##### Build

- [7938](https://togithub.com/grafana/loki/pull/7938) **ssncferreira**:
Add DroneCI pipeline step to validate configuration flags documentation
generation.

##### Notes

##### Dependencies

###
[`v2.7.5`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;275-2023-03-28)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.7.4...v2.7.5)

##### Loki

##### Fixes

- [7924](https://togithub.com/grafana/loki/pull/7924) **jeschkies**:
Flush buffered logger on exit

###
[`v2.7.4`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;274-2023-02-24)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.7.3...v2.7.4)

##### Loki

##### Fixes

- [8531](https://togithub.com/grafana/loki/pull/8531) **garrettlish**:
logql: fix panics when cloning a special query
- [8120](https://togithub.com/grafana/loki/pull/8120) **ashwanthgoli**:
fix panic on hitting /scheduler/ring when ring is disabled.
- [7988](https://togithub.com/grafana/loki/pull/7988) **ashwanthgoli**:
store: write overlapping chunks to multiple stores.
- [7925](https://togithub.com/grafana/loki/pull/7925)
**sandeepsukhani**: Fix bugs in logs results caching causing
query-frontend to return logs outside of query window.

##### Build

- [8575](https://togithub.com/grafana/loki/pull/8575)
**MichelHollands**: Update build image to go 1.20.1 and alpine 3.16.4.
- [8583](https://togithub.com/grafana/loki/pull/8583)
**MichelHollands**: Use 0.28.1 build image and update go and alpine
versions.

##### Promtail

##### Enhancements

##### Fixes

- [8497](https://togithub.com/grafana/loki/pull/8497) **kavirajk**: Fix
`cri` tags treating different streams as the same
- [7771](https://togithub.com/grafana/loki/pull/7771) **GeorgeTsilias**:
Handle nil error on target Details() call.
- [7461](https://togithub.com/grafana/loki/pull/7461) **MarNicGit**:
Promtail: Fix collecting userdata field from Windows Event Log

###
[`v2.7.3`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;273-2023-02-01)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.7.2...v2.7.3)

##### Loki

##### Fixes

- [8340](https://togithub.com/grafana/loki/pull/8340)
**MasslessParticle** Fix bug in compactor that caused panics when
`startTime` and `endTime` of a delete request are equal.

##### Build

- [8232](https://togithub.com/grafana/loki/pull/8232) **TaehyunHwang**
Fix build issue that caused `--version` to show wrong version for Loki
and Promtail binaries.

###
[`v2.7.2`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;272-2023-01-25)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.7.1...v2.7.2)

##### Loki

##### Fixes

- [7926](https://togithub.com/grafana/loki/pull/7926)
**MichelHollands**: Fix bug in validation of `pattern` and `regexp`
parsers where missing or empty parameters caused panics.
- [7720](https://togithub.com/grafana/loki/pull/7720)
**sandeepsukhani**: Fix bugs in processing delete requests with line
filters.
- [7708](https://togithub.com/grafana/loki/pull/7708) **DylanGuedes**:
Fix bug in multi-tenant querying.

##### Notes

This release was created from a branch starting at commit
`706c22e9e40b0156031f214b63dc6ed4e210abc1` but it may also contain
backported changes from main.

Check the history of the branch `release-2.7.x`.

##### Dependencies

-   Go version: 1.19.5

###
[`v2.7.1`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;271-2022-12-09)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.7.0...v2.7.1)

##### Loki

##### Enhancements

- [6360](https://togithub.com/grafana/loki/pull/6360) **liguozhong**:
Hide error message when context timeout occurs in `s3.getObject`
- [7602](https://togithub.com/grafana/loki/pull/7602) **vmax**: Add
decolorize filter to easily parse colored logs.
- [7804](https://togithub.com/grafana/loki/pull/7804)
**sandeepsukhani**: Use grpc for communicating with compactor for query
time filtering of data requested for deletion.
- [7684](https://togithub.com/grafana/loki/pull/7684) **kavirajk**: Add
missing `embedded-cache` config under `cache_config` reference
documentation.

##### Fixes

- [7453](https://togithub.com/grafana/loki/pull/7453) **periklis**: Add
single compactor http client for delete and gennumber clients

##### Changes

- [7877](https://togithub.com/grafana/loki/pull/7877)A
**trevorwhitney**: Due to a known bug with experimental new delete mode
feature, the default delete mode has been changed to `filter-only`.

##### Promtail

##### Enhancements

- [7602](https://togithub.com/grafana/loki/pull/7602) **vmax**: Add
decolorize stage to Promtail to easily parse colored logs.

##### Fixes

##### Changes

- [7587](https://togithub.com/grafana/loki/pull/7587) **mar4uk**: Add go
build tag `promtail_journal_enabled` to include/exclude Promtail
journald code from binary.

###
[`v2.7.0`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;270)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.6.1...v2.7.0)

##### Loki

##### Enhancements

- [7436](https://togithub.com/grafana/loki/pull/7436) **periklis**:
Expose ring and memberlist handlers through internal server listener
- [7227](https://togithub.com/grafana/loki/pull/7227) **Red-GV**: Add
ability to configure tls minimum version and cipher suites
- [7179](https://togithub.com/grafana/loki/pull/7179)
**vlad-diachenko**: Add ability to use Azure Service Principals
credentials to authenticate to Azure Blob Storage.
- [7063](https://togithub.com/grafana/loki/pull/7063) **kavirajk**: Add
additional `push` mode to Loki canary that can directly push logs to
given Loki URL.
- [7069](https://togithub.com/grafana/loki/pull/7069) **periklis**: Add
support for custom internal server listener for readiness probes.
- [7023](https://togithub.com/grafana/loki/pull/7023) **liguozhong**:
logql engine support exec `vector(0)` grammar.
- [6983](https://togithub.com/grafana/loki/pull/6983) **slim-bean**:
`__timestamp__` and `__line__` are now available in the logql
`label_format` query stage.
- [6821](https://togithub.com/grafana/loki/pull/6821) **kavirajk**:
Introduce new cache type `embedded-cache` which is an in-process cache
system that runs loki without the need for an external cache (like
memcached, redis, etc). It can be run in two modes `distributed: false`
(default, and same as old `fifocache`) and `distributed: true` which
runs cache in distributed fashion sharding keys across peers if Loki is
run in microservices or SSD mode.
- [6691](https://togithub.com/grafana/loki/pull/6691) **dannykopping**:
Update production-ready Loki cluster in docker-compose
- [6317](https://togithub.com/grafana/loki/pull/6317) **dannykoping**:
General: add cache usage statistics
- [6444](https://togithub.com/grafana/loki/pull/6444) **aminesnow** Add
TLS config to query frontend.
- [6179](https://togithub.com/grafana/loki/pull/6179) **chaudum**: Add
new HTTP endpoint to delete ingester ring token file and shutdown
process gracefully
- [5997](https://togithub.com/grafana/loki/pull/5997) **simonswine**:
Querier: parallize label queries to both stores.
- [5406](https://togithub.com/grafana/loki/pull/5406) **ctovena**:
Revise the configuration parameters that configure the usage report to
grafana.com.
- [7264](https://togithub.com/grafana/loki/pull/7264) **bboreham**:
Chunks: decode varints directly from byte buffer, for speed.
- [7263](https://togithub.com/grafana/loki/pull/7263) **bboreham**:
Dependencies: klauspost/compress package to v1.15.11; improves
performance.
- [7270](https://togithub.com/grafana/loki/pull/7270) **wilfriedroset**:
Add support for `username` to redis cache configuration.
- [6952](https://togithub.com/grafana/loki/pull/6952) **DylanGuedes**:
Experimental: Introduce a new feature named stream sharding.

##### Fixes

- [7426](https://togithub.com/grafana/loki/pull/7426) **periklis**: Add
missing compactor delete client tls client config
- [7238](https://togithub.com/grafana/loki/pull/7328) **periklis**: Fix
internal server bootstrap for query frontend
- [7288](https://togithub.com/grafana/loki/pull/7288) **ssncferreira**:
Fix query mapping in AST mapper `rangemapper` to support the new
`VectorExpr` expression.
- [7040](https://togithub.com/grafana/loki/pull/7040) **bakunowski**:
Remove duplicated `loki_boltdb_shipper` prefix from
`tables_upload_operation_total` metric.
- [6937](https://togithub.com/grafana/loki/pull/6937) **ssncferreira**:
Fix topk and bottomk expressions with parameter <= 0.
- [6780](https://togithub.com/grafana/loki/pull/6780) **periklis**:
Attach the panic recovery handler on all HTTP handlers
- [6358](https://togithub.com/grafana/loki/pull/6358) **taharah**: Fixes
sigv4 authentication for the Ruler's remote write configuration by
allowing both a global and per tenant configuration.
- [6375](https://togithub.com/grafana/loki/pull/6375) **dannykopping**:
Fix bug that prevented users from using the `json` parser after a
`line_format` pipeline stage.
- [6505](https://togithub.com/grafana/loki/pull/6375) **dmitri-lerko**
Fixes `failed to receive pubsub messages` error with promtail GCPLog
client.
- [6372](https://togithub.com/grafana/loki/pull/6372) **splitice**: Add
support for numbers in JSON fields.

##### Changes

- [6726](https://togithub.com/grafana/loki/pull/6726) **kavirajk**:
upgrades go from 1.17.9 -> 1.18.4
- [6415](https://togithub.com/grafana/loki/pull/6415) **salvacorts**:
Evenly spread queriers across kubernetes nodes.
- [6349](https://togithub.com/grafana/loki/pull/6349) **simonswine**:
Update the default HTTP listen port from 80 to 3100. Make sure to
configure the port explicitly if you are using port 80.
- [6835](https://togithub.com/grafana/loki/pull/6835) **DylanGuedes**:
Add new per-tenant query timeout configuration and remove engine query
timeout.
- [7212](https://togithub.com/grafana/loki/pull/7212) **Juneezee**:
Replaces deprecated `io/ioutil` with `io` and `os`.
- [7292](https://togithub.com/grafana/loki/pull/7292) **jmherbst**: Add
string conversion to value based drops to more intuitively match numeric
fields. String conversion failure will result in no lines being dropped.
- [7361](https://togithub.com/grafana/loki/pull/7361) **szczepad**:
Renames metric `loki_log_messages_total` to
`loki_internal_log_messages_total`
- [7416](https://togithub.com/grafana/loki/pull/7416) **mstrzele**: Use
the stable `HorizontalPodAutoscaler` v2, if possible, when installing
using Helm
- [7510](https://togithub.com/grafana/loki/pull/7510) **slim-bean**:
Limited queries (queries without filter expressions) will now be split
and sharded.
- [5400](https://togithub.com/grafana/loki/pull/5400) **BenoitKnecht**:
promtail/server: Disable profiling by default

##### Promtail

- [7470](https://togithub.com/grafana/loki/pull/7470) **Jack-King**: Add
configuration for adding custom HTTP headers to push requests

##### Enhancements

- [7593](https://togithub.com/grafana/loki/pull/7593) **chodges15**:
Promtail: Add tenant label to client drop metrics and logs
- [7101](https://togithub.com/grafana/loki/pull/7101) **liguozhong**:
Promtail: Add support for max stream limit.
- [7247](https://togithub.com/grafana/loki/pull/7247) **liguozhong**:
Add config reload endpoint / signal to promtail.
- [6708](https://togithub.com/grafana/loki/pull/6708) **DylanGuedes**:
Add compressed files support to Promtail.
- [5977](https://togithub.com/grafana/loki/pull/5977) **juissi-t**
lambda-promtail: Add support for Kinesis data stream events
- [6828](https://togithub.com/grafana/loki/pull/6828)
**alexandre1984rj** Add the BotScore and BotScoreSrc fields once the
Cloudflare API returns those two fields on the list of all available log
fields.
- [6656](https://togithub.com/grafana/loki/pull/6656) **carlospeon**:
Allow promtail to add matches to the journal reader
- [7401](https://togithub.com/grafana/loki/pull/7401) **thepalbi**: Add
timeout to GCP Logs push target
- [7414](https://togithub.com/grafana/loki/pull/7414) **thepalbi**: Add
basic tracing support

##### Fixes

- [7394](https://togithub.com/grafana/loki/pull/7394) **liguozhong**:
Fix issue with the Cloudflare target that caused it to stop working
after it received an error in the logpull request as explained in issue
[grafana/loki#6150
- [6766](https://togithub.com/grafana/loki/pull/6766) **kavirajk**:
fix(logql): Make `LabelSampleExtractor` ignore processing the line if it
doesn't contain that specific label. Fixes unwrap behavior explained in
the issue
[grafana/loki#6713
- [7016](https://togithub.com/grafana/loki/pull/7016) **chodges15**: Fix
issue with dropping logs when a file based SD target's labels are
updated

##### Changes

- **quodlibetor**: Change Docker target discovery log level from `Error`
to `Info`

##### Logcli

- [7325](https://togithub.com/grafana/loki/pull/7325) **dbirks**:
Document setting up command completion
- [8518](https://togithub.com/grafana/loki/pull/8518) **SN9NV**: Add
parallel flags

##### Fluent Bit

##### Loki Canary

- [7398](https://togithub.com/grafana/loki/pull/7398) **verejoel**:
Allow insecure TLS connections

##### Jsonnet

- [6189](https://togithub.com/grafana/loki/pull/6189) **irizzant**: Add
creation of a `ServiceMonitor` object for Prometheus scraping through
configuration parameter `create_service_monitor`. Simplify mixin usage
by adding (https://github.com/prometheus-operator/kube-prometheus)
library.
- [6662](https://togithub.com/grafana/loki/pull/6662) **Whyeasy**: Fixes
memberlist error when using a stateful ruler.

##### Notes

This release was created from a branch starting at commit
`706c22e9e40b0156031f214b63dc6ed4e210abc1` but it may also contain
backported changes from main.

Check the history of the branch `release-2.7.x`.

##### Dependencies

-   Go Version:     FIXME

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/synopsisgg/bot).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS41OC4wIiwidXBkYXRlZEluVmVyIjoiMzUuNTguMCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
mastondzn pushed a commit to mastondzn/synopsisbot that referenced this issue Apr 25, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [grafana/promtail](https://togithub.com/grafana/loki) | minor |
`2.6.1` -> `2.8.1` |

---

### Release Notes

<details>
<summary>grafana/loki</summary>

###
[`v2.8.1`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;281-2023-04-24)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.8.0...v2.8.1)

##### Loki

##### Fixes

- [9156](https://togithub.com/grafana/loki/pull/9156) **ashwanthgoli**:
Expiration: do not drop index if period is a zero value.
- [8971](https://togithub.com/grafana/loki/pull/8971) **dannykopping**:
Stats: fix `Cache.Chunk.BytesSent` statistic and
loki_chunk_fetcher_fetched_size_bytes metric with correct chunk size.
- [9185](https://togithub.com/grafana/loki/pull/9185) **dannykopping**:
Prevent redis client from incorrectly choosing cluster mode with local
address.

##### Changes

- [9106](https://togithub.com/grafana/loki/pull/9106) **trevorwhitney**:
Update go to 1.20.3.

##### Build

- [9264](https://togithub.com/grafana/loki/pull/9264) **trevorwhitney**:
Update build and other docker image to alpine 3.16.5.

##### Promtail

##### Fixes

- [9095](https://togithub.com/grafana/loki/pull/9095) **JordanRushing**
Fix journald support in amd64 binary build.

###
[`v2.8.0`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;280-2023-04-04)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.7.5...v2.8.0)

##### Loki

##### Enhancements

- [8824](https://togithub.com/grafana/loki/pull/8824) **periklis**:
Expose optional label matcher for label values handler
- [8727](https://togithub.com/grafana/loki/pull/8727) **cstyan**
**jeschkies**: Propagate per-request limit header to querier.
- [8682](https://togithub.com/grafana/loki/pull/8682) **dannykopping**:
Add fetched chunk size distribution metric
`loki_chunk_fetcher_fetched_size_bytes`.
- [8532](https://togithub.com/grafana/loki/pull/8532) **justcompile**:
Adds Storage Class option to S3 objects
- [7951](https://togithub.com/grafana/loki/pull/7951)
**MichelHollands**: Add a count template function to line_format and
label_format.
- [7380](https://togithub.com/grafana/loki/pull/7380) **liguozhong**:
metrics query: range vector support streaming agg when no overlap.
- [7731](https://togithub.com/grafana/loki/pull/7731) **bitkill**: Add
healthchecks to the docker-compose example.
- [7759](https://togithub.com/grafana/loki/pull/7759) **kavirajk**:
Improve error message for loading config with ENV variables.
- [7785](https://togithub.com/grafana/loki/pull/7785) **dannykopping**:
Add query blocker for queries and rules.
- [7817](https://togithub.com/grafana/loki/pull/7817) **kavirajk**:
fix(memcached): panic on send on closed channel.
- [7916](https://togithub.com/grafana/loki/pull/7916) **ssncferreira**:
Add `doc-generator` tool to generate configuration flags documentation.
- [7964](https://togithub.com/grafana/loki/pull/7964) **slim-bean**: Add
a `since` query parameter to allow querying based on relative time.
- [7989](https://togithub.com/grafana/loki/pull/7989) **liguozhong**:
logql support `sort` and `sort_desc`.
- [7997](https://togithub.com/grafana/loki/pull/7997) **kavirajk**:
fix(promtail): Fix cri tags extra new lines when joining partial lines
- [7975](https://togithub.com/grafana/loki/pull/7975) **adityacs**:
Support drop labels in logql
- [7946](https://togithub.com/grafana/loki/pull/7946) **ashwanthgoli**
config: Add support for named stores
- [8027](https://togithub.com/grafana/loki/pull/8027) **kavirajk**:
chore(promtail): Make `batchwait` and `batchsize` config explicit with
yaml tags
- [7978](https://togithub.com/grafana/loki/pull/7978) **chaudum**: Shut
down query frontend gracefully to allow inflight requests to complete.
- [8047](https://togithub.com/grafana/loki/pull/8047) **bboreham**:
Dashboards: add k8s resource requests to CPU and memory panels.
- [8061](https://togithub.com/grafana/loki/pull/8061) **kavirajk**:
Remove circle from Loki OSS
- [8092](https://togithub.com/grafana/loki/pull/8092) **dannykopping**:
add rule-based sharding to ruler.
- [8131](https://togithub.com/grafana/loki/pull/8131) **jeschkies**:
Compile Promtail ARM and ARM64 with journald support.
- [8212](https://togithub.com/grafana/loki/pull/8212) **kavirajk**:
ingester: Add `ingester_memory_streams_labels_bytes metric` for more
visibility of size of metadata of in-memory streams.
- [8271](https://togithub.com/grafana/loki/pull/8271) **kavirajk**:
logql: Support urlencode and urldecode template functions
- [8259](https://togithub.com/grafana/loki/pull/8259) **mar4uk**:
Extract push.proto from the logproto package to the separate module.
- [7906](https://togithub.com/grafana/loki/pull/7906) **kavirajk**: Add
API endpoint that formats LogQL expressions and support new `fmt`
subcommand in `logcli` to format LogQL query.
- [7754](https://togithub.com/grafana/loki/pull/7754) **ashwanthgoli**
index-shipper: add support for multiple stores.
- [6675](https://togithub.com/grafana/loki/pull/6675) **btaani**: Add
logfmt expression parser for selective extraction of labels from logfmt
formatted logs
- [8474](https://togithub.com/grafana/loki/pull/8474) **farodin91**: Add
support for short-lived S3 session tokens
- [8774](https://togithub.com/grafana/loki/pull/8774) **slim-bean**: Add
new logql template functions `bytes`, `duration`, `unixEpochMillis`,
`unixEpochNanos`, `toDateInZone`, `b64Enc`, and `b64Dec`

##### Fixes

- [7784](https://togithub.com/grafana/loki/pull/7784) **isodude**: Fix
default values of connect addresses for compactor and querier workers to
work with IPv6.
- [7880](https://togithub.com/grafana/loki/pull/7880)
**sandeepsukhani**: consider range and offset in queries while looking
for schema config for query sharding.
- [7937](https://togithub.com/grafana/loki/pull/7937) **ssncferreira**:
Deprecate CLI flag `-ruler.wal-cleaer.period` and replace it with
`-ruler.wal-cleaner.period`.
- [7966](https://togithub.com/grafana/loki/pull/7966)
**sandeepsukhani**: Fix query-frontend request load balancing when using
k8s service.
- [8251](https://togithub.com/grafana/loki/pull/8251) **sandeepsukhani**
index-store: fix indexing of chunks overlapping multiple schemas.
- [8151](https://togithub.com/grafana/loki/pull/8151) **sandeepsukhani**
fix log deletion with line filters.
- [8448](https://togithub.com/grafana/loki/pull/8448) **chaudum**: Fix
bug in LogQL parser that caused certain queries that contain a vector
expression to fail.
- [8775](https://togithub.com/grafana/loki/pull/8755)
**sandeepsukhani**: index-gateway: fix failure in initializing index
gateway when boltdb-shipper is not being used.
- [8448](https://togithub.com/grafana/loki/pull/8665)
**sandeepsukhani**: deletion: fix issue in processing delete requests
with tsdb index
- [8753](https://togithub.com/grafana/loki/pull/8753) **slim-bean** A
zero value for retention_period will now disable retention.
- [8959](https://togithub.com/grafana/loki/pull/8959) **periklis**:
Align common instance_addr with memberlist advertise_addr

##### Changes

- [8315](https://togithub.com/grafana/loki/pull/8315) **thepalbi**
Relicense and export `pkg/ingester` WAL code to be used in Promtail's
WAL.
- [8761](https://togithub.com/grafana/loki/pull/8761) **slim-bean**
Remove "subqueries" from the metrics.go log line and instead provide
`splits` and `shards`
- [8887](https://togithub.com/grafana/loki/issues/8887) **3deep5me**
Helm: Removed support for PodDisruptionBudget in policy/v1alpha1 and
upgraded it to policy/v1.

##### Build

##### Promtail

##### Enhancements

- [8231](https://togithub.com/grafana/loki/pull/8231) **CCOLLOT**:
Lambda-promtail: add support for AWS SQS message ingestion.
- [7619](https://togithub.com/grafana/loki/pull/7619) **cadrake**: Add
ability to pass query params to heroku drain targets for relabelling.
- [7973](https://togithub.com/grafana/loki/pull/7973) **chodges15**: Add
configuration to drop rate limited batches in Loki client and new metric
label for drop reason.
- [8153](https://togithub.com/grafana/loki/pull/8153) **kavirajk**:
promtail: Add `max-line-size` limit to drop on client side
- [8096](https://togithub.com/grafana/loki/pull/8096) **kavirajk**:
doc(promtail): Doc about how log rotate works with promtail
- [8233](https://togithub.com/grafana/loki/pull/8233) **nicoche**:
promtail: Add `max-line-size-truncate` limit to truncate too long lines
on client side
- [7462](https://togithub.com/grafana/loki/pull/7462) **MarNicGit**:
Allow excluding event message from Windows Event Log entries.
- [7597](https://togithub.com/grafana/loki/pull/7597) **redbaron**:
allow ratelimiting by label
- [3493](https://togithub.com/grafana/loki/pull/3493) **adityacs**
Support geoip stage.
- [8382](https://togithub.com/grafana/loki/pull/8382) **kelnage**:
Promtail: Add event log message stage

##### Fixes

- [8231](https://togithub.com/grafana/loki/pull/8231) **CCOLLOT**:
Lambda-promtail: fix flushing behavior of batches, leading to a
significant increase in performance.

##### Changes

##### LogCLI

##### Enhancement

- [8413](https://togithub.com/grafana/loki/pull/8413) **chaudum**: Try
to load tenant-specific `schemaconfig-{orgID}.yaml` when using
`--remote-schema` argument and fallback to global `schemaconfig.yaml`.
- [8537](https://togithub.com/grafana/loki/pull/8537) **jeschkies**:
Allow fetching all entries with `--limit=0`.

##### Fluent Bit

##### Loki Canary

##### Enhancements

- [8024](https://togithub.com/grafana/loki/pull/8024) **jijotj**:
Support passing loki address as environment variable

##### Jsonnet

- [7923](https://togithub.com/grafana/loki/pull/7923)
**manohar-koukuntla**: Add zone aware ingesters in jsonnet deployment

##### Fixes

- [8247](https://togithub.com/grafana/loki/pull/8247) **Whyeasy** fix
usage of cluster label within Mixin.

##### Build

- [7938](https://togithub.com/grafana/loki/pull/7938) **ssncferreira**:
Add DroneCI pipeline step to validate configuration flags documentation
generation.

##### Notes

##### Dependencies

###
[`v2.7.5`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;275-2023-03-28)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.7.4...v2.7.5)

##### Loki

##### Fixes

- [7924](https://togithub.com/grafana/loki/pull/7924) **jeschkies**:
Flush buffered logger on exit

###
[`v2.7.4`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;274-2023-02-24)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.7.3...v2.7.4)

##### Loki

##### Fixes

- [8531](https://togithub.com/grafana/loki/pull/8531) **garrettlish**:
logql: fix panics when cloning a special query
- [8120](https://togithub.com/grafana/loki/pull/8120) **ashwanthgoli**:
fix panic on hitting /scheduler/ring when ring is disabled.
- [7988](https://togithub.com/grafana/loki/pull/7988) **ashwanthgoli**:
store: write overlapping chunks to multiple stores.
- [7925](https://togithub.com/grafana/loki/pull/7925)
**sandeepsukhani**: Fix bugs in logs results caching causing
query-frontend to return logs outside of query window.

##### Build

- [8575](https://togithub.com/grafana/loki/pull/8575)
**MichelHollands**: Update build image to go 1.20.1 and alpine 3.16.4.
- [8583](https://togithub.com/grafana/loki/pull/8583)
**MichelHollands**: Use 0.28.1 build image and update go and alpine
versions.

##### Promtail

##### Enhancements

##### Fixes

- [8497](https://togithub.com/grafana/loki/pull/8497) **kavirajk**: Fix
`cri` tags treating different streams as the same
- [7771](https://togithub.com/grafana/loki/pull/7771) **GeorgeTsilias**:
Handle nil error on target Details() call.
- [7461](https://togithub.com/grafana/loki/pull/7461) **MarNicGit**:
Promtail: Fix collecting userdata field from Windows Event Log

###
[`v2.7.3`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;273-2023-02-01)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.7.2...v2.7.3)

##### Loki

##### Fixes

- [8340](https://togithub.com/grafana/loki/pull/8340)
**MasslessParticle** Fix bug in compactor that caused panics when
`startTime` and `endTime` of a delete request are equal.

##### Build

- [8232](https://togithub.com/grafana/loki/pull/8232) **TaehyunHwang**
Fix build issue that caused `--version` to show wrong version for Loki
and Promtail binaries.

###
[`v2.7.2`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;272-2023-01-25)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.7.1...v2.7.2)

##### Loki

##### Fixes

- [7926](https://togithub.com/grafana/loki/pull/7926)
**MichelHollands**: Fix bug in validation of `pattern` and `regexp`
parsers where missing or empty parameters caused panics.
- [7720](https://togithub.com/grafana/loki/pull/7720)
**sandeepsukhani**: Fix bugs in processing delete requests with line
filters.
- [7708](https://togithub.com/grafana/loki/pull/7708) **DylanGuedes**:
Fix bug in multi-tenant querying.

##### Notes

This release was created from a branch starting at commit
`706c22e9e40b0156031f214b63dc6ed4e210abc1` but it may also contain
backported changes from main.

Check the history of the branch `release-2.7.x`.

##### Dependencies

-   Go version: 1.19.5

###
[`v2.7.1`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;271-2022-12-09)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.7.0...v2.7.1)

##### Loki

##### Enhancements

- [6360](https://togithub.com/grafana/loki/pull/6360) **liguozhong**:
Hide error message when context timeout occurs in `s3.getObject`
- [7602](https://togithub.com/grafana/loki/pull/7602) **vmax**: Add
decolorize filter to easily parse colored logs.
- [7804](https://togithub.com/grafana/loki/pull/7804)
**sandeepsukhani**: Use grpc for communicating with compactor for query
time filtering of data requested for deletion.
- [7684](https://togithub.com/grafana/loki/pull/7684) **kavirajk**: Add
missing `embedded-cache` config under `cache_config` reference
documentation.

##### Fixes

- [7453](https://togithub.com/grafana/loki/pull/7453) **periklis**: Add
single compactor http client for delete and gennumber clients

##### Changes

- [7877](https://togithub.com/grafana/loki/pull/7877)A
**trevorwhitney**: Due to a known bug with experimental new delete mode
feature, the default delete mode has been changed to `filter-only`.

##### Promtail

##### Enhancements

- [7602](https://togithub.com/grafana/loki/pull/7602) **vmax**: Add
decolorize stage to Promtail to easily parse colored logs.

##### Fixes

##### Changes

- [7587](https://togithub.com/grafana/loki/pull/7587) **mar4uk**: Add go
build tag `promtail_journal_enabled` to include/exclude Promtail
journald code from binary.

###
[`v2.7.0`](https://togithub.com/grafana/loki/blob/HEAD/CHANGELOG.md#&#8203;270)

[Compare
Source](https://togithub.com/grafana/loki/compare/v2.6.1...v2.7.0)

##### Loki

##### Enhancements

- [7436](https://togithub.com/grafana/loki/pull/7436) **periklis**:
Expose ring and memberlist handlers through internal server listener
- [7227](https://togithub.com/grafana/loki/pull/7227) **Red-GV**: Add
ability to configure tls minimum version and cipher suites
- [7179](https://togithub.com/grafana/loki/pull/7179)
**vlad-diachenko**: Add ability to use Azure Service Principals
credentials to authenticate to Azure Blob Storage.
- [7063](https://togithub.com/grafana/loki/pull/7063) **kavirajk**: Add
additional `push` mode to Loki canary that can directly push logs to
given Loki URL.
- [7069](https://togithub.com/grafana/loki/pull/7069) **periklis**: Add
support for custom internal server listener for readiness probes.
- [7023](https://togithub.com/grafana/loki/pull/7023) **liguozhong**:
logql engine support exec `vector(0)` grammar.
- [6983](https://togithub.com/grafana/loki/pull/6983) **slim-bean**:
`__timestamp__` and `__line__` are now available in the logql
`label_format` query stage.
- [6821](https://togithub.com/grafana/loki/pull/6821) **kavirajk**:
Introduce new cache type `embedded-cache` which is an in-process cache
system that runs loki without the need for an external cache (like
memcached, redis, etc). It can be run in two modes `distributed: false`
(default, and same as old `fifocache`) and `distributed: true` which
runs cache in distributed fashion sharding keys across peers if Loki is
run in microservices or SSD mode.
- [6691](https://togithub.com/grafana/loki/pull/6691) **dannykopping**:
Update production-ready Loki cluster in docker-compose
- [6317](https://togithub.com/grafana/loki/pull/6317) **dannykoping**:
General: add cache usage statistics
- [6444](https://togithub.com/grafana/loki/pull/6444) **aminesnow** Add
TLS config to query frontend.
- [6179](https://togithub.com/grafana/loki/pull/6179) **chaudum**: Add
new HTTP endpoint to delete ingester ring token file and shutdown
process gracefully
- [5997](https://togithub.com/grafana/loki/pull/5997) **simonswine**:
Querier: parallize label queries to both stores.
- [5406](https://togithub.com/grafana/loki/pull/5406) **ctovena**:
Revise the configuration parameters that configure the usage report to
grafana.com.
- [7264](https://togithub.com/grafana/loki/pull/7264) **bboreham**:
Chunks: decode varints directly from byte buffer, for speed.
- [7263](https://togithub.com/grafana/loki/pull/7263) **bboreham**:
Dependencies: klauspost/compress package to v1.15.11; improves
performance.
- [7270](https://togithub.com/grafana/loki/pull/7270) **wilfriedroset**:
Add support for `username` to redis cache configuration.
- [6952](https://togithub.com/grafana/loki/pull/6952) **DylanGuedes**:
Experimental: Introduce a new feature named stream sharding.

##### Fixes

- [7426](https://togithub.com/grafana/loki/pull/7426) **periklis**: Add
missing compactor delete client tls client config
- [7238](https://togithub.com/grafana/loki/pull/7328) **periklis**: Fix
internal server bootstrap for query frontend
- [7288](https://togithub.com/grafana/loki/pull/7288) **ssncferreira**:
Fix query mapping in AST mapper `rangemapper` to support the new
`VectorExpr` expression.
- [7040](https://togithub.com/grafana/loki/pull/7040) **bakunowski**:
Remove duplicated `loki_boltdb_shipper` prefix from
`tables_upload_operation_total` metric.
- [6937](https://togithub.com/grafana/loki/pull/6937) **ssncferreira**:
Fix topk and bottomk expressions with parameter <= 0.
- [6780](https://togithub.com/grafana/loki/pull/6780) **periklis**:
Attach the panic recovery handler on all HTTP handlers
- [6358](https://togithub.com/grafana/loki/pull/6358) **taharah**: Fixes
sigv4 authentication for the Ruler's remote write configuration by
allowing both a global and per tenant configuration.
- [6375](https://togithub.com/grafana/loki/pull/6375) **dannykopping**:
Fix bug that prevented users from using the `json` parser after a
`line_format` pipeline stage.
- [6505](https://togithub.com/grafana/loki/pull/6375) **dmitri-lerko**
Fixes `failed to receive pubsub messages` error with promtail GCPLog
client.
- [6372](https://togithub.com/grafana/loki/pull/6372) **splitice**: Add
support for numbers in JSON fields.

##### Changes

- [6726](https://togithub.com/grafana/loki/pull/6726) **kavirajk**:
upgrades go from 1.17.9 -> 1.18.4
- [6415](https://togithub.com/grafana/loki/pull/6415) **salvacorts**:
Evenly spread queriers across kubernetes nodes.
- [6349](https://togithub.com/grafana/loki/pull/6349) **simonswine**:
Update the default HTTP listen port from 80 to 3100. Make sure to
configure the port explicitly if you are using port 80.
- [6835](https://togithub.com/grafana/loki/pull/6835) **DylanGuedes**:
Add new per-tenant query timeout configuration and remove engine query
timeout.
- [7212](https://togithub.com/grafana/loki/pull/7212) **Juneezee**:
Replaces deprecated `io/ioutil` with `io` and `os`.
- [7292](https://togithub.com/grafana/loki/pull/7292) **jmherbst**: Add
string conversion to value based drops to more intuitively match numeric
fields. String conversion failure will result in no lines being dropped.
- [7361](https://togithub.com/grafana/loki/pull/7361) **szczepad**:
Renames metric `loki_log_messages_total` to
`loki_internal_log_messages_total`
- [7416](https://togithub.com/grafana/loki/pull/7416) **mstrzele**: Use
the stable `HorizontalPodAutoscaler` v2, if possible, when installing
using Helm
- [7510](https://togithub.com/grafana/loki/pull/7510) **slim-bean**:
Limited queries (queries without filter expressions) will now be split
and sharded.
- [5400](https://togithub.com/grafana/loki/pull/5400) **BenoitKnecht**:
promtail/server: Disable profiling by default

##### Promtail

- [7470](https://togithub.com/grafana/loki/pull/7470) **Jack-King**: Add
configuration for adding custom HTTP headers to push requests

##### Enhancements

- [7593](https://togithub.com/grafana/loki/pull/7593) **chodges15**:
Promtail: Add tenant label to client drop metrics and logs
- [7101](https://togithub.com/grafana/loki/pull/7101) **liguozhong**:
Promtail: Add support for max stream limit.
- [7247](https://togithub.com/grafana/loki/pull/7247) **liguozhong**:
Add config reload endpoint / signal to promtail.
- [6708](https://togithub.com/grafana/loki/pull/6708) **DylanGuedes**:
Add compressed files support to Promtail.
- [5977](https://togithub.com/grafana/loki/pull/5977) **juissi-t**
lambda-promtail: Add support for Kinesis data stream events
- [6828](https://togithub.com/grafana/loki/pull/6828)
**alexandre1984rj** Add the BotScore and BotScoreSrc fields once the
Cloudflare API returns those two fields on the list of all available log
fields.
- [6656](https://togithub.com/grafana/loki/pull/6656) **carlospeon**:
Allow promtail to add matches to the journal reader
- [7401](https://togithub.com/grafana/loki/pull/7401) **thepalbi**: Add
timeout to GCP Logs push target
- [7414](https://togithub.com/grafana/loki/pull/7414) **thepalbi**: Add
basic tracing support

##### Fixes

- [7394](https://togithub.com/grafana/loki/pull/7394) **liguozhong**:
Fix issue with the Cloudflare target that caused it to stop working
after it received an error in the logpull request as explained in issue
[grafana/loki#6150
- [6766](https://togithub.com/grafana/loki/pull/6766) **kavirajk**:
fix(logql): Make `LabelSampleExtractor` ignore processing the line if it
doesn't contain that specific label. Fixes unwrap behavior explained in
the issue
[grafana/loki#6713
- [7016](https://togithub.com/grafana/loki/pull/7016) **chodges15**: Fix
issue with dropping logs when a file based SD target's labels are
updated

##### Changes

- **quodlibetor**: Change Docker target discovery log level from `Error`
to `Info`

##### Logcli

- [7325](https://togithub.com/grafana/loki/pull/7325) **dbirks**:
Document setting up command completion
- [8518](https://togithub.com/grafana/loki/pull/8518) **SN9NV**: Add
parallel flags

##### Fluent Bit

##### Loki Canary

- [7398](https://togithub.com/grafana/loki/pull/7398) **verejoel**:
Allow insecure TLS connections

##### Jsonnet

- [6189](https://togithub.com/grafana/loki/pull/6189) **irizzant**: Add
creation of a `ServiceMonitor` object for Prometheus scraping through
configuration parameter `create_service_monitor`. Simplify mixin usage
by adding (https://github.com/prometheus-operator/kube-prometheus)
library.
- [6662](https://togithub.com/grafana/loki/pull/6662) **Whyeasy**: Fixes
memberlist error when using a stateful ruler.

##### Notes

This release was created from a branch starting at commit
`706c22e9e40b0156031f214b63dc6ed4e210abc1` but it may also contain
backported changes from main.

Check the history of the branch `release-2.7.x`.

##### Dependencies

-   Go Version:     FIXME

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/synopsisgg/bot).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS41OC4wIiwidXBkYXRlZEluVmVyIjoiMzUuNTguMCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants