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

azure logs: add ECS mapping for event.duration #11104

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/azure/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
- version: "1.15.2"
changes:
- description: Convert the event.duration field value to the long type.
type: bugfix
link: https://github.com/elastic/integrations/pull/11104
- version: "1.15.1"
changes:
- description: Fix [client|source].geo.location ECS field mapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,23 @@ processors:
field: azure.activitylogs.durationMs
target_field: event.duration
ignore_missing: true
- convert:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we adding back the mapping to ecs.yml instead of doing this ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, we have seen that the conversion is not effective in communicating that the type should be a long.

field: event.duration
tag: convert_event_duration
type: long
ignore_missing: true
on_failure:
- remove:
field: event.duration
- append:
field: error.message
value: 'Processor {{{_ingest.on_failure_processor_type}}} with tag {{{_ingest.on_failure_processor_tag}}} in pipeline {{{_ingest.pipeline}}} failed with message: {{{_ingest.on_failure_message}}}'
- script:
lang: painless
source: if (ctx.event.duration!= null) {ctx.event.duration = ctx.event.duration
* params.param_nano;}
source: >
if (ctx.event.duration != null) {
ctx.event.duration = ctx.event.duration * params.param_nano;
}
params:
param_nano: 1000000
ignore_failure: true
Expand Down