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

Add target_format property to the Logs attribute remapper #682

Merged
merged 17 commits into from
Oct 8, 2020

Conversation

vinckama
Copy link
Contributor

@vinckama vinckama commented Oct 5, 2020

Add target_format to attribute remapper
related to PR

@vinckama vinckama requested a review from a team as a code owner October 5, 2020 15:11
@vinckama vinckama added the do-not-merge/WIP Do not merge this PR label Oct 5, 2020
@vinckama vinckama force-pushed the vincent.roy/logs_pipelines/add_target_format branch from 7c27806 to d89bc5a Compare October 7, 2020 07:27
@vinckama vinckama changed the title Vincent.roy/logs pipelines/add target format Add target_format property to the Logs attribute remapper Oct 7, 2020
@vinckama vinckama force-pushed the vincent.roy/logs_pipelines/add_target_format branch from 18c1b10 to a283a89 Compare October 7, 2020 16:47
@vinckama vinckama force-pushed the vincent.roy/logs_pipelines/add_target_format branch from a283a89 to 9fdb263 Compare October 7, 2020 17:05
@vinckama vinckama force-pushed the vincent.roy/logs_pipelines/add_target_format branch from 2972184 to 0abc246 Compare October 8, 2020 11:03
@vinckama vinckama added documentation new-resource and removed do-not-merge/WIP Do not merge this PR labels Oct 8, 2020
@@ -185,6 +186,7 @@ The following arguments are supported:
- `source_type`: (Required) Defines where the sources are from (log `attribute` or `tag`).
- `target`: (Required) Final `attribute` or `tag` name to remap the sources.
- `target_type`: (Required) Defines if the target is a log `attribute` or `tag`.
- `target_format`: (Optional) If the target of the remapper is an attribute, try to cast the value to a new specific type. If the cast is not possible, the original type is kept. `string`, `integer`, or `double` are the possible types.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you can make it more explicit that users should only set the target_format if the target_type is an attribute. It's already said, but for this kind of valid / invalid values it's better to be super explicit and not being afraid of being repetitive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you for pointing this out

txominpelu
txominpelu previously approved these changes Oct 8, 2020
@vinckama vinckama requested a review from a team as a code owner October 8, 2020 13:49
@vinckama vinckama force-pushed the vincent.roy/logs_pipelines/add_target_format branch from d47f20e to 8649967 Compare October 8, 2020 13:54
Copy link
Contributor

@therve therve left a comment

Choose a reason for hiding this comment

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

Looks good, some minor doc changes. Thanks!

- `preserve_source`: (Optional, default = false) Remove or preserve the remapped source element.
- `override_on_conflict`: (Optional, default = false) Override the target element if already set.
- `name`: (Optional) Name of the processor
- `is_enabled`: (Optional, default = false) If the processor is enabled or not.
- category_processor
- `target`: (Required) Name of the target attribute whose value is defined by the matching category.
- `target`: (Required) Name of the target attribute whose value is defined by the matching category.`
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like an unintended change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes thanks 👌

docs/resources/logs_custom_pipeline.md Outdated Show resolved Hide resolved
@vinckama vinckama force-pushed the vincent.roy/logs_pipelines/add_target_format branch from 8649967 to 0d3f676 Compare October 8, 2020 13:58
@therve
Copy link
Contributor

therve commented Oct 8, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@therve therve merged commit e9bfda8 into master Oct 8, 2020
@therve therve deleted the vincent.roy/logs_pipelines/add_target_format branch October 8, 2020 18:04
@gmetzker
Copy link

Any idea when this might be released? This feature is exactly what I was hunting for in the docs.

@therve
Copy link
Contributor

therve commented Oct 14, 2020

Hello, we'll release in the next few weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants