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 opsgenie sink extra details from alert labels #1587

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

sk4mi
Copy link
Contributor

@sk4mi sk4mi commented Oct 10, 2024

Add feature to allow to add extra properties from alerts label to opsgenie

@CLAassistant
Copy link

CLAassistant commented Oct 10, 2024

CLA assistant check
All committers have signed the CLA.

@sk4mi sk4mi force-pushed the opsgenie-sink-extra-properties branch from 2fc8f99 to 5ebb2ce Compare October 10, 2024 12:19
Copy link
Contributor

@arikalon1 arikalon1 left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @sk4mi

Left 2 minor comments
Can you please check it?

@@ -96,6 +94,23 @@ def __to_description(self, finding: Finding, platform_enabled: bool) -> str:

return f"{description}{self.__enrichments_as_text(finding.enrichments)}"

def __to_details(self, finding: Finding, platform_enabled: bool) -> dict:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the platform_enabled parameter is not used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, removed

}
lower_details_key = [k.lower() for k in details.keys()]
# Add extra details labels from config extra_details_labels if it exists
# without alterate details already present
Copy link
Contributor

Choose a reason for hiding this comment

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

I think there's a typo in the comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I rephrase it a little

@sk4mi sk4mi force-pushed the opsgenie-sink-extra-properties branch from 5ebb2ce to 8245fb6 Compare October 17, 2024 14:28
@sk4mi sk4mi force-pushed the opsgenie-sink-extra-properties branch from 8245fb6 to 09c3fb4 Compare October 18, 2024 12:20
Copy link
Contributor

@arikalon1 arikalon1 left a comment

Choose a reason for hiding this comment

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

nice and clean!
Thanks for your contribution @sk4mi

@arikalon1 arikalon1 merged commit 5e9f5e4 into robusta-dev:master Oct 21, 2024
3 checks passed
@arikalon1
Copy link
Contributor

Hi @sk4mi

Can you please share an example of how you are configuring the extra labels?
Is it an array?

I'd like to fix this issue (#1635 ) and I don't want to break the existing behavior

@sk4mi
Copy link
Contributor Author

sk4mi commented Nov 20, 2024

Hi @sk4mi

Can you please share an example of how you are configuring the extra labels? Is it an array?

I'd like to fix this issue (#1635 ) and I don't want to break the existing behavior

Sorry for bug introduce... I fix it here #1639

I mixed up two versions of my work into one commit...

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

Successfully merging this pull request may close these issues.

3 participants