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

Map message field to match_only_text for custom logs input package #6570

Merged
merged 3 commits into from
Jun 15, 2023

Conversation

gsantoro
Copy link
Contributor

What does this PR do?

Add support for ECS dynamic templates in the custom logs integration defined in the log input package

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • [ ]

How to test this PR locally

  • Install the new version of the package in elastic-package
  • check that the field message has mapping match_only_text instead of keyword

Related issues

Screenshots

@gsantoro gsantoro added the bug Something isn't working, use only for issues label Jun 14, 2023
@gsantoro gsantoro requested a review from a team as a code owner June 14, 2023 11:12
@gsantoro gsantoro self-assigned this Jun 14, 2023
@elasticmachine
Copy link

💚 Build Succeeded

History

cc @gsantoro

@elasticmachine
Copy link

elasticmachine commented Jun 14, 2023

💚 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 preview

Expand to view the summary

Build stats

  • Start Time: 2023-06-14T11:25:21.735+0000

  • Duration: 15 min 33 sec

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

Copy link
Member

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

Change LGTM. I basically means by default, the user gets all the ECS mappings for logs.

@gsantoro gsantoro requested a review from ruflin June 14, 2023 15:50
Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

Tested and I see the following mapping in the custom logs component template:

{
  "_embedded_ecs-message_match_only_text": {
    "path_match": "message",
    "mapping": {
      "type": "match_only_text"
    }
  }
}

@gsantoro gsantoro merged commit c3c8c67 into elastic:main Jun 15, 2023
@gsantoro gsantoro deleted the feature/log_message_field branch June 15, 2023 08:46
@elasticmachine
Copy link

Package log - 2.1.0 containing this change is available at https://epr.elastic.co/search?package=log

- version: "2.1.0"
changes:
- description: Add mapping for message field
type: enhancement
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 too late, but it is actually a bug fix not an enhancement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry about this. Is there anything we can do?

Copy link
Member

Choose a reason for hiding this comment

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

I guess we could fix it in a follow up. Lets just keep it for now and consider it a bug :-)

sodhikirti07 pushed a commit that referenced this pull request Jun 15, 2023
…6570)

* add dynamic mapping to fix message mapping type from keyword to match_only_text

* updated changelog

* reference to ecs dynamic template in the docs
@andrewkroh andrewkroh added the Integration:log Custom Logs label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, use only for issues Integration:log Custom Logs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Log] Message field is keyword
6 participants