Fix GenAI numbers datatype#2646
Conversation
|
Documentation changes preview: https://docs-v3-preview.elastic.dev/elastic/ecs/pull/2646/reference/ |
🤖 GitHub commentsJust comment with:
|
ECS PR Triage (automated)PR Triage ReportPR: #2646 — Fix GenAI numbers datatype SummaryThis PR changes the Files changed
Routing decisionThe change modifies
Given these factors, this falls between §1 (RFC required — type change) and §2 (Direct PR — bugfix/strict-mode fix). The conservative classification is Needs Discussion: a maintainer should confirm that this non-breaking type widening on beta fields is acceptable as a direct PR without an RFC. Risk notes
Completeness checklist
Recommended next actions
Posted by PR Triage workflow |
According to the ECS conventions, the datatype for integers (numbers) should be `long`: https://www.elastic.co/docs/reference/ecs/ecs-conventions#_datatype_for_integers When GenAI fields where added in elastic#2475, a bunch of `integer` fields where added, but their datatype was not discussed. This introduced some inconsistency, and without a strong reason for preferring `integer` to `long`, breaks the ECS conventions. Update these fields to use the `long` datatype as expected by the ECS conventions.
Regenerate artifacts after the last commit to keep them in sync in the repo.
fd9c735 to
45a9736
Compare
|
Sorry, I messed my upstreams before working on this PR and pushed garbage… I fixed my commits and force-pushed, this is ready for review. |
1. What does this PR do?
According to the ECS conventions, the datatype for integers (numbers) should be
long:https://www.elastic.co/docs/reference/ecs/ecs-conventions#_datatype_for_integers
When GenAI fields where added in #2475, a bunch of
integerfields where added, but their datatype was not discussed. This introduced some inconsistency, and without a strong reason for preferringintegertolong, breaks the ECS conventions.This PR fix this by switching to
longdatatypes as expected by the ECS conventions.2. Which ECS fields are affected/introduced?
genai.request.choice.countgenai.request.max_tokensgenai.request.seedgenai.usage.input_tokensgenai.usage.output_tokens3. Why is this change necessary?
Compliance with the ECS conventions.
4. Have you added/updated documentation?
N/A
5. Have you built ECS and committed any newly generated files?
YES
6. Have you run the ECS validation tests locally?
YES
7. Anything else for the reviewers?
Thank you!
Commit Message
Fix GenAI numbers datatype
According to the ECS conventions, the datatype for integers (numbers)
should be
long:https://www.elastic.co/docs/reference/ecs/ecs-conventions#_datatype_for_integers
When GenAI fields where added in #2475, a bunch of
integerfieldswhere added, but their datatype was not discussed. This introduced some
inconsistency, and without a strong reason for preferring
integertolong, breaks the ECS conventions.Update these fields to use the
longdatatype as expected by the ECSconventions.