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

Adding unaggregated parameter to events.GetEvents #203

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

EricByers
Copy link

@EricByers EricByers commented Jan 11, 2019

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
Copy link
Collaborator

bkabrda commented Feb 3, 2020

@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