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

Initial prototype of telemetry hook #7443

Closed

Conversation

sfc-gh-jkew
Copy link
Contributor

What do these changes do?

  • first commit message and PR title follow format outlined here

    NOTE: If you edit the PR title to match this format, you need to add another commit (even if it's empty) or amend your last commit for the CI job that checks the PR title to pick up the new PR title.

  • passes flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
  • passes black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
  • signed commit with git commit -s
  • Resolves #?
  • tests added and passing
  • module layout described at docs/development/architecture.rst is up-to-date

@sfc-gh-jkew sfc-gh-jkew deleted the jkew/telemetry-registry branch February 14, 2025 19:42
@@ -20,4 +20,7 @@
"get_logger",
"enable_logging",
"disable_logging",
"emit_telemetry_event",

Check failure

Code scanning / CodeQL

Explicit export is not defined Error

The name 'emit_telemetry_event' is exported by __all__ but is not defined.
@@ -20,4 +20,7 @@
"get_logger",
"enable_logging",
"disable_logging",
"emit_telemetry_event",
"add_telemetry_handler",

Check failure

Code scanning / CodeQL

Explicit export is not defined Error

The name 'add_telemetry_handler' is exported by __all__ but is not defined.
@@ -20,4 +20,7 @@
"get_logger",
"enable_logging",
"disable_logging",
"emit_telemetry_event",
"add_telemetry_handler",
"clear_telemetry_handler"

Check failure

Code scanning / CodeQL

Explicit export is not defined Error

The name 'clear_telemetry_handler' is exported by __all__ but is not defined.
try:
result = obj(*args, **kwargs)
emit_telemetry_event('', api_call_name, time.time() - start_time)

Check failure

Code scanning / CodeQL

Wrong number of arguments in a call Error

Call to
function emit_telemetry_event
with too many arguments; should be no more than 2.
# to collect discrete data on how modin is performing at the
# high level moden layer.
def emit_telemetry_event(msg:str, value:int|float):
_telemetry_handlers

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
try:
with timeout(seconds=1):
fn(f"modin::{msg}", value)
except:

Check notice

Code scanning / CodeQL

Except block handles 'BaseException' Note

Except block directly handles BaseException.
except:
logging.ERROR("telemetry handler threw exception, removing handler: " + e)
_telemetry_handlers.remove(fn)
pass

Check warning

Code scanning / CodeQL

Unnecessary pass Warning

Unnecessary 'pass' statement.
_telemetry_handlers.append(handler)

def clear_telemetry_handler(handler):
_telemetry_handlers = []

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable _telemetry_handlers is not used.
@sfc-gh-jkew sfc-gh-jkew restored the jkew/telemetry-registry branch February 17, 2025 17:23
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