Skip to content

Commit d3d7931

Browse files
dehaansamichaelPotterthampiotr
authored
Prepare release/1.9 for 1.9.1 (#3776)
* Update aws_firehose collector to use CW event timestamps (#3725) * SISENG-2728: Update aws_firehose collector to use CW event timestamps If the useIncomingTs flag is set to true, the loki.aws_firehose collector will now use the timestamps attached to specific log entries when processing cloudwatch logs-subscription data. For direct put data, the timestamp attached to the firehose wrapper is still used. * SISENG-2728: Use millisecond resolution for cloudwatch timestamps (cherry picked from commit a153152) * reduce CPU use in zapadapter (#3773) * Improve zadapter benchmark. * Fix slow zadapter. * comments and changelog (cherry picked from commit f9e1b15) * Add new collectors enabled_list to dns collector and update windows exporter version (#3742) * Add new collectors enabled_list to dns collector and update windows exporter version * Fix typo from windows exporter docs * fix changelog * fix VERSION * fix gomod --------- Co-authored-by: Michael Potter <[email protected]> Co-authored-by: Piotr <[email protected]>
1 parent 402c012 commit d3d7931

File tree

17 files changed

+179
-40
lines changed

17 files changed

+179
-40
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ This document contains a historical list of changes between releases. Only
77
changes that impact end-user behavior are listed; changes to documentation or
88
internal API changes are not present.
99

10+
v1.9.1
11+
-----------------
12+
13+
### Features
14+
15+
- Update the `prometheus.exporter.windows` component to version v0.30.7. This adds new metrics to the `dns` collector. (@dehaansa)
16+
17+
### Bugfixes
18+
19+
- Update the `prometheus.exporter.windows` component to version v0.30.7. This fixes an error with the exchange collector and terminal_services collector (@dehaansa)
20+
21+
- Fix `loki.source.firehose` to propagate specific cloudwatch event timestamps when useIncomingTs is set to true. (@michaelPotter)
22+
23+
- Fix elevated CPU usage when using some `otelcol` components due to debug logging. (@thampiotr)
24+
1025
v1.9.0
1126
-----------------
1227

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
#
2121
# Lines starting with "#" and blank lines are ignored.
2222

23-
v1.9.0
23+
v1.9.1

docs/sources/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ title: Grafana Alloy
44
description: Grafana Alloy is a vendor-neutral distribution of the OTel Collector
55
weight: 350
66
cascade:
7-
ALLOY_RELEASE: v1.9.0
7+
ALLOY_RELEASE: v1.9.1
88
OTEL_VERSION: v0.122.0
9-
PROM_WIN_EXP_VERSION: v0.30.6
9+
PROM_WIN_EXP_VERSION: v0.30.7
1010
SNMP_VERSION: v0.29.0
1111
BEYLA_VERSION: v2.1
1212
FULL_PRODUCT_NAME: Grafana Alloy

docs/sources/_index.md.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ weight: 350
66
cascade:
77
ALLOY_RELEASE: $ALLOY_VERSION
88
OTEL_VERSION: v0.122.0
9-
PROM_WIN_EXP_VERSION: v0.30.6
9+
PROM_WIN_EXP_VERSION: v0.30.7
1010
SNMP_VERSION: v0.29.0
1111
BEYLA_VERSION: v2.1
1212
FULL_PRODUCT_NAME: Grafana Alloy

docs/sources/reference/components/prometheus/prometheus.exporter.windows.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ You can use the following blocks with `prometheus.exporter.windows`:
5050
| Name | Description | Required |
5151
| ------------------------------------------ | ---------------------------------------------- | -------- |
5252
| [`dfsr`][dfsr] | Configures the `dfsr` collector. | no |
53+
| [`dns`][dns] | Configures the `dns` collector. | no |
5354
| [`exchange`][exchange] | Configures the `exchange` collector. | no |
5455
| [`filetime`][filetime] | Configures the `filetime` collector. | no |
5556
| [`iis`][iis] | Configures the `iis` collector. | no |
@@ -71,6 +72,7 @@ You can use the following blocks with `prometheus.exporter.windows`:
7172
| [`text_file`][text_file] | Configures the `text_file` collector. | no |
7273

7374
[dfsr]: #dfsr
75+
[dns]: #dns
7476
[exchange]: #exchange
7577
[filetime]: #filetime
7678
[iis]: #iis
@@ -97,6 +99,12 @@ You can use the following blocks with `prometheus.exporter.windows`:
9799
| ---------------- | -------------- | -------------------------------------- | ---------------------------------- | -------- |
98100
| `source_enabled` | `list(string)` | A list of DFSR Perflib sources to use. | `["connection","folder","volume"]` | no |
99101

102+
### `dns`
103+
104+
| Name | Type | Description | Default | Required |
105+
|----------------|----------------|------------------------------|------------------------------|----------|
106+
| `enabled_list` | `list(string)` | A list of collectors to use. | `["metrics", "wmi_stats"]` | no |
107+
100108
### `exchange`
101109

102110
| Name | Type | Description | Default | Required |

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ require (
174174
github.com/prometheus-community/elasticsearch_exporter v1.5.0
175175
github.com/prometheus-community/postgres_exporter v0.11.1
176176
github.com/prometheus-community/stackdriver_exporter v0.18.0
177-
github.com/prometheus-community/windows_exporter v0.30.6 // if you update the windows_exporter version, make sure to update the PROM_WIN_EXP_VERSION in _index
177+
github.com/prometheus-community/windows_exporter v0.30.7 // if you update the windows_exporter version, make sure to update the PROM_WIN_EXP_VERSION in _index
178178
github.com/prometheus-operator/prometheus-operator v0.69.1
179179
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1
180180
github.com/prometheus-operator/prometheus-operator/pkg/client v0.69.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2456,8 +2456,8 @@ github.com/prometheus-community/prom-label-proxy v0.7.0 h1:1iNHXF7V8z2iOCinEyxKD
24562456
github.com/prometheus-community/prom-label-proxy v0.7.0/go.mod h1:wR9C/Mwp5aBbiqM6gQ+FZdFRwL8pCzzhsje8lTAx/aA=
24572457
github.com/prometheus-community/stackdriver_exporter v0.18.0 h1:nB7JwloiBziunaujql5XEjB06WOo0ePgBTCJxFeaOhY=
24582458
github.com/prometheus-community/stackdriver_exporter v0.18.0/go.mod h1:f7T7XXRVc390sVc7rk2yNflf+RkClE4mlfsaSsW2K5Q=
2459-
github.com/prometheus-community/windows_exporter v0.30.6 h1:xoZvbMUKKxmZJ6F5CHQhxQmUDL9S52TUxQLzSFSdwHA=
2460-
github.com/prometheus-community/windows_exporter v0.30.6/go.mod h1:qn12efWBV5wguLBvQ2soKdgP5pTgVHx3ec4Di0bWb7M=
2459+
github.com/prometheus-community/windows_exporter v0.30.7 h1:p+T2O7XthamlSpeQtKmBylA2sQVGcWKMCwD+qnkZwcE=
2460+
github.com/prometheus-community/windows_exporter v0.30.7/go.mod h1:qn12efWBV5wguLBvQ2soKdgP5pTgVHx3ec4Di0bWb7M=
24612461
github.com/prometheus-operator/prometheus-operator v0.69.1 h1:pqNMssMBBaM6mYg7FKK7kQi9sIyWYCA33z5FSmmbybw=
24622462
github.com/prometheus-operator/prometheus-operator v0.69.1/go.mod h1:1GSjL8dKOO9be+b7aSowZo7cuTdsdTqLT3ZETktVqvU=
24632463
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1 h1:hOnp+1FLBm+ifsyiRbunmfSs99jKAq+Tr5elCmo5l5U=

internal/component/loki/source/aws_firehose/internal/handler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ func (h *Handler) handleCloudwatchLogsRecord(ctx context.Context, data []byte, c
274274
cwLogsLabels.Set("__aws_cw_msg_type", cwRecord.MessageType)
275275

276276
for _, event := range cwRecord.LogEvents {
277+
if h.useIncomingTs {
278+
timestamp = time.UnixMilli(event.Timestamp)
279+
}
277280
h.sender.Send(ctx, loki.Entry{
278281
Labels: h.postProcessLabels(cwLogsLabels.Labels()),
279282
Entry: logproto.Entry{

internal/component/loki/source/aws_firehose/internal/handler_test.go

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,24 @@ const (
3636
//go:embed testdata/*
3737
var testData embed.FS
3838

39+
// These timestamps line up with the log entries in the testdata/cw_logs_mixed.json file.
40+
var cwLogsTimestamps = []int64{
41+
1684423980083,
42+
1684424003641,
43+
1684424003820,
44+
1684424003822,
45+
1684424003859,
46+
1684424003859,
47+
1684424005707,
48+
1684424005708,
49+
1684424005718,
50+
1684424005718,
51+
1684424007492,
52+
1684424007493,
53+
1684424007494,
54+
1684424007494,
55+
}
56+
3957
func readTestData(t *testing.T, name string) string {
4058
f, err := testData.ReadFile(name)
4159
if err != nil {
@@ -196,8 +214,8 @@ func TestHandler(t *testing.T) {
196214
require.Equal(t, "86208cf6-2bcc-47e6-9010-02ca9f44a025", r.RequestID)
197215

198216
require.Len(t, entries, 14)
199-
expectedTimestamp := time.Unix(cwRequestTimestamp/1000, 0)
200-
for _, e := range entries {
217+
for i, e := range entries {
218+
var expectedTimestamp = time.UnixMilli(cwLogsTimestamps[i])
201219
require.Equal(t, expectedTimestamp, e.Timestamp, "timestamp is other than expected")
202220
}
203221
},

internal/component/prometheus/exporter/windows/config.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ type Arguments struct {
5050
PerformanceCounter PerformanceCounterConfig `alloy:"performancecounter,block,optional"`
5151
MSCluster MSClusterConfig `alloy:"mscluster,block,optional"`
5252
NetFramework NetFrameworkConfig `alloy:"netframework,block,optional"`
53+
DNS DNSConfig `alloy:"dns,block,optional"`
5354
}
5455

5556
// Convert converts the component's Arguments to the integration's Config.
@@ -380,3 +381,15 @@ func (t NetFrameworkConfig) Convert() windows_integration.NetFrameworkConfig {
380381
EnabledList: strings.Join(t.EnabledList, ","),
381382
}
382383
}
384+
385+
// DNSConfig handles settings for the windows_exporter DNS collector
386+
type DNSConfig struct {
387+
EnabledList []string `alloy:"enabled_list,attr,optional"`
388+
}
389+
390+
// Convert converts the component's DNSConfig to the integration's DNSConfig.
391+
func (t DNSConfig) Convert() windows_integration.DNSConfig {
392+
return windows_integration.DNSConfig{
393+
EnabledList: strings.Join(t.EnabledList, ","),
394+
}
395+
}

0 commit comments

Comments
 (0)