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

cf events: make returned item count and/or time span set able by command flags / arguments #2084

Open
ipa-bak opened this issue Oct 18, 2020 · 3 comments
Assignees

Comments

@ipa-bak
Copy link

ipa-bak commented Oct 18, 2020

What's the user value of this feature request?

Developers and cloud admins can easily review app events in controlled manner. They can receive the needed set of events instead of a "random" (actually the last 50, what ever is recorded in these) subset.

Currently the first "page" (defaulting to fifty items) is returned, which might span a few minutes to days, depending on app activity. This does not allow investigating any specific problem with an app, unless it by chance falls within those last 50 events.

Who is the functionality for?
Mostly app developers, but also cloud operators.

How often will this functionality be used by the user?
While developing an app more or less frequently, depending of development and testing proceedings.

Who else is affected by the change?
This issue requests adding additions flags to the cf events command. It does not change existing behavior and so should not be able to break anything nor have any other negative impact on other users.

Is your feature request related to a problem? Please describe.
I am unable to review any app relate activity (pushes, starts/stops, crashes) outside the random time span that fits into the default first 50 lines from the event log. Specifically I had no simple way to figure out when an app started to frequently crash, restart and crash again.

Describe the solution you'd like
The cf events command should have optional arguments that allow to set the number of events to return. It should also gain options to specify the time span to return.

  • cf events APP_NAME [ --num-events <integer> ]
    return at most <interger> events from the event log, starting with the most recent event.
  • cf events APP_NAME [ --before <time specification> ]
    return the default number of events (or number given by --num-events) that happened strictly before the given time specification
  • cf events APP_NAME [ --after <time specification> ]
    return the default number of events (or number given by --num-events) that happened strictly after the given time specification, counting from the oldest event younger than <time specification> toward newer items

The <time specification> should follow usual format: yyyy-mm-dd HH:MM:SS

If both --before and --after are given, any additional --num-events should be ignored and the events in the given time span should be returned. Specifying an --after and --before time specification where the --after time specification newer than the --before time specification should be flagged as an error.

At least the first variant can probably be implemented with minimal changes, by passing an additional ccv3.PerPage parameter in line 32 of actor/v7action/event.go b/actor/v7action/event.go

Describe alternatives you've considered
I can not think of any alternative to achieve a similar result, i.e. ability to look a specific events for an app.

Additional context
No additional context.

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/175322064

The labels on this github issue will be updated when the story is started.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed.

@a-b
Copy link
Member

a-b commented Oct 1, 2024

Thank you for your patience regarding the issue you reported. We will be reviewing your ticket with our product team to assess its impact and potential next steps. Once we have their feedback, we will update you accordingly.

If you have any further questions or additional information to share in the meantime, please feel free to reach out.

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

No branches or pull requests

3 participants