cli icon indicating copy to clipboard operation
cli copied to clipboard

Add plugin execution duration metric

Open krissetto opened this issue 1 year ago • 5 comments

- What I did Added utils for instrumenting plugin commands, and instrumented them to record their execution time.

Note: This is disconnected from the specific metrics and traces created by the plugins themselves and it not meant to replace those, it only represents a measurement of the binary execution of the plugin from the CLI's point of view

- How I did it

  • Added some utils
  • Added wrapper for exec.Cmd to be used for measuring the command's execution time
  • Wired up the utils so plugin execution metrics get sent

- How to verify it

- Description for the changelog

Instrument plugin execution with otel meter

- A picture of a cute animal (not mandatory but encouraged)

pinta

krissetto avatar Apr 30 '24 10:04 krissetto

Codecov Report

Attention: Patch coverage is 2.73973% with 71 lines in your changes missing coverage. Please review.

Project coverage is 61.16%. Comparing base (28c5652) to head (a5644cd). Report is 456 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5046      +/-   ##
==========================================
- Coverage   61.33%   61.16%   -0.18%     
==========================================
  Files         298      298              
  Lines       20692    20750      +58     
==========================================
  Hits        12691    12691              
- Misses       7100     7158      +58     
  Partials      901      901              

codecov-commenter avatar Apr 30 '24 10:04 codecov-commenter

The first commit is from here, for the sake of testing

krissetto avatar May 13 '24 13:05 krissetto

@krissetto Please rebase :)

vvoland avatar May 15 '24 10:05 vvoland

will fix this soon

krissetto avatar May 15 '24 17:05 krissetto

needs a rebase @krissetto 🙈

thaJeztah avatar Jun 12 '24 12:06 thaJeztah