Skip to content

Add unit and metric_type meta to system fields.yml - #402

Merged
exekias merged 7 commits into
elastic:masterfrom
exekias:system-add-meta
Nov 23, 2020
Merged

Add unit and metric_type meta to system fields.yml#402
exekias merged 7 commits into
elastic:masterfrom
exekias:system-add-meta

Conversation

@exekias

@exekias exekias commented Nov 17, 2020

Copy link
Copy Markdown

What does this PR do?

This change updates fields.yml defintions to include units and metric
type information

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all datasets collect metrics or logs.

How to test this PR locally

Once elastic/kibana#82273 is in, system package templates should include unit and metric_type _meta fields.

Related issues

This change updates `fields.yml` defintions to include units and metric
type information.
@exekias exekias added enhancement New feature or request Team:Integrations Label for the Integrations team labels Nov 17, 2020
@elasticmachine

Copy link
Copy Markdown

Pinging @elastic/integrations (Team:Integrations)

@exekias exekias changed the title Add unit and metric_type meta to fields.yml Nov 17, 2020
@elasticmachine

elasticmachine commented Nov 17, 2020

Copy link
Copy Markdown

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #402 updated]

  • Start Time: 2020-11-23T15:50:21.138+0000

  • Duration: 8 min 16 sec

Test stats 🧪

Test Results
Failed 0
Passed 12
Skipped 0
Total 12

@ruflin

ruflin commented Nov 18, 2020

Copy link
Copy Markdown
Contributor

Nice! Already lots of place where this is used.

@fearful-symmetry fearful-symmetry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super happy to see us finally adding this.

@jsoriano jsoriano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment on lines +5 to +6
type: long
metric_type: gauge

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be actually a keyword 🙂

I don't think we need to handle it as a metric in any case.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, will change

Comment thread packages/system/data_stream/diskio/fields/fields.yml
Comment thread packages/system/data_stream/network/fields/fields.yml
Comment on lines 23 to +24
format: percent
unit: percent

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unit and format seem a bit redundant most of the times, maybe one can be derived from the other. Or maybe we could add additional checks, e.g. you probably always want to format as percent a metric with percent unit, same with bytes.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds reasonable, I would prefer to keep them separated for now, as they end up in different places (template vs index pattern), I agree we could do better at linting.

exekias and others added 3 commits November 23, 2020 16:26
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
@exekias

exekias commented Nov 23, 2020

Copy link
Copy Markdown
Author

Thanks for the reviews! @jsoriano this is ready for another go 😇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Team:Integrations Label for the Integrations team

6 participants