Skip to content

Adding unaggregated parameter to events.GetEvents - #203

Open
EricByers wants to merge 3 commits into
zorkian:masterfrom
EricByers:master
Open

Adding unaggregated parameter to events.GetEvents#203
EricByers wants to merge 3 commits into
zorkian:masterfrom
EricByers:master

Conversation

@EricByers

@EricByers EricByers commented Jan 11, 2019

Copy link
Copy Markdown

This PR adds support for unaggregated parameter for query events.

See: https://docs.datadoghq.com/api/?lang=python#query-the-event-stream

This change is not backwards compatible as it changes the function signature. This function could potentially be rewritten to a variadiac to keep it backwards compatible if needed.

Made the new parameter variadic, if more parameters are needed, there would need to be a breaking change (new param or switch to struct), or all the parameters would need to move to be variadic.

@bkabrda

bkabrda commented Feb 3, 2020

Copy link
Copy Markdown
Collaborator

@EricByers hey 👋 thanks for sending the PR. I'd much rather have a new method, e.g. GetEventsWithAggregation(start, end int, priority, sources, tags string, unaggregated bool) and keep the old function intact. I do understand that the variadic argument helps here, but I don't think that this solution scales well with potential new arguments.

The old GetEvents function could then just be a proxy to the new one, calling it with unaggregated=false. WDYT?

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.

2 participants