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

enhancement: Add events for starting, stopping, and reloading #3476

Merged
merged 5 commits into from Aug 19, 2020

Conversation

ktff
Copy link
Contributor

@ktff ktff commented Aug 16, 2020

Closes #3448.

Added events emit:

  • Vector is starting.
  • Vector is reloading.
  • Vector is stopping.

logs respectively. This differs from what it used to be, but it reflects the metrics and is more streamlined.

Open questions

  • logs are emitted under fixed target = "vector" to avoid vector::internal_events::process: being logged as the call site. Haven't seen what's our stance on that. It should be possible to extend emit! macro to set target as the actual emit site, or is this the intended behavior? (Edit: it should be fine to use target for now)

  • Should we use lowercase vector ? (Edit: use Vector for emphasis)

Signed-off-by: ktf <krunotf@gmail.com>
@ktff ktff added type: enhancement A value-adding code change that enhances its existing functionality. domain: observability Anything related to monitoring/observing Vector labels Aug 16, 2020
@ktff ktff requested a review from lukesteensen August 16, 2020 22:25
@ktff ktff self-assigned this Aug 16, 2020
src/main.rs Outdated Show resolved Hide resolved
Copy link
Member

@lukesteensen lukesteensen left a comment

Choose a reason for hiding this comment

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

Looking at this again and taking @jamtur01's comment into account, I'm starting to think that it's worth differentiating between normal graceful shutdowns and the immediate forced shutdown. That would clear up the code path confusion and give us higher quality information about what's happening with the process.

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
@ktff
Copy link
Contributor Author

ktff commented Aug 19, 2020

Going with the theme of past tense, the points of emissions have been moved to reflect this.


Regarding the shutdown event, I've added a fix to the internal_metrics source because, as it is, we almost for certain won't capture it before we shutdown the source. So I've added a fix for it.

@lukesteensen this ties into immediate forced shutdown, it is highly unlikely that any event emitted on that path will be propagated further than internal_metrics source even with the fix. So I think it's better without as it would be unreliable.


There are also errors in main which we could turn into events.

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
@ktff ktff merged commit 5f6ce7c into master Aug 19, 2020
@ktff ktff deleted the ktff/process_inst branch August 19, 2020 20:25
leebenson pushed a commit that referenced this pull request Aug 27, 2020
* Add process events

Signed-off-by: ktf <krunotf@gmail.com>

* Use past tense

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>

* One last metric capture

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>

* One more move

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>

* Remove unused use

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
StephenWakely pushed a commit to StephenWakely/vector that referenced this pull request Aug 30, 2020
…dotdev#3476)

* Add process events

Signed-off-by: ktf <krunotf@gmail.com>

* Use past tense

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>

* One last metric capture

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>

* One more move

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>

* Remove unused use

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
mengesb pushed a commit to jacobbraaten/vector that referenced this pull request Dec 9, 2020
…dotdev#3476)

* Add process events

Signed-off-by: ktf <krunotf@gmail.com>

* Use past tense

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>

* One last metric capture

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>

* One more move

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>

* Remove unused use

Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
Signed-off-by: Brian Menges <brian.menges@anaplan.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: observability Anything related to monitoring/observing Vector type: enhancement A value-adding code change that enhances its existing functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define events for starting, stopping, and reloading
4 participants