Skip to content

Commit c184e12

Browse files
authored
Merge branch 'main' into correct-health-state-for-loki_source_kubernetes_events
2 parents e5b57fd + b691a44 commit c184e12

File tree

556 files changed

+13148
-1562
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

556 files changed

+13148
-1562
lines changed

.drone/drone.yml

Lines changed: 75 additions & 58 deletions
Large diffs are not rendered by default.

.drone/pipelines/crosscompile.jsonnet

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ local os_arch_tuples = [
2222
// Windows
2323
{ name: 'Windows amd64', os: 'windows', arch: 'amd64' },
2424

25+
2526
// FreeBSD
2627
{ name: 'FreeBSD amd64', os: 'freebsd', arch: 'amd64' },
2728
];
@@ -37,15 +38,22 @@ local targets = [
3738
local targets_boringcrypto = [
3839
'agent-boringcrypto',
3940
];
41+
local targets_boringcrypto_windows = [
42+
'agent-flow-windows-boringcrypto',
43+
];
44+
4045

4146
local os_arch_types_boringcrypto = [
4247
// Linux boringcrypto
4348
{ name: 'Linux amd64 boringcrypto', os: 'linux', arch: 'amd64', experiment: 'boringcrypto' },
4449
{ name: 'Linux arm64 boringcrypto', os: 'linux', arch: 'arm64', experiment: 'boringcrypto' },
4550
];
51+
local windows_os_arch_types_boringcrypto = [
52+
// Windows boringcrypto
53+
{ name: 'Windows amd64', os: 'windows', arch: 'amd64', experiment: 'cngcrypto' },
54+
];
4655

47-
48-
std.flatMap(function(target) (
56+
local build_environments(targets, tuples, image) = std.flatMap(function(target) (
4957
std.map(function(platform) (
5058
pipelines.linux('Build %s (%s)' % [target, platform.name]) {
5159
local env = {
@@ -56,47 +64,26 @@ std.flatMap(function(target) (
5664
target: target,
5765

5866
tags: go_tags[platform.os],
59-
},
67+
} + (if 'experiment' in platform then { GOEXPERIMENT: platform.experiment } else { }),
6068

6169
trigger: {
6270
event: ['pull_request'],
6371
},
64-
steps: [{
65-
name: 'Build',
66-
image: build_image.linux,
67-
commands: [
68-
'make generate-ui',
69-
'GO_TAGS="%(tags)s" GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s make %(target)s' % env,
70-
],
71-
}],
72-
}
73-
), os_arch_tuples)
74-
), targets) +
75-
std.flatMap(function(target) (
76-
std.map(function(platform) (
77-
pipelines.linux('Build %s (%s)' % [target, platform.name]) {
78-
local env = {
79-
GOOS: platform.os,
80-
GOARCH: platform.arch,
81-
GOARM: if 'arm' in platform then platform.arm else '',
82-
GOEXPERIMENT: platform.experiment,
83-
84-
target: target,
85-
86-
tags: go_tags[platform.os],
87-
},
8872

89-
trigger: {
90-
event: ['pull_request'],
91-
},
9273
steps: [{
9374
name: 'Build',
94-
image: build_image.linux,
75+
image: image,
9576
commands: [
9677
'make generate-ui',
97-
'GO_TAGS="%(tags)s" GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s GOEXPERIMENT=%(GOEXPERIMENT)s make %(target)s' % env,
78+
(if 'GOEXPERIMENT' in env
79+
then 'GO_TAGS="%(tags)s" GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s GOEXPERIMENT=%(GOEXPERIMENT)s make %(target)s' % env
80+
else 'GO_TAGS="%(tags)s" GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s make %(target)s') % env,
9881
],
9982
}],
10083
}
101-
), os_arch_types_boringcrypto)
102-
), targets_boringcrypto)
84+
), tuples)
85+
), targets);
86+
87+
build_environments(targets, os_arch_tuples, build_image.linux) +
88+
build_environments(targets_boringcrypto, os_arch_types_boringcrypto, build_image.linux) +
89+
build_environments(targets_boringcrypto_windows, windows_os_arch_types_boringcrypto, build_image.boringcrypto)

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
pkg/operator/crds/*.yaml linguist-generated=true
2+
3+
*.txtar text eol=lf

.github/workflows/autolock.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lock closed issues and PRs
2+
on:
3+
workflow_dispatch: {}
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
permissions:
8+
issues: write
9+
pull-requests: write
10+
discussions: write
11+
12+
concurrency:
13+
group: lock-threads
14+
15+
jobs:
16+
action:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: dessant/lock-threads@v5
20+
with:
21+
pr-inactive-days: 30
22+
issue-inactive-days: 30
23+
add-issue-labels: 'frozen-due-to-age'
24+
add-pr-labels: 'frozen-due-to-age'
25+
process-only: 'issues, prs'

.github/workflows/trivy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Checkout code
2727
uses: actions/checkout@v4
2828
- name: Run Trivy vulnerability scanner
29-
uses: aquasecurity/trivy-action@d43c1f16c00cfd3978dde6c07f4bbcf9eb6993ca
29+
uses: aquasecurity/trivy-action@84384bd6e777ef152729993b8145ea352e9dd3ef
3030
with:
3131
image-ref: 'grafana/agent:main'
3232
format: 'template'

CHANGELOG.md

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,37 @@ internal API changes are not present.
1010
Main (unreleased)
1111
-----------------
1212

13+
### Features
14+
15+
- Added a new CLI flag `--stability.level` which defines the minimum stability
16+
level required for the features that the agent is allowed to use. Default is `experimental`. (@thampiotr)
17+
18+
- A new `loki.rules.kubernetes` component that discovers `PrometheusRule` Kubernetes resources and loads them into a Loki Ruler instance. (@EStork09)
19+
20+
### Bugfixes
21+
22+
- Fix an issues where the logging config block would trigger an error when trying to send logs to components that were not running. (@wildum)
23+
24+
v0.40.0 (2024-02-27)
25+
--------------------
26+
1327
### Breaking changes
1428

1529
- Prohibit the configuration of services within modules. (@wildum)
1630

1731
- For `otelcol.exporter` components, change the default value of `disable_high_cardinality_metrics` to `true`. (@ptodev)
1832

33+
- Rename component `prometheus.exporter.agent` to `prometheus.exporter.self` to clear up ambiguity. (@hainenber)
34+
35+
### Deprecations
36+
37+
- Module components have been deprecated in favor of import and declare configuration blocks. These deprecated components will be removed in the next release. (@wildum)
38+
1939
### Features
2040

41+
- Modules have been redesigned to split the import logic from the instantiation.
42+
You can now define custom components via the `declare` config block and import modules via `import.git`, `import.http`, `import.string`, `import.file`. (@wildum)
43+
2144
- A new `discovery.process` component for discovering Linux OS processes on the current host. (@korniltsev)
2245

2346
- A new `pyroscope.java` component for profiling Java processes using async-profiler. (@korniltsev)
@@ -28,8 +51,12 @@ Main (unreleased)
2851
- Expose track_timestamps_staleness on Prometheus scraping, to fix the issue where container metrics live for 5 minutes after the container disappears. (@ptodev)
2952

3053
- Introduce the `remotecfg` service that enables loading configuration from a
31-
remote endpoint. (@tpaschalis)
32-
54+
remote endpoint. (@tpaschalis)
55+
56+
- Add `otelcol.connector.host_info` component to gather usage metrics for cloud users. (@rlankfo, @jcreixell)
57+
58+
- Add Windows boringcrypto build and executable. (@mattdurham)
59+
3360
### Enhancements
3461

3562
- Include line numbers in profiles produced by `pyrsocope.java` component. (@korniltsev)
@@ -58,11 +85,15 @@ Main (unreleased)
5885

5986
- Mutex and block pprofs are now available via the pprof endpoint. (@mattdurham)
6087

88+
- Added an error log when the config fails to reload. (@kurczynski)
89+
6190
- Added additional http client proxy configurations to components for
6291
`no_proxy`, `proxy_from_environment`, and `proxy_connect_header`. (@erikbaranowski)
6392

6493
- Batch staleness tracking to reduce mutex contention and increase performance. (@mattdurham)
6594

95+
- Python profiling using eBPF is now aggregated now by kernel space. [PR](https://github.com/grafana/pyroscope/pull/2996) (@korniltsev)
96+
6697
### Bugfixes
6798

6899
- Fix an issue in `remote.s3` where the exported content of an object would be an empty string if `remote.s3` failed to fully retrieve
@@ -81,10 +112,29 @@ Main (unreleased)
81112
- Fix an issue with static integrations-next marshaling where non singletons
82113
would cause `/-/config` to fail to marshal. (@erikbaranowski)
83114

84-
- Fix divide-by-zero issue when sharding targets. (@hainenber)
115+
- Fix an issue where agent logs are emitted before the logging format
116+
is correctly determined. (@hainenber)
117+
118+
- Fix divide-by-zero issue when sharding targets. (@hainenber)
85119

86120
- Fix bug where custom headers were not actually being set in loki client. (@captncraig)
87121

122+
- Fix missing measurement type field in the KeyVal() conversion function for measurments. @vanugrah)
123+
124+
- Fix `ResolveEndpointV2 not found` for AWS-related components. (@hainenber)
125+
126+
- Fix OTEL metrics not getting collected after reload. (@hainenber)
127+
128+
- Fix bug in `pyroscope.ebpf` component when elf's PT_LOAD section is not page aligned. [PR](https://github.com/grafana/pyroscope/pull/2983) (@korniltsev)
129+
130+
- Pyroscope eBPF profiling now respects the PID namespace Grafana Agent is running in. [PR](https://github.com/grafana/pyroscope/pull/3008) (@simonswine)
131+
132+
- Fix an issue where the configuration of the `http` and `remotecfg` blocks get ignored after loading a module. (@erikbaranowski)
133+
134+
- Fix an issue where changing the configuration of `loki.write` would cause a panic. (@rfratto)
135+
136+
- Fix issue where registry was not being properly deleted. (@mattdurham)
137+
88138
- Fix bug where `loki.source.kubernetes_events` unable to register as unhealthy
89139
when there are failures for underlying informers. (@hainenber)
90140

Makefile

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@
2121
##
2222
## Targets for building binaries:
2323
##
24-
## binaries Compiles all binaries.
25-
## agent Compiles cmd/grafana-agent to $(AGENT_BINARY)
26-
## agent-boringcrypto Compiles cmd/grafana-agent with GOEXPERIMENT=boringcrypto to $(AGENT_BORINGCRYPTO_BINARY)
27-
## agent-flow Compiles cmd/grafana-agent-flow to $(FLOW_BINARY)
28-
## agent-service Compiles cmd/grafana-agent-service to $(SERVICE_BINARY)
29-
## agentctl Compiles cmd/grafana-agentctl to $(AGENTCTL_BINARY)
30-
## operator Compiles cmd/grafana-agent-operator to $(OPERATOR_BINARY)
24+
## binaries Compiles all binaries.
25+
## agent Compiles cmd/grafana-agent to $(AGENT_BINARY)
26+
## agent-boringcrypto Compiles cmd/grafana-agent with GOEXPERIMENT=boringcrypto to $(AGENT_BORINGCRYPTO_BINARY)
27+
## agent-flow Compiles cmd/grafana-agent-flow to $(FLOW_BINARY)
28+
## agent-flow-windows-boringcrypto Compiles cmd/grafana-agent-flow to $(FLOW_BINARY)-windows-boringcrypto
29+
## agent-service Compiles cmd/grafana-agent-service to $(SERVICE_BINARY)
30+
## agentctl Compiles cmd/grafana-agentctl to $(AGENTCTL_BINARY)
31+
## operator Compiles cmd/grafana-agent-operator to $(OPERATOR_BINARY)
3132
##
3233
## Targets for building Docker images:
3334
##
@@ -98,6 +99,7 @@ AGENTCTL_IMAGE ?= grafana/agentctl:latest
9899
OPERATOR_IMAGE ?= grafana/agent-operator:latest
99100
AGENT_BINARY ?= build/grafana-agent
100101
AGENT_BORINGCRYPTO_BINARY ?= build/grafana-agent-boringcrypto
102+
AGENT_BORINGCRYPTO_WINDOWS_BINARY ?= build/agent-flow-windows-boringcrypto.exe
101103
FLOW_BINARY ?= build/grafana-agent-flow
102104
SERVICE_BINARY ?= build/grafana-agent-service
103105
AGENTCTL_BINARY ?= build/grafana-agentctl
@@ -192,6 +194,13 @@ else
192194
GOEXPERIMENT=boringcrypto $(GO_ENV) go build $(GO_FLAGS) -o $(AGENT_BORINGCRYPTO_BINARY) ./cmd/grafana-agent
193195
endif
194196

197+
agent-flow-windows-boringcrypto:
198+
ifeq ($(USE_CONTAINER),1)
199+
$(RERUN_IN_CONTAINER)
200+
else
201+
GOEXPERIMENT=cngcrypto $(GO_ENV) go build $(GO_FLAGS) -tags cngcrypto -o $(AGENT_BORINGCRYPTO_WINDOWS_BINARY) ./cmd/grafana-agent-flow
202+
endif
203+
195204

196205
agent-flow:
197206
ifeq ($(USE_CONTAINER),1)

cmd/grafana-agent-operator/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
55
# in environment variables.
66

7-
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.4 as build
7+
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.32.0 as build
88
ARG BUILDPLATFORM
99
ARG TARGETPLATFORM
1010
ARG TARGETOS

cmd/grafana-agent/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
55
# in environment variables.
66

7-
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.4 as build
7+
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.32.0 as build
88
ARG BUILDPLATFORM
99
ARG TARGETPLATFORM
1010
ARG TARGETOS

cmd/grafana-agent/Dockerfile.windows

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM grafana/agent-build-image:0.30.4-windows as builder
1+
FROM grafana/agent-build-image:0.32.0-windows as builder
22
ARG VERSION
33
ARG RELEASE_BUILD=1
44

cmd/grafana-agentctl/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
55
# in environment variables.
66

7-
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.4 as build
7+
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.32.0 as build
88
ARG BUILDPLATFORM
99
ARG TARGETPLATFORM
1010
ARG TARGETOS

cmd/grafana-agentctl/Dockerfile.windows

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM grafana/agent-build-image:0.30.4-windows as builder
1+
FROM grafana/agent-build-image:0.32.0-windows as builder
22
ARG VERSION
33
ARG RELEASE_BUILD=1
44

0 commit comments

Comments
 (0)