Skip to content

Commit 83920df

Browse files
committed
Merge branch 'main' of github.com:k-shaikh/opentelemetry-collector-contrib
2 parents 3d87839 + 1b2e63c commit 83920df

File tree

19 files changed

+421
-322
lines changed

19 files changed

+421
-322
lines changed

.chloggen/ddog-deprecate-cfg.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: deprecation
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: datadogexporter
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: "Deprecate config `host_metadata::first_resource`"
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: [39069]
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: "Opt in to https://docs.datadoghq.com/opentelemetry/mapping/host_metadata/ instead. Its behavior is more predictable and provides more flexibility."
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: []
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: 'breaking'
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: splunkenterprisereceiver
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: "disabled default metrics except for splunkHealth to ensure scrapes run on Splunk instance are opt-in"
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: [39068]
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]

.chloggen/vpc-optimization.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: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: awslogsencodingextension
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Improve performance when unmarshalling plain-text VPC flow logs.
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: [39043]
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: []

exporter/datadogexporter/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ const (
134134
// hostname-like attributes, it will fallback to 'config_or_system' behavior (see below).
135135
//
136136
// Do not use this hostname source if receiving data from multiple hosts.
137-
HostnameSourceFirstResource HostnameSource = datadogconfig.HostnameSourceFirstResource
137+
HostnameSourceFirstResource HostnameSource = datadogconfig.HostnameSourceFirstResource //nolint:staticcheck
138138

139139
// Deprecated: [v0.110.0] Use `datadogconfig.HostnameSource` instead.
140140
// HostnameSourceConfigOrSystem picks the host metadata hostname from the 'hostname' setting,

exporter/datadogexporter/factory.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,9 @@ func (f *factory) createMetricsExporter(
319319
// Start the hostmetadata pusher once.
320320
// It sends the hostmetadata for the host where the collector is running.
321321
if cfg.HostMetadata.Enabled {
322+
if cfg.HostMetadata.HostnameSource == datadogconfig.HostnameSourceFirstResource { //nolint:staticcheck
323+
set.Logger.Warn("first_resource has no effect when serializer exporter is used for exporting metrics")
324+
}
322325
f.onceMetadata.Do(func() {
323326
attrs := pcommon.NewMap()
324327
go hostmetadata.RunPusher(ctx, set, pcfg, hostProvider, attrs, metadataReporter)

exporter/datadogexporter/metrics_exporter_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ func TestNewExporter(t *testing.T) {
6363
HostMetadata: HostMetadataConfig{
6464
Enabled: true,
6565
ReporterPeriod: 30 * time.Minute,
66-
HostnameSource: HostnameSourceFirstResource,
6766
},
6867
}
6968
cfg.HostMetadata.SetSourceTimeout(50 * time.Millisecond)
@@ -86,7 +85,7 @@ func TestNewExporter(t *testing.T) {
8685
err = exp.ConsumeMetrics(context.Background(), testMetrics)
8786
require.NoError(t, err)
8887
recvMetadata := <-server.MetadataChan
89-
assert.Equal(t, "custom-hostname", recvMetadata.InternalHostname)
88+
assert.NotEmpty(t, recvMetadata.InternalHostname)
9089
}
9190

9291
func TestNewExporter_Serializer(t *testing.T) {
@@ -115,7 +114,6 @@ func TestNewExporter_Serializer(t *testing.T) {
115114
HostMetadata: HostMetadataConfig{
116115
Enabled: true,
117116
ReporterPeriod: 30 * time.Minute,
118-
HostnameSource: HostnameSourceFirstResource,
119117
},
120118
}
121119
cfg.HostMetadata.SetSourceTimeout(50 * time.Millisecond)
@@ -501,7 +499,6 @@ func Test_metricsExporter_PushMetricsData(t *testing.T) {
501499
}
502500

503501
func TestNewExporter_Zorkian(t *testing.T) {
504-
t.Skip("skipping test, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/39064")
505502
if isMetricExportV2Enabled() {
506503
require.NoError(t, enableZorkianMetricExport())
507504
defer require.NoError(t, enableNativeMetricExport())
@@ -529,7 +526,6 @@ func TestNewExporter_Zorkian(t *testing.T) {
529526
HostMetadata: HostMetadataConfig{
530527
Enabled: true,
531528
ReporterPeriod: 30 * time.Minute,
532-
HostnameSource: HostnameSourceFirstResource,
533529
},
534530
}
535531
params := exportertest.NewNopSettings(metadata.Type)
@@ -550,7 +546,7 @@ func TestNewExporter_Zorkian(t *testing.T) {
550546
err = exp.ConsumeMetrics(context.Background(), testMetrics)
551547
require.NoError(t, err)
552548
recvMetadata := <-server.MetadataChan
553-
assert.Equal(t, "custom-hostname", recvMetadata.InternalHostname)
549+
assert.NotEmpty(t, recvMetadata.InternalHostname)
554550
}
555551

556552
func Test_metricsExporter_PushMetricsData_Zorkian(t *testing.T) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
version account-id interface-id srcaddr dstaddr srcport dstport protocol packets bytes start end action log-status
2+
2 12345678910 eni-0eb1e4178af74336c - - - - - - - 1742570089 1742570142 - NODATA one-too-many

0 commit comments

Comments
 (0)