-
Notifications
You must be signed in to change notification settings - Fork 474
[azure logs] Normalize capitalized Category field for proper data stream routing #14415
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
Conversation
Category
Category
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much @zmoog ! I thought we had to add Category
support for everything, didn't even notice it was possible to just lowercase it.
can't recall the details, but I skipped tests because I thought the reroute processor "can't be tested" properly, but it turns out it's definitely possible. We can add a few test documents with the I added a few tests for the invalid field |
Category
385a639
to
c85d42b
Compare
🚀 Benchmarks reportTo see the full report comment with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Maurizio!
9beea8d
to
58393d5
Compare
Added one routing test for each supported log category: $ elastic-package test pipeline -d events
Run pipeline tests for the package
--- Test results for package: azure - START ---
╭─────────┬─────────────┬───────────┬────────────────────────────────────────────────────────────────┬────────┬──────────────╮
│ PACKAGE │ DATA STREAM │ TEST TYPE │ TEST NAME │ RESULT │ TIME ELAPSED │
├─────────┼─────────────┼───────────┼────────────────────────────────────────────────────────────────┼────────┼──────────────┤
│ azure │ events │ pipeline │ (ingest pipeline warnings test-activitylogs-raw.log) │ PASS │ 558.513166ms │
│ azure │ events │ pipeline │ (ingest pipeline warnings test-application_gateway-raw.log) │ PASS │ 482.429333ms │
│ azure │ events │ pipeline │ (ingest pipeline warnings test-auditlogs-raw.log) │ PASS │ 475.755834ms │
│ azure │ events │ pipeline │ (ingest pipeline warnings test-firewall_logs-raw.log) │ PASS │ 503.368542ms │
│ azure │ events │ pipeline │ (ingest pipeline warnings test-graphactivitylogs-raw.log) │ PASS │ 488.667917ms │
│ azure │ events │ pipeline │ (ingest pipeline warnings test-identity_protection-raw.log) │ PASS │ 512.766917ms │
│ azure │ events │ pipeline │ (ingest pipeline warnings test-invalid-category-field-raw.log) │ PASS │ 530.038041ms │
│ azure │ events │ pipeline │ (ingest pipeline warnings test-provisioning-raw.log) │ PASS │ 493.391417ms │
│ azure │ events │ pipeline │ (ingest pipeline warnings test-signinlogs-raw.log) │ PASS │ 511.469667ms │
│ azure │ events │ pipeline │ (ingest pipeline warnings test-springcloudlogs-raw.log) │ PASS │ 558.499916ms │
│ azure │ events │ pipeline │ test-activitylogs-raw.log │ PASS │ 43.934875ms │
│ azure │ events │ pipeline │ test-application_gateway-raw.log │ PASS │ 39.646875ms │
│ azure │ events │ pipeline │ test-auditlogs-raw.log │ PASS │ 38.612042ms │
│ azure │ events │ pipeline │ test-firewall_logs-raw.log │ PASS │ 41.445125ms │
│ azure │ events │ pipeline │ test-graphactivitylogs-raw.log │ PASS │ 38.820708ms │
│ azure │ events │ pipeline │ test-identity_protection-raw.log │ PASS │ 38.927917ms │
│ azure │ events │ pipeline │ test-invalid-category-field-raw.log │ PASS │ 38.571375ms │
│ azure │ events │ pipeline │ test-provisioning-raw.log │ PASS │ 39.498334ms │
│ azure │ events │ pipeline │ test-signinlogs-raw.log │ PASS │ 39.363542ms │
│ azure │ events │ pipeline │ test-springcloudlogs-raw.log │ PASS │ 40.66325ms │
╰─────────┴─────────────┴───────────┴────────────────────────────────────────────────────────────────┴────────┴──────────────╯
--- Test results for package: azure - END ---
Done |
/test |
💚 Build Succeeded
History
|
|
Package azure - 1.28.1 containing this change is available at https://epr.elastic.co/package/azure/1.28.1/ |
Proposed commit message
Rename invalid log category field
Category
ascategory
to correctly infer theevent.dataset
, and perform the routing to the target data stream, if available.Unfortunately, some Azure services produce logs with capitalized field names, violating the spec.
❌ Invalid format
Instead, it should be something similar:
✅ Expected format
To properly identify the event dataset and apply the correct routing rules, we need to convert them to lowercase.
Note: the target data stream is responsible for dealing with the capitalized field names. The
events
data stream's responsibility is to route to the target data stream, if available, or fall back to platform logs.Checklist
changelog.yml
file.I have verified that any added dashboard complies with Kibana's Dashboard good practicesHow to test this PR locally
Related issues