Skip to content

[Change Proposal] Support external fields as dimensions #247

@jsoriano

Description

@jsoriano

As discussed in elastic/integrations#2076 (comment), ECS fields could be dimensions too.

One option could be to add the dimension flag directly in ECS, and import it from there. But I think that the same ECS field may be a dimension in some integrations, but not in others. As mentioned in #215, the set of dimensions should be minimal for a given data stream, so an integration including many ECS dimension fields may actually need only a subset of them to identify individual time series. For example host.id can be needed to identify time series in the system integration, but not to identify time series of pods in the kubernetes integration.

So we would need to support something like this:

- external: ecs
  name: container.id
  dimension: true

Current implementation doesn't work because it checks the type and it is not checking now external fields. It fails with this error:

Error: checking package failed: linting package failed: found 2 validation errors:
   1. file "/home/jaime/gocode/src/github.com/elastic/integrations/packages/kubernetes/data_stream/container/fields/ecs.yml" is invalid: field "container.id" of type  can't be a dimension, allowed types for dimensions: constant_keyword, keyword, long, integer, short, byte, double, float, half_float, scaled_float, unsigned_long, ip

Changes required:

@mtojek do you see problems in this plan? ^

Metadata

Metadata

Assignees

Labels

discussIssue needs discussion

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions