Skip to content

Commit a29d22c

Browse files
ryantanakaRyan Tanaka
andauthored
feat: add telemetry emitter to ScriptProcessor and FrameworkProcessor run methods (#5697)
Co-authored-by: Ryan Tanaka <rrtanaka@amazon.com>
1 parent e161199 commit a29d22c

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

sagemaker-core/src/sagemaker/core/processing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@
7777
from sagemaker.core.workflow.execution_variables import ExecutionVariables
7878
from sagemaker.core.workflow.functions import Join
7979
from sagemaker.core.workflow.pipeline_context import runnable_by_pipeline
80+
from sagemaker.core.telemetry.telemetry_logging import _telemetry_emitter
81+
from sagemaker.core.telemetry.constants import Feature
8082

8183
from sagemaker.core._studio import _append_project_tags
8284
from sagemaker.core.config.config_utils import _append_sagemaker_config_tags
@@ -771,6 +773,7 @@ def __init__(
771773
network_config=network_config,
772774
)
773775

776+
@_telemetry_emitter(feature=Feature.PROCESSING, func_name="ScriptProcessor.run")
774777
@runnable_by_pipeline
775778
def run(
776779
self,
@@ -1171,6 +1174,7 @@ def _package_code(
11711174
os.unlink(tmp.name)
11721175
return s3_uri
11731176

1177+
@_telemetry_emitter(feature=Feature.PROCESSING, func_name="FrameworkProcessor.run")
11741178
@runnable_by_pipeline
11751179
def run(
11761180
self,

sagemaker-core/src/sagemaker/core/telemetry/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class Feature(Enum):
2929
MODEL_CUSTOMIZATION = 15
3030
MLOPS = 16
3131
FEATURE_STORE = 17
32+
PROCESSING = 18
3233

3334
def __str__(self): # pylint: disable=E0307
3435
"""Return the feature name."""

sagemaker-core/src/sagemaker/core/telemetry/telemetry_logging.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
str(Feature.MODEL_CUSTOMIZATION): 15,
6262
str(Feature.MLOPS): 16,
6363
str(Feature.FEATURE_STORE): 17,
64+
str(Feature.PROCESSING): 18,
6465
}
6566

6667
STATUS_TO_CODE = {

0 commit comments

Comments
 (0)