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: gRPC tracking #3015

Merged
merged 7 commits into from Sep 27, 2022
Merged

feat: gRPC tracking #3015

merged 7 commits into from Sep 27, 2022

Conversation

aarnphm
Copy link
Member

@aarnphm aarnphm commented Sep 20, 2022

Signed-off-by: Aaron Pham 29749331+aarnphm@users.noreply.github.com

What does this PR address?

Fixes #2991
Depends on #2984

Before submitting:

@aarnphm aarnphm requested review from ssheng, parano and a team as code owners September 20, 2022 00:23
@aarnphm aarnphm requested review from bojiang and removed request for a team September 20, 2022 00:23
Comment on lines +358 to +366
Example Usage: (To reuse the container based on the same image)

.. code-block:: python

@cached_contextmanager("{docker_image.id}")
def start_docker_container_from_image(docker_image, timeout=60):
container = ...
yield container
container.stop()
Copy link
Member Author

Choose a reason for hiding this comment

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

update documentation how to use this decorator.

Comment on lines +69 to +74
if get_debug_mode():
logger.error(
f"Tracking Error: {err}", stack_info=True, stacklevel=3
)
else:
logger.info(f"Tracking Error: {err}")
Copy link
Member Author

Choose a reason for hiding this comment

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

Showing stack when BENTOML_DEBUG=True

@aarnphm aarnphm force-pushed the grpc/tracking branch 3 times, most recently from 01bc401 to 91493b2 Compare September 20, 2022 09:49
@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Merging #3015 (60d0b9e) into main (9653402) will increase coverage by 0.04%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3015      +/-   ##
==========================================
+ Coverage   62.29%   62.33%   +0.04%     
==========================================
  Files         131      132       +1     
  Lines       11321    11522     +201     
  Branches     1873     1983     +110     
==========================================
+ Hits         7052     7182     +130     
- Misses       3842     3905      +63     
- Partials      427      435       +8     
Impacted Files Coverage Δ
bentoml/serve.py 35.01% <0.00%> (ø)
bentoml/start.py 58.77% <0.00%> (ø)
bentoml/_internal/server/metrics/prometheus.py 80.82% <75.00%> (+1.36%) ⬆️
bentoml/_internal/utils/__init__.py 63.27% <88.23%> (-6.95%) ⬇️
bentoml/_internal/utils/analytics/usage_stats.py 95.69% <94.44%> (+1.65%) ⬆️
bentoml/_internal/utils/analytics/schemas.py 94.52% <100.00%> (+0.15%) ⬆️
bentoml/_internal/configuration/containers.py 69.29% <0.00%> (-1.96%) ⬇️
bentoml/_internal/configuration/__init__.py 70.88% <0.00%> (-0.74%) ⬇️
bentoml/bentos.py 66.95% <0.00%> (ø)
... and 3 more

@aarnphm aarnphm force-pushed the grpc/tracking branch 2 times, most recently from 0c9481a to 23f7492 Compare September 20, 2022 23:08
@@ -56,6 +56,7 @@ def prometheus_client(self):

# step 2:
import prometheus_client
import prometheus_client.parser
Copy link
Member Author

Choose a reason for hiding this comment

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

This changes is to make sure we don't import prometheus_client.parser again.

Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
@ssheng ssheng merged commit 76ade96 into bentoml:main Sep 27, 2022
@aarnphm aarnphm deleted the grpc/tracking branch September 27, 2022 20:56
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.

chore: tracking for gRPC
2 participants