Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from azure.ai.ml._restclient.v2022_10_01_preview import AzureMachineLearningWorkspaces as ServiceClient102022Preview
from azure.ai.ml._restclient.v2022_10_01 import AzureMachineLearningWorkspaces as ServiceClient102022
from azure.ai.ml._scope_dependent_operations import OperationConfig, OperationsContainer, OperationScope
from azure.ai.ml._telemetry.logging_handler import get_appinsights_log_handler
from azure.ai.ml._user_agent import USER_AGENT
from azure.ai.ml._utils._http_utils import HttpPipeline
from azure.ai.ml._utils._registry_utils import RegistryDiscovery
Expand Down Expand Up @@ -198,7 +197,6 @@ def __init__(
kwargs.pop("base_url", None)
_add_user_agent(kwargs)

user_agent = None
properties = {
"subscription_id": subscription_id,
"resource_group_name": resource_group_name,
Expand All @@ -207,10 +205,13 @@ def __init__(
properties.update({"workspace_name": workspace_name})
if registry_name:
properties.update({"registry_name": registry_name})
if "user_agent" in kwargs:
user_agent = kwargs.get("user_agent")
app_insights_handler = get_appinsights_log_handler(user_agent, **{"properties": properties})
app_insights_handler_kwargs = {"app_insights_handler": app_insights_handler}

# user_agent = None
# if "user_agent" in kwargs:
# user_agent = kwargs.get("user_agent")
# app_insights_handler = get_appinsights_log_handler(user_agent, **{"properties": properties})
# app_insights_handler_kwargs = {"app_insights_handler": app_insights_handler}
app_insights_handler_kwargs = {}

base_url = _get_base_url_from_metadata(cloud_name=cloud_name, is_local_mfe=True)
self._base_url = base_url
Expand Down
16 changes: 8 additions & 8 deletions sdk/ml/azure-ai-ml/azure/ai/ml/_telemetry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

__path__ = __import__("pkgutil").extend_path(__path__, __name__)

from .activity import ActivityType, log_activity, monitor_with_activity, monitor_with_telemetry_mixin
from .logging_handler import AML_INTERNAL_LOGGER_NAMESPACE, get_appinsights_log_handler
# from .activity import ActivityType, log_activity, monitor_with_activity, monitor_with_telemetry_mixin
# from .logging_handler import AML_INTERNAL_LOGGER_NAMESPACE, get_appinsights_log_handler

__all__ = [
"monitor_with_activity",
"monitor_with_telemetry_mixin",
"log_activity",
"ActivityType",
"get_appinsights_log_handler",
"AML_INTERNAL_LOGGER_NAMESPACE",
# "monitor_with_activity",
# "monitor_with_telemetry_mixin",
# "log_activity",
# "ActivityType",
# "get_appinsights_log_handler",
# "AML_INTERNAL_LOGGER_NAMESPACE",
]
Loading