Skip to content

Commit d4f5e8b

Browse files
authored
Merge branch 'main' into add-splunk-rolling-restart-metric
2 parents 5cd513a + 94fb481 commit d4f5e8b

Some content is hidden

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

42 files changed

+1106
-701
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: bug_fix
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: pkg
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Fix empty resource attributes in the azure logs translator
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [39571]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

.chloggen/kafkaexporter-fixes.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: bug_fix
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: kafkaexporter
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: fix the default topic configuration, and default message partitioning
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [39810, 39816]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: [user]
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: bug_fix
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: kafkareceiver
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Fix support for built-in text encodings with hyphens in the encoding name
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [39793]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: [user]
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: bug_fix
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: tailsamplingprocessor
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Fix the misleading decision timer latency metric
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues:
14+
- 38502
15+
16+
# (Optional) One or more lines of additional information to render under the primary note.
17+
# These lines will be padded with 2 spaces and then inserted directly into the document.
18+
# Use pipe (|) for multiline entries.
19+
subtext:
20+
21+
# If your change doesn't affect end users or the exported elements of any package,
22+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
23+
# Optional: The change log or logs in which this entry should be included.
24+
# e.g. '[user]' or '[user, api]'
25+
# Include 'user' if the change is relevant to end users.
26+
# Include 'api' if there is a change to a library API.
27+
# Default: '[user]'
28+
change_logs: []
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: enhancement
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
5+
component: netflowreceiver
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Add `send_raw` option to send logs as a raw string in the log body instead of parsed into attributes.
9+
10+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
11+
issues: [38920]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext:
17+
18+
# If your change doesn't affect end users or the exported elements of any package,
19+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
20+
# Optional: The change log or logs in which this entry should be included.
21+
# e.g. '[user]' or '[user, api]'
22+
# Include 'user' if the change is relevant to end users.
23+
# Include 'api' if there is a change to a library API.
24+
# Default: '[user]'
25+
change_logs: [user]
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: awsfirehosereceiver
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: support all possible quantile values of CloudWatch metrics in addition to quantile 0 (min) and 1 (max)
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [39687]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: [user]

exporter/elasticsearchexporter/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,11 @@ The dimensions are mostly made up of resource attributes, scope attributes, scop
527527

528528
The exporter can only group metrics with the same dimensions into the same document if they arrive in the same batch.
529529
To ensure metrics are not dropped even if they arrive in different batches in the exporter, the exporter adds a fingerprint of the metric names to the document in the `otel` mapping mode.
530-
Note that this functionality requires a minimum Elasticsearch version of 8.17.6, 8.18.1, 8.19.0, 9.0.1, or 9.1.0.
531-
If you are on an earlier version, either update your Elasticsearch cluster or install this custom component template:
530+
Note that this functionality requires both
531+
- minimum Elasticsearch Exporter version 0.121.0
532+
- minimum Elasticsearch version 8.17.6, 8.18.1, 8.19.0, 9.0.1, or 9.1.0
533+
534+
If you are on an earlier version of Elasticsearch, either update your cluster or install this custom component template:
532535

533536
```shell
534537
PUT _component_template/metrics-otel@custom

exporter/kafkaexporter/kafka_exporter.go

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func (e *kafkaTracesMessager) marshalData(td ptrace.Traces) ([]marshaler.Message
157157
}
158158

159159
func (e *kafkaTracesMessager) getTopic(ctx context.Context, td ptrace.Traces) string {
160-
return getTopic(ctx, &e.config, td.ResourceSpans())
160+
return getTopic(ctx, &e.config, e.config.Traces.Topic, td.ResourceSpans())
161161
}
162162

163163
func (e *kafkaTracesMessager) partitionData(td ptrace.Traces) iter.Seq2[[]byte, ptrace.Traces] {
@@ -202,7 +202,7 @@ func (e *kafkaLogsMessager) marshalData(ld plog.Logs) ([]marshaler.Message, erro
202202
}
203203

204204
func (e *kafkaLogsMessager) getTopic(ctx context.Context, ld plog.Logs) string {
205-
return getTopic(ctx, &e.config, ld.ResourceLogs())
205+
return getTopic(ctx, &e.config, e.config.Logs.Topic, ld.ResourceLogs())
206206
}
207207

208208
func (e *kafkaLogsMessager) partitionData(ld plog.Logs) iter.Seq2[[]byte, plog.Logs] {
@@ -245,7 +245,7 @@ func (e *kafkaMetricsMessager) marshalData(md pmetric.Metrics) ([]marshaler.Mess
245245
}
246246

247247
func (e *kafkaMetricsMessager) getTopic(ctx context.Context, md pmetric.Metrics) string {
248-
return getTopic(ctx, &e.config, md.ResourceMetrics())
248+
return getTopic(ctx, &e.config, e.config.Metrics.Topic, md.ResourceMetrics())
249249
}
250250

251251
func (e *kafkaMetricsMessager) partitionData(md pmetric.Metrics) iter.Seq2[[]byte, pmetric.Metrics] {
@@ -274,7 +274,12 @@ type resource interface {
274274
Resource() pcommon.Resource
275275
}
276276

277-
func getTopic[T resource](ctx context.Context, cfg *Config, resources resourceSlice[T]) string {
277+
func getTopic[T resource](
278+
ctx context.Context,
279+
cfg *Config,
280+
defaultTopic string,
281+
resources resourceSlice[T],
282+
) string {
278283
if cfg.TopicFromAttribute != "" {
279284
for i := 0; i < resources.Len(); i++ {
280285
rv, ok := resources.At(i).Resource().Attributes().Get(cfg.TopicFromAttribute)
@@ -287,17 +292,22 @@ func getTopic[T resource](ctx context.Context, cfg *Config, resources resourceSl
287292
if ok {
288293
return contextTopic
289294
}
290-
return cfg.Topic
295+
return defaultTopic
291296
}
292297

293298
func makeSaramaMessages(messages []marshaler.Message, topic string) []*sarama.ProducerMessage {
294299
saramaMessages := make([]*sarama.ProducerMessage, len(messages))
295300
for i, message := range messages {
296-
saramaMessages[i] = &sarama.ProducerMessage{
301+
msg := &sarama.ProducerMessage{
297302
Topic: topic,
298-
Key: sarama.ByteEncoder(message.Key),
299-
Value: sarama.ByteEncoder(message.Value),
300303
}
304+
if message.Key != nil {
305+
msg.Key = sarama.ByteEncoder(message.Key)
306+
}
307+
if message.Value != nil {
308+
msg.Value = sarama.ByteEncoder(message.Value)
309+
}
310+
saramaMessages[i] = msg
301311
}
302312
return saramaMessages
303313
}

0 commit comments

Comments
 (0)