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

Update Telemetry env variable. #2356

Merged
merged 9 commits into from
Jun 13, 2023
Merged

Conversation

chen3933
Copy link
Contributor

Description

Please read our CONTRIBUTING.md prior to creating your first pull request.

Please include a summary of the feature or issue being fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #(issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [x ] New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Feature/Issue validation/testing

Please describe the Unit or Integration tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

  • Test A
    Logs for Test A

  • Test B
    Logs for Test B

Checklist:

  • Did you have fun?
  • Have you added tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Merging #2356 (c1a799e) into master (89fbd88) will decrease coverage by 0.09%.
The diff coverage is n/a.

❗ Current head c1a799e differs from pull request most recent head 45587d2. Consider uploading reports for the commit 45587d2 to get more accurate results

@@            Coverage Diff             @@
##           master    #2356      +/-   ##
==========================================
- Coverage   72.01%   71.92%   -0.09%     
==========================================
  Files          78       78              
  Lines        3648     3648              
  Branches       58       58              
==========================================
- Hits         2627     2624       -3     
- Misses       1017     1020       +3     
  Partials        4        4              

see 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@namannandan namannandan requested a review from lxning May 25, 2023 22:39
Comment on lines 181 to 183
if (java.lang.System.getenv("SM_TELEMETRY_LOG_REV_2022_12") != null) {
loggerTelemetryMetrics.info("Telemetry enabled.");
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this log is needed at here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This logging message will help us to get endpoint name using TS for query total invoke account (in the case of no error log being generated.)

@@ -283,15 +285,15 @@ public void run() {
} catch (OutOfMemoryError oom) {
logger.error("Out of memory error when creating workers", oom);
status = HttpURLConnection.HTTP_ENTITY_TOO_LARGE;
if (java.lang.System.getenv("SM_TELEMETRY_LOG") != null) {
if (java.lang.System.getenv("SM_TELEMETRY_LOG_REV_2022_12") != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why need get and check this env var everywhere? It only needs once and simply flag can be applied.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

loggerTelemetryMetrics.info(
"ModelServerError.Count:1|#TorchServe:{},{}:-1",
ConfigManager.getInstance().getVersion(),
oom.getClass().getCanonicalName());
}
} catch (Throwable t) {
logger.warn("Backend worker thread exception.", t);
if (java.lang.System.getenv("SM_TELEMETRY_LOG") != null) {
if (java.lang.System.getenv("SM_TELEMETRY_LOG_REV_2022_12") != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto

Copy link
Collaborator

@maaquib maaquib left a comment

Choose a reason for hiding this comment

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

LGTM. Just a quick clarification regarding how this env variable is being used

@namannandan namannandan merged commit 7270447 into pytorch:master Jun 13, 2023
12 of 13 checks passed
namannandan added a commit that referenced this pull request Jun 13, 2023
lxning added a commit that referenced this pull request Jun 14, 2023
This reverts commit 7270447.

Co-authored-by: lxning <23464292+lxning@users.noreply.github.com>
Co-authored-by: Ankith Gunapal <agunapal@ischool.Berkeley.edu>
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.

None yet

4 participants