diff --git a/CHANGELOG.md b/CHANGELOG.md index b849c7c31..ccc27daa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +Add "traces" as legal event type. [#656](https://github.com/elastic/package-registry/pull/656) + ### Deprecated ### Known Issue diff --git a/testdata/generated/categories-experimental.json b/testdata/generated/categories-experimental.json index 9447670a3..7cce414ff 100644 --- a/testdata/generated/categories-experimental.json +++ b/testdata/generated/categories-experimental.json @@ -32,7 +32,7 @@ { "id": "monitoring", "title": "Monitoring", - "count": 1 + "count": 2 }, { "id": "web", diff --git a/testdata/generated/package/traces/1.0.0/index.json b/testdata/generated/package/traces/1.0.0/index.json new file mode 100644 index 000000000..d8cee136a --- /dev/null +++ b/testdata/generated/package/traces/1.0.0/index.json @@ -0,0 +1,38 @@ +{ + "name": "fakeapm", + "title": "Not actually APM", + "version": "1.0.0", + "release": "experimental", + "description": "Not actually APM", + "type": "integration", + "download": "/epr/fakeapm/fakeapm-1.0.0.zip", + "path": "/package/fakeapm/1.0.0", + "format_version": "1.0.0", + "readme": "/package/fakeapm/1.0.0/docs/README.md", + "license": "basic", + "categories": [ + "monitoring" + ], + "conditions": { + "kibana.version": "~7.x.x" + }, + "assets": [ + "/package/fakeapm/1.0.0/manifest.yml", + "/package/fakeapm/1.0.0/docs/README.md", + "/package/fakeapm/1.0.0/data_stream/traces/manifest.yml", + "/package/fakeapm/1.0.0/data_stream/traces/fields/base-fields.yml" + ], + "data_streams": [ + { + "type": "traces", + "dataset": "fakeapm.traces", + "title": "notapmtraces", + "release": "experimental", + "package": "fakeapm", + "path": "traces" + } + ], + "owner": { + "github": "github.com/elastic/not-apm" + } +} \ No newline at end of file diff --git a/testdata/generated/search-package-experimental.json b/testdata/generated/search-package-experimental.json index 2277645d0..adaf073e6 100644 --- a/testdata/generated/search-package-experimental.json +++ b/testdata/generated/search-package-experimental.json @@ -49,6 +49,16 @@ "download": "/epr/experimental/experimental-0.0.1.zip", "path": "/package/experimental/0.0.1" }, + { + "name": "fakeapm", + "title": "Not actually APM", + "version": "1.0.0", + "release": "experimental", + "description": "Not actually APM", + "type": "integration", + "download": "/epr/fakeapm/fakeapm-1.0.0.zip", + "path": "/package/fakeapm/1.0.0" + }, { "name": "foo", "title": "Foo", diff --git a/testdata/package/traces/1.0.0/data_stream/traces/fields/base-fields.yml b/testdata/package/traces/1.0.0/data_stream/traces/fields/base-fields.yml new file mode 100644 index 000000000..c40df14f9 --- /dev/null +++ b/testdata/package/traces/1.0.0/data_stream/traces/fields/base-fields.yml @@ -0,0 +1,16 @@ +- name: data_stream.type + type: constant_keyword + description: > + Data stream type. +- name: data_stream.dataset + type: constant_keyword + description: > + Data stream dataset. +- name: data_stream.namespace + type: constant_keyword + description: > + Data stream namespace. +- name: "@timestamp" + type: date + description: > + Event timestamp. diff --git a/testdata/package/traces/1.0.0/data_stream/traces/manifest.yml b/testdata/package/traces/1.0.0/data_stream/traces/manifest.yml new file mode 100644 index 000000000..fbb50ed5c --- /dev/null +++ b/testdata/package/traces/1.0.0/data_stream/traces/manifest.yml @@ -0,0 +1,2 @@ +title: notapmtraces +type: traces diff --git a/testdata/package/traces/1.0.0/docs/README.md b/testdata/package/traces/1.0.0/docs/README.md new file mode 100644 index 000000000..464090415 --- /dev/null +++ b/testdata/package/traces/1.0.0/docs/README.md @@ -0,0 +1 @@ +# TODO diff --git a/testdata/package/traces/1.0.0/manifest.yml b/testdata/package/traces/1.0.0/manifest.yml new file mode 100644 index 000000000..ff3051729 --- /dev/null +++ b/testdata/package/traces/1.0.0/manifest.yml @@ -0,0 +1,11 @@ +format_version: 1.0.0 +name: fakeapm +description: Not actually APM +version: 1.0.0 +title: Not actually APM +categories: ["monitoring"] +type: integration +release: experimental +owner.github: "github.com/elastic/not-apm" +conditions: + kibana.version: "~7.x.x" diff --git a/util/data_stream.go b/util/data_stream.go index 1dbaba5c7..30e31e9d2 100644 --- a/util/data_stream.go +++ b/util/data_stream.go @@ -31,6 +31,7 @@ const ( var validTypes = map[string]string{ "logs": "Logs", "metrics": "Metrics", + "traces": "Traces", } type DataStream struct {