Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logs-apm.error-*: define log.level field as keyword #112440

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

marclop
Copy link
Contributor

@marclop marclop commented Sep 3, 2024

This commit defines a new mapping log.level as a keyword for all apm error logs.

Part of elastic/apm-server#13956

This commit sets `log.level: "error"` as a `constant_keyword` for all
apm error logs.

Part of elastic/apm-server#13956

Signed-off-by: Marc Lopez Rubio <[email protected]>
@marclop marclop requested a review from a team as a code owner September 3, 2024 00:26
@elasticsearchmachine elasticsearchmachine added v8.16.0 needs:triage Requires assignment of a team area label labels Sep 3, 2024
@marclop marclop added >bug :Data Management/Data streams Data streams and their lifecycles Team:Data Management Meta label for data/management team v8.15.2 labels Sep 3, 2024
@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Sep 3, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine
Copy link
Collaborator

Hi @marclop, I've created a changelog YAML for you.

@@ -26,6 +26,9 @@ template:
processor.event:
type: constant_keyword
value: error
log.level:
type: constant_keyword
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about using constant_keyword for this. I think OTel exception logs could explicitly set a log level to something other than "error", which could conflict with this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh... I wasn't aware of that case. Should it then be mapped in apm-data and just added as a keyword?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not convinced we should set a default value for log.level, so wouldn't make a change to apm-data; but it makes sense to map the field as keyword.

Signed-off-by: Marc Lopez Rubio <[email protected]>
@marclop marclop changed the title apm: Set log.level: error on all apm error logs logs-apm.error-*: define log.level field as keyword Sep 3, 2024
@marclop marclop removed the v8.15.2 label Sep 3, 2024
@marclop marclop merged commit e6525de into elastic:main Sep 3, 2024
15 checks passed
@marclop marclop deleted the b/add-log.level-error-on-apm-err-logs branch September 3, 2024 18:38
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this pull request Sep 4, 2024
Defines `log.level` as a `keyword` for all apm error logs.

---------

Signed-off-by: Marc Lopez Rubio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Data streams Data streams and their lifecycles Team:Data Management Meta label for data/management team v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants