Skip to content

Commit

Permalink
Remove windows event log plugin from adapter translation. (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
jefchien authored and Andrew Huynh committed Jul 27, 2023
1 parent 6c2d68d commit 4c7abf4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,6 @@ receivers:
alias_name: LogicalDisk
collection_interval: 1m0s
initial_delay: 1s
telegraf_windows_event_log:
collection_interval: 1m0s
initial_delay: 1s
udplog/emf_logs:
attributes: {}
encoding: utf-8
Expand Down Expand Up @@ -212,7 +209,6 @@ service:
- telegraf_win_perf_counters/3081249416
- telegraf_win_perf_counters/3762679655
- telegraf_win_perf_counters/4283769065
- telegraf_windows_event_log
traces/xray:
exporters:
- awsxray
Expand Down
4 changes: 2 additions & 2 deletions translator/translate/otel/receiver/adapter/translators.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var (
logKey = common.ConfigKey(common.LogsKey, common.LogsCollectedKey)
logMetricKey = common.ConfigKey(common.LogsKey, common.MetricsCollectedKey)
metricKey = common.ConfigKey(common.MetricsKey, common.MetricsCollectedKey)
skipInputSet = map[string]bool{files.SectionKey: true}
skipInputSet = collections.NewSet[string](files.SectionKey, windows_events.SectionKey)
)

var (
Expand Down Expand Up @@ -149,7 +149,7 @@ func fromInputs(conf *confmap.Conf, validInputs map[string]bool, baseKey string)
}
}
cfgKey := common.ConfigKey(baseKey, inputName)
if skipInputSet[inputName] {
if skipInputSet.Contains(inputName) {
// logs agent is separate from otel agent
continue
} else if multipleInputSet.Contains(inputName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,8 @@ func TestFindReceiversInConfig(t *testing.T) {
},
},
},
os: translatorconfig.OS_TYPE_WINDOWS,
want: map[component.ID]wantResult{
component.NewID("telegraf_windows_event_log"): {"logs::logs_collected::windows_events", time.Minute},
},
os: translatorconfig.OS_TYPE_WINDOWS,
want: map[component.ID]wantResult{},
},
"WithNoSocketListener": {
input: map[string]interface{}{
Expand Down

0 comments on commit 4c7abf4

Please sign in to comment.