Skip to content

Commit

Permalink
Log starts and completions
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhu committed Feb 4, 2022
1 parent c8922b3 commit cba2eba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion metadata-ingestion/src/datahub/telemetry/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ def ping(
def with_telemetry(func: Callable[..., T]) -> Callable[..., T]:
@wraps(func)
def wrapper(*args: Any, **kwargs: Any) -> Any:
telemetry_instance.ping(func.__module__, func.__name__, "started")
res = func(*args, **kwargs)
telemetry_instance.ping(func.__module__, func.__name__)
telemetry_instance.ping(func.__module__, func.__name__, "completed")
return res

return wrapper

0 comments on commit cba2eba

Please sign in to comment.