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

feat(instrumentation-grpc): monitor error events with events.errorMonitor #5369

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Jan 24, 2025

Which problem is this PR solving?

errorMonitor should be preferred over 'error' event handlers for instrumentation, as the latter alters the behavior of the server if the user has not added their own error handler.

Related to: #225. I'm not sure we want to close the issue based on this fix.

Short description of the changes

This commit updates instrumentation-grpc to utilize errorMonitor instead of 'error' event handlers. This makes the instrumented server behave more like it would without instrumentation.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Ran the test suite.
  • Added an additional assertion for the 'error' handler count of the server.

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added

@cjihrig cjihrig requested a review from a team as a code owner January 24, 2025 16:12
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.54%. Comparing base (f927e82) to head (ab7dd28).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5369   +/-   ##
=======================================
  Coverage   94.54%   94.54%           
=======================================
  Files         318      318           
  Lines        8052     8053    +1     
  Branches     1694     1694           
=======================================
+ Hits         7613     7614    +1     
  Misses        439      439           
Files with missing lines Coverage Δ
...ntelemetry-instrumentation-grpc/src/serverUtils.ts 90.66% <100.00%> (+0.12%) ⬆️

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.

1 participant