Skip to content

Commit 3b84637

Browse files
committed
Accounting for data stream type == traces
1 parent ad534d5 commit 3b84637

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

internal/packages/assets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func loadElasticsearchAssets(pkgRootPath string) ([]Asset, error) {
120120
}
121121
assets = append(assets, asset)
122122

123-
if dsManifest.Type == dataStreamTypeLogs {
123+
if dsManifest.Type == dataStreamTypeLogs || dsManifest.Type == dataStreamTypeTraces {
124124
elasticsearchDirPath := filepath.Join(filepath.Dir(dsManifestPath), "elasticsearch", "ingest_pipeline")
125125
pipelineFiles, _ := ioutil.ReadDir(elasticsearchDirPath)
126126
if pipelineFiles == nil || len(pipelineFiles) == 0 {

internal/packages/packages.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const (
2525

2626
dataStreamTypeLogs = "logs"
2727
dataStreamTypeMetrics = "metrics"
28+
dataStreamTypeTraces = "traces"
2829
)
2930

3031
// VarValue represents a variable value as defined in a package or data stream
@@ -248,5 +249,7 @@ func isDataStreamManifest(path string) (bool, error) {
248249
if err != nil {
249250
return false, errors.Wrapf(err, "reading package manifest failed (path: %s)", path)
250251
}
251-
return m.Title != "" && (m.Type == dataStreamTypeLogs || m.Type == dataStreamTypeMetrics), nil
252+
return m.Title != "" &&
253+
(m.Type == dataStreamTypeLogs || m.Type == dataStreamTypeMetrics || m.Type == dataStreamTypeTraces),
254+
nil
252255
}

0 commit comments

Comments
 (0)