aboutsummaryrefslogtreecommitdiff
path: root/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated
diff options
context:
space:
mode:
Diffstat (limited to '.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated')
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/__init__.py17
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_azure_monitor_client.py92
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_configuration.py58
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_patch.py32
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_vendor.py16
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/__init__.py17
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/_azure_monitor_client.py74
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/_configuration.py46
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/_patch.py32
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/operations/__init__.py13
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/operations/_azure_monitor_client_operations.py102
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/__init__.py73
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/_azure_monitor_client_enums.py60
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/_models.py1167
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/_models_py3.py1342
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/operations/__init__.py13
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/operations/_azure_monitor_client_operations.py140
-rw-r--r--.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/py.typed1
18 files changed, 3295 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/__init__.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/__init__.py
new file mode 100644
index 00000000..6d010691
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/__init__.py
@@ -0,0 +1,17 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from ._azure_monitor_client import AzureMonitorClient
+
+__all__ = ["AzureMonitorClient"]
+
+# `._patch.py` is used for handwritten extensions to the generated code
+# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
+from ._patch import patch_sdk
+
+patch_sdk()
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_azure_monitor_client.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_azure_monitor_client.py
new file mode 100644
index 00000000..6ea083bb
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_azure_monitor_client.py
@@ -0,0 +1,92 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from copy import deepcopy
+from typing import TYPE_CHECKING
+
+from msrest import Deserializer, Serializer
+
+from azure.core import PipelineClient
+
+from . import models
+from ._configuration import AzureMonitorClientConfiguration
+from .operations import AzureMonitorClientOperationsMixin
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from typing import Any
+
+ from azure.core.rest import HttpRequest, HttpResponse
+
+
+class AzureMonitorClient(AzureMonitorClientOperationsMixin):
+ """OpenTelemetry Exporter for Azure Monitor.
+
+ :param host: Breeze endpoint: https://dc.services.visualstudio.com. Default value is
+ "https://dc.services.visualstudio.com".
+ :type host: str
+ """
+
+ def __init__(
+ self,
+ host="https://dc.services.visualstudio.com", # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ _base_url = "{Host}/v2.1"
+ self._config = AzureMonitorClientConfiguration(host=host, **kwargs)
+ self._client = PipelineClient(base_url=_base_url, config=self._config, **kwargs)
+
+ client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
+ self._serialize = Serializer(client_models)
+ self._deserialize = Deserializer(client_models)
+ self._serialize.client_side_validation = False
+
+ def _send_request(
+ self,
+ request, # type: HttpRequest
+ **kwargs # type: Any
+ ):
+ # type: (...) -> HttpResponse
+ """Runs the network request through the client's chained policies.
+
+ >>> from azure.core.rest import HttpRequest
+ >>> request = HttpRequest("GET", "https://www.example.org/")
+ <HttpRequest [GET], url: 'https://www.example.org/'>
+ >>> response = client._send_request(request)
+ <HttpResponse: 200 OK>
+
+ For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
+
+ :param request: The network request you want to make. Required.
+ :type request: ~azure.core.rest.HttpRequest
+ :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
+ :return: The response of your network call. Does not do error handling on your response.
+ :rtype: ~azure.core.rest.HttpResponse
+ """
+
+ request_copy = deepcopy(request)
+ path_format_arguments = {
+ "Host": self._serialize.url("self._config.host", self._config.host, "str", skip_quote=True),
+ }
+
+ request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
+ return self._client.send_request(request_copy, **kwargs)
+
+ def close(self):
+ # type: () -> None
+ self._client.close()
+
+ def __enter__(self):
+ # type: () -> AzureMonitorClient
+ self._client.__enter__()
+ return self
+
+ def __exit__(self, *exc_details):
+ # type: (Any) -> None
+ self._client.__exit__(*exc_details)
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_configuration.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_configuration.py
new file mode 100644
index 00000000..8fa05dbe
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_configuration.py
@@ -0,0 +1,58 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from typing import TYPE_CHECKING
+
+from azure.core.configuration import Configuration
+from azure.core.pipeline import policies
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from typing import Any
+
+VERSION = "unknown"
+
+
+class AzureMonitorClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
+ """Configuration for AzureMonitorClient.
+
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param host: Breeze endpoint: https://dc.services.visualstudio.com. Default value is
+ "https://dc.services.visualstudio.com".
+ :type host: str
+ """
+
+ def __init__(
+ self,
+ host="https://dc.services.visualstudio.com", # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ super(AzureMonitorClientConfiguration, self).__init__(**kwargs)
+ if host is None:
+ raise ValueError("Parameter 'host' must not be None.")
+
+ self.host = host
+ kwargs.setdefault("sdk_moniker", "azuremonitorclient/{}".format(VERSION))
+ self._configure(**kwargs)
+
+ def _configure(
+ self, **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
+ self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
+ self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
+ self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
+ self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs)
+ self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
+ self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
+ self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
+ self.authentication_policy = kwargs.get("authentication_policy")
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_patch.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_patch.py
new file mode 100644
index 00000000..17dbc073
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_patch.py
@@ -0,0 +1,32 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+#
+# Copyright (c) Microsoft Corporation. All rights reserved.
+#
+# The MIT License (MIT)
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the ""Software""), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+#
+# --------------------------------------------------------------------------
+
+
+# This file is used for handwritten extensions to the generated code. Example:
+# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
+def patch_sdk():
+ pass
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_vendor.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_vendor.py
new file mode 100644
index 00000000..0dafe0e2
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/_vendor.py
@@ -0,0 +1,16 @@
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.core.pipeline.transport import HttpRequest
+
+
+def _convert_request(request, files=None):
+ data = request.content if not files else None
+ request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
+ if files:
+ request.set_formdata_body(files)
+ return request
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/__init__.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/__init__.py
new file mode 100644
index 00000000..6d010691
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/__init__.py
@@ -0,0 +1,17 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from ._azure_monitor_client import AzureMonitorClient
+
+__all__ = ["AzureMonitorClient"]
+
+# `._patch.py` is used for handwritten extensions to the generated code
+# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
+from ._patch import patch_sdk
+
+patch_sdk()
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/_azure_monitor_client.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/_azure_monitor_client.py
new file mode 100644
index 00000000..e829f0d4
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/_azure_monitor_client.py
@@ -0,0 +1,74 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from copy import deepcopy
+from typing import Any, Awaitable
+
+from msrest import Deserializer, Serializer
+
+from azure.core import AsyncPipelineClient
+from azure.core.rest import AsyncHttpResponse, HttpRequest
+
+from .. import models
+from ._configuration import AzureMonitorClientConfiguration
+from .operations import AzureMonitorClientOperationsMixin
+
+
+class AzureMonitorClient(AzureMonitorClientOperationsMixin):
+ """OpenTelemetry Exporter for Azure Monitor.
+
+ :param host: Breeze endpoint: https://dc.services.visualstudio.com. Default value is
+ "https://dc.services.visualstudio.com".
+ :type host: str
+ """
+
+ def __init__(self, host: str = "https://dc.services.visualstudio.com", **kwargs: Any) -> None:
+ _base_url = "{Host}/v2.1"
+ self._config = AzureMonitorClientConfiguration(host=host, **kwargs)
+ self._client = AsyncPipelineClient(base_url=_base_url, config=self._config, **kwargs)
+
+ client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
+ self._serialize = Serializer(client_models)
+ self._deserialize = Deserializer(client_models)
+ self._serialize.client_side_validation = False
+
+ def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
+ """Runs the network request through the client's chained policies.
+
+ >>> from azure.core.rest import HttpRequest
+ >>> request = HttpRequest("GET", "https://www.example.org/")
+ <HttpRequest [GET], url: 'https://www.example.org/'>
+ >>> response = await client._send_request(request)
+ <AsyncHttpResponse: 200 OK>
+
+ For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
+
+ :param request: The network request you want to make. Required.
+ :type request: ~azure.core.rest.HttpRequest
+ :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
+ :return: The response of your network call. Does not do error handling on your response.
+ :rtype: ~azure.core.rest.AsyncHttpResponse
+ """
+
+ request_copy = deepcopy(request)
+ path_format_arguments = {
+ "Host": self._serialize.url("self._config.host", self._config.host, "str", skip_quote=True),
+ }
+
+ request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
+ return self._client.send_request(request_copy, **kwargs)
+
+ async def close(self) -> None:
+ await self._client.close()
+
+ async def __aenter__(self) -> "AzureMonitorClient":
+ await self._client.__aenter__()
+ return self
+
+ async def __aexit__(self, *exc_details) -> None:
+ await self._client.__aexit__(*exc_details)
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/_configuration.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/_configuration.py
new file mode 100644
index 00000000..1bc76b30
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/_configuration.py
@@ -0,0 +1,46 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from typing import Any
+
+from azure.core.configuration import Configuration
+from azure.core.pipeline import policies
+
+VERSION = "unknown"
+
+
+class AzureMonitorClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
+ """Configuration for AzureMonitorClient.
+
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param host: Breeze endpoint: https://dc.services.visualstudio.com. Default value is
+ "https://dc.services.visualstudio.com".
+ :type host: str
+ """
+
+ def __init__(self, host: str = "https://dc.services.visualstudio.com", **kwargs: Any) -> None:
+ super(AzureMonitorClientConfiguration, self).__init__(**kwargs)
+ if host is None:
+ raise ValueError("Parameter 'host' must not be None.")
+
+ self.host = host
+ kwargs.setdefault("sdk_moniker", "azuremonitorclient/{}".format(VERSION))
+ self._configure(**kwargs)
+
+ def _configure(self, **kwargs: Any) -> None:
+ self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
+ self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
+ self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
+ self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
+ self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs)
+ self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs)
+ self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
+ self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs)
+ self.authentication_policy = kwargs.get("authentication_policy")
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/_patch.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/_patch.py
new file mode 100644
index 00000000..17dbc073
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/_patch.py
@@ -0,0 +1,32 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+#
+# Copyright (c) Microsoft Corporation. All rights reserved.
+#
+# The MIT License (MIT)
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the ""Software""), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+#
+# --------------------------------------------------------------------------
+
+
+# This file is used for handwritten extensions to the generated code. Example:
+# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
+def patch_sdk():
+ pass
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/operations/__init__.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/operations/__init__.py
new file mode 100644
index 00000000..a1b6ce78
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/operations/__init__.py
@@ -0,0 +1,13 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from ._azure_monitor_client_operations import AzureMonitorClientOperationsMixin
+
+__all__ = [
+ "AzureMonitorClientOperationsMixin",
+]
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/operations/_azure_monitor_client_operations.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/operations/_azure_monitor_client_operations.py
new file mode 100644
index 00000000..72c70dab
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/aio/operations/_azure_monitor_client_operations.py
@@ -0,0 +1,102 @@
+# pylint: disable=too-many-lines
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, Callable, Dict, List, Optional, TypeVar
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.rest import HttpRequest
+
+from ... import models as _models
+from ..._vendor import _convert_request
+from ...operations._azure_monitor_client_operations import build_track_request
+
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class AzureMonitorClientOperationsMixin:
+
+ async def track(self, body: List["_models.TelemetryItem"], **kwargs: Any) -> "_models.TrackResponse":
+ """Track telemetry events.
+
+ This operation sends a sequence of telemetry events that will be monitored by Azure Monitor.
+
+ :param body: The list of telemetry events to track.
+ :type body: list[~azure_monitor_client.models.TelemetryItem]
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: TrackResponse, or the result of cls(response)
+ :rtype: ~azure_monitor_client.models.TrackResponse
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop("cls", None) # type: ClsType["_models.TrackResponse"]
+ error_map = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 400: lambda response: HttpResponseError(
+ response=response, model=self._deserialize(_models.TrackResponse, response)
+ ),
+ 402: lambda response: HttpResponseError(
+ response=response, model=self._deserialize(_models.TrackResponse, response)
+ ),
+ 429: lambda response: HttpResponseError(
+ response=response, model=self._deserialize(_models.TrackResponse, response)
+ ),
+ 500: lambda response: HttpResponseError(
+ response=response, model=self._deserialize(_models.TrackResponse, response)
+ ),
+ 503: lambda response: HttpResponseError(
+ response=response, model=self._deserialize(_models.TrackResponse, response)
+ ),
+ }
+ error_map.update(kwargs.pop("error_map", {}))
+
+ content_type = kwargs.pop("content_type", "application/json") # type: Optional[str]
+
+ _json = self._serialize.body(body, "[TelemetryItem]")
+
+ request = build_track_request(
+ content_type=content_type,
+ json=_json,
+ template_url=self.track.metadata["url"],
+ )
+ request = _convert_request(request)
+ path_format_arguments = {
+ "Host": self._serialize.url("self._config.host", self._config.host, "str", skip_quote=True),
+ }
+ request.url = self._client.format_url(request.url, **path_format_arguments)
+
+ pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access
+ request, stream=False, **kwargs
+ )
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 206]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize("TrackResponse", pipeline_response)
+
+ if response.status_code == 206:
+ deserialized = self._deserialize("TrackResponse", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ track.metadata = {"url": "/track"} # type: ignore
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/__init__.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/__init__.py
new file mode 100644
index 00000000..2f29230e
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/__init__.py
@@ -0,0 +1,73 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+try:
+ from ._models_py3 import AvailabilityData
+ from ._models_py3 import MessageData
+ from ._models_py3 import MetricDataPoint
+ from ._models_py3 import MetricsData
+ from ._models_py3 import MonitorBase
+ from ._models_py3 import MonitorDomain
+ from ._models_py3 import PageViewData
+ from ._models_py3 import PageViewPerfData
+ from ._models_py3 import RemoteDependencyData
+ from ._models_py3 import RequestData
+ from ._models_py3 import StackFrame
+ from ._models_py3 import TelemetryErrorDetails
+ from ._models_py3 import TelemetryEventData
+ from ._models_py3 import TelemetryExceptionData
+ from ._models_py3 import TelemetryExceptionDetails
+ from ._models_py3 import TelemetryItem
+ from ._models_py3 import TrackResponse
+except (SyntaxError, ImportError):
+ from ._models import AvailabilityData # type: ignore
+ from ._models import MessageData # type: ignore
+ from ._models import MetricDataPoint # type: ignore
+ from ._models import MetricsData # type: ignore
+ from ._models import MonitorBase # type: ignore
+ from ._models import MonitorDomain # type: ignore
+ from ._models import PageViewData # type: ignore
+ from ._models import PageViewPerfData # type: ignore
+ from ._models import RemoteDependencyData # type: ignore
+ from ._models import RequestData # type: ignore
+ from ._models import StackFrame # type: ignore
+ from ._models import TelemetryErrorDetails # type: ignore
+ from ._models import TelemetryEventData # type: ignore
+ from ._models import TelemetryExceptionData # type: ignore
+ from ._models import TelemetryExceptionDetails # type: ignore
+ from ._models import TelemetryItem # type: ignore
+ from ._models import TrackResponse # type: ignore
+
+from ._azure_monitor_client_enums import (
+ ContextTagKeys,
+ DataPointType,
+ SeverityLevel,
+)
+
+__all__ = [
+ "AvailabilityData",
+ "MessageData",
+ "MetricDataPoint",
+ "MetricsData",
+ "MonitorBase",
+ "MonitorDomain",
+ "PageViewData",
+ "PageViewPerfData",
+ "RemoteDependencyData",
+ "RequestData",
+ "StackFrame",
+ "TelemetryErrorDetails",
+ "TelemetryEventData",
+ "TelemetryExceptionData",
+ "TelemetryExceptionDetails",
+ "TelemetryItem",
+ "TrackResponse",
+ "ContextTagKeys",
+ "DataPointType",
+ "SeverityLevel",
+]
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/_azure_monitor_client_enums.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/_azure_monitor_client_enums.py
new file mode 100644
index 00000000..cb26c587
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/_azure_monitor_client_enums.py
@@ -0,0 +1,60 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from enum import Enum
+from azure.core import CaseInsensitiveEnumMeta
+
+
+class ContextTagKeys(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The context tag keys."""
+
+ AI_APPLICATION_VER = "ai.application.ver"
+ AI_DEVICE_ID = "ai.device.id"
+ AI_DEVICE_LOCALE = "ai.device.locale"
+ AI_DEVICE_MODEL = "ai.device.model"
+ AI_DEVICE_OEM_NAME = "ai.device.oemName"
+ AI_DEVICE_OS_VERSION = "ai.device.osVersion"
+ AI_DEVICE_TYPE = "ai.device.type"
+ AI_LOCATION_IP = "ai.location.ip"
+ AI_LOCATION_COUNTRY = "ai.location.country"
+ AI_LOCATION_PROVINCE = "ai.location.province"
+ AI_LOCATION_CITY = "ai.location.city"
+ AI_OPERATION_ID = "ai.operation.id"
+ AI_OPERATION_NAME = "ai.operation.name"
+ AI_OPERATION_PARENT_ID = "ai.operation.parentId"
+ AI_OPERATION_SYNTHETIC_SOURCE = "ai.operation.syntheticSource"
+ AI_OPERATION_CORRELATION_VECTOR = "ai.operation.correlationVector"
+ AI_SESSION_ID = "ai.session.id"
+ AI_SESSION_IS_FIRST = "ai.session.isFirst"
+ AI_USER_ACCOUNT_ID = "ai.user.accountId"
+ AI_USER_ID = "ai.user.id"
+ AI_USER_AUTH_USER_ID = "ai.user.authUserId"
+ AI_CLOUD_ROLE = "ai.cloud.role"
+ AI_CLOUD_ROLE_VER = "ai.cloud.roleVer"
+ AI_CLOUD_ROLE_INSTANCE = "ai.cloud.roleInstance"
+ AI_CLOUD_LOCATION = "ai.cloud.location"
+ AI_INTERNAL_SDK_VERSION = "ai.internal.sdkVersion"
+ AI_INTERNAL_AGENT_VERSION = "ai.internal.agentVersion"
+ AI_INTERNAL_NODE_NAME = "ai.internal.nodeName"
+
+
+class DataPointType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Type of the metric data measurement."""
+
+ MEASUREMENT = "Measurement"
+ AGGREGATION = "Aggregation"
+
+
+class SeverityLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Defines the level of severity for the event."""
+
+ VERBOSE = "Verbose"
+ INFORMATION = "Information"
+ WARNING = "Warning"
+ ERROR = "Error"
+ CRITICAL = "Critical"
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/_models.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/_models.py
new file mode 100644
index 00000000..ceaf6119
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/_models.py
@@ -0,0 +1,1167 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.core.exceptions import HttpResponseError
+import msrest.serialization
+
+
+class MonitorDomain(msrest.serialization.Model):
+ """The abstract common base of all domains.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ """
+
+ _validation = {
+ "version": {"required": True},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ """
+ super(MonitorDomain, self).__init__(**kwargs)
+ self.additional_properties = kwargs.get("additional_properties", None)
+ self.version = kwargs.get("version", 2)
+
+
+class AvailabilityData(MonitorDomain):
+ """Instances of AvailabilityData represent the result of executing an availability test.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar id: Required. Identifier of a test run. Use it to correlate steps of test run and
+ telemetry generated by the service.
+ :vartype id: str
+ :ivar name: Required. Name of the test that these availability results represent.
+ :vartype name: str
+ :ivar duration: Required. Duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.
+ :vartype duration: str
+ :ivar success: Required. Success flag.
+ :vartype success: bool
+ :ivar run_location: Name of the location where the test was run from.
+ :vartype run_location: str
+ :ivar message: Diagnostic message for the result.
+ :vartype message: str
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "id": {"required": True, "max_length": 512, "min_length": 0},
+ "name": {"required": True, "max_length": 1024, "min_length": 0},
+ "duration": {"required": True},
+ "success": {"required": True},
+ "run_location": {"max_length": 1024, "min_length": 0},
+ "message": {"max_length": 8192, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "duration": {"key": "duration", "type": "str"},
+ "success": {"key": "success", "type": "bool"},
+ "run_location": {"key": "runLocation", "type": "str"},
+ "message": {"key": "message", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword id: Required. Identifier of a test run. Use it to correlate steps of test run and
+ telemetry generated by the service.
+ :paramtype id: str
+ :keyword name: Required. Name of the test that these availability results represent.
+ :paramtype name: str
+ :keyword duration: Required. Duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000
+ days.
+ :paramtype duration: str
+ :keyword success: Required. Success flag.
+ :paramtype success: bool
+ :keyword run_location: Name of the location where the test was run from.
+ :paramtype run_location: str
+ :keyword message: Diagnostic message for the result.
+ :paramtype message: str
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(AvailabilityData, self).__init__(**kwargs)
+ self.id = kwargs["id"]
+ self.name = kwargs["name"]
+ self.duration = kwargs["duration"]
+ self.success = kwargs["success"]
+ self.run_location = kwargs.get("run_location", None)
+ self.message = kwargs.get("message", None)
+ self.properties = kwargs.get("properties", None)
+ self.measurements = kwargs.get("measurements", None)
+
+
+class MessageData(MonitorDomain):
+ """Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into instances of this type. The message does not have measurements.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar message: Required. Trace message.
+ :vartype message: str
+ :ivar severity_level: Trace severity level. Possible values include: "Verbose", "Information",
+ "Warning", "Error", "Critical".
+ :vartype severity_level: str or ~azure_monitor_client.models.SeverityLevel
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "message": {"required": True, "max_length": 32768, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "message": {"key": "message", "type": "str"},
+ "severity_level": {"key": "severityLevel", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword message: Required. Trace message.
+ :paramtype message: str
+ :keyword severity_level: Trace severity level. Possible values include: "Verbose",
+ "Information", "Warning", "Error", "Critical".
+ :paramtype severity_level: str or ~azure_monitor_client.models.SeverityLevel
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(MessageData, self).__init__(**kwargs)
+ self.message = kwargs["message"]
+ self.severity_level = kwargs.get("severity_level", None)
+ self.properties = kwargs.get("properties", None)
+ self.measurements = kwargs.get("measurements", None)
+
+
+class MetricDataPoint(msrest.serialization.Model):
+ """Metric data single measurement.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar namespace: Namespace of the metric.
+ :vartype namespace: str
+ :ivar name: Required. Name of the metric.
+ :vartype name: str
+ :ivar data_point_type: Metric type. Single measurement or the aggregated value. Possible values
+ include: "Measurement", "Aggregation".
+ :vartype data_point_type: str or ~azure_monitor_client.models.DataPointType
+ :ivar value: Required. Single value for measurement. Sum of individual measurements for the
+ aggregation.
+ :vartype value: float
+ :ivar count: Metric weight of the aggregated metric. Should not be set for a measurement.
+ :vartype count: int
+ :ivar min: Minimum value of the aggregated metric. Should not be set for a measurement.
+ :vartype min: float
+ :ivar max: Maximum value of the aggregated metric. Should not be set for a measurement.
+ :vartype max: float
+ :ivar std_dev: Standard deviation of the aggregated metric. Should not be set for a
+ measurement.
+ :vartype std_dev: float
+ """
+
+ _validation = {
+ "namespace": {"max_length": 256, "min_length": 0},
+ "name": {"required": True, "max_length": 1024, "min_length": 0},
+ "value": {"required": True},
+ }
+
+ _attribute_map = {
+ "namespace": {"key": "ns", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "data_point_type": {"key": "kind", "type": "str"},
+ "value": {"key": "value", "type": "float"},
+ "count": {"key": "count", "type": "int"},
+ "min": {"key": "min", "type": "float"},
+ "max": {"key": "max", "type": "float"},
+ "std_dev": {"key": "stdDev", "type": "float"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword namespace: Namespace of the metric.
+ :paramtype namespace: str
+ :keyword name: Required. Name of the metric.
+ :paramtype name: str
+ :keyword data_point_type: Metric type. Single measurement or the aggregated value. Possible
+ values include: "Measurement", "Aggregation".
+ :paramtype data_point_type: str or ~azure_monitor_client.models.DataPointType
+ :keyword value: Required. Single value for measurement. Sum of individual measurements for the
+ aggregation.
+ :paramtype value: float
+ :keyword count: Metric weight of the aggregated metric. Should not be set for a measurement.
+ :paramtype count: int
+ :keyword min: Minimum value of the aggregated metric. Should not be set for a measurement.
+ :paramtype min: float
+ :keyword max: Maximum value of the aggregated metric. Should not be set for a measurement.
+ :paramtype max: float
+ :keyword std_dev: Standard deviation of the aggregated metric. Should not be set for a
+ measurement.
+ :paramtype std_dev: float
+ """
+ super(MetricDataPoint, self).__init__(**kwargs)
+ self.namespace = kwargs.get("namespace", None)
+ self.name = kwargs["name"]
+ self.data_point_type = kwargs.get("data_point_type", None)
+ self.value = kwargs["value"]
+ self.count = kwargs.get("count", None)
+ self.min = kwargs.get("min", None)
+ self.max = kwargs.get("max", None)
+ self.std_dev = kwargs.get("std_dev", None)
+
+
+class MetricsData(MonitorDomain):
+ """An instance of the Metric item is a list of measurements (single data points) and/or aggregations.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar metrics: Required. List of metrics. Only one metric in the list is currently supported by
+ Application Insights storage. If multiple data points were sent only the first one will be
+ used.
+ :vartype metrics: list[~azure_monitor_client.models.MetricDataPoint]
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "metrics": {"required": True},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "metrics": {"key": "metrics", "type": "[MetricDataPoint]"},
+ "properties": {"key": "properties", "type": "{str}"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword metrics: Required. List of metrics. Only one metric in the list is currently supported
+ by Application Insights storage. If multiple data points were sent only the first one will be
+ used.
+ :paramtype metrics: list[~azure_monitor_client.models.MetricDataPoint]
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ """
+ super(MetricsData, self).__init__(**kwargs)
+ self.metrics = kwargs["metrics"]
+ self.properties = kwargs.get("properties", None)
+
+
+class MonitorBase(msrest.serialization.Model):
+ """Data struct to contain only C section with custom fields.
+
+ :ivar base_type: Name of item (B section) if any. If telemetry data is derived straight from
+ this, this should be null.
+ :vartype base_type: str
+ :ivar base_data: The data payload for the telemetry request.
+ :vartype base_data: ~azure_monitor_client.models.MonitorDomain
+ """
+
+ _attribute_map = {
+ "base_type": {"key": "baseType", "type": "str"},
+ "base_data": {"key": "baseData", "type": "MonitorDomain"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword base_type: Name of item (B section) if any. If telemetry data is derived straight from
+ this, this should be null.
+ :paramtype base_type: str
+ :keyword base_data: The data payload for the telemetry request.
+ :paramtype base_data: ~azure_monitor_client.models.MonitorDomain
+ """
+ super(MonitorBase, self).__init__(**kwargs)
+ self.base_type = kwargs.get("base_type", None)
+ self.base_data = kwargs.get("base_data", None)
+
+
+class PageViewData(MonitorDomain):
+ """An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar id: Required. Identifier of a page view instance. Used for correlation between page view
+ and other telemetry items.
+ :vartype id: str
+ :ivar name: Required. Event name. Keep it low cardinality to allow proper grouping and useful
+ metrics.
+ :vartype name: str
+ :ivar url: Request URL with all query string parameters.
+ :vartype url: str
+ :ivar duration: Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData),
+ this is the duration. For a page view with performance information (PageViewPerfData), this is
+ the page load time. Must be less than 1000 days.
+ :vartype duration: str
+ :ivar referred_uri: Fully qualified page URI or URL of the referring page; if unknown, leave
+ blank.
+ :vartype referred_uri: str
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "id": {"required": True, "max_length": 512, "min_length": 0},
+ "name": {"required": True, "max_length": 1024, "min_length": 0},
+ "url": {"max_length": 2048, "min_length": 0},
+ "referred_uri": {"max_length": 2048, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "url": {"key": "url", "type": "str"},
+ "duration": {"key": "duration", "type": "str"},
+ "referred_uri": {"key": "referredUri", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword id: Required. Identifier of a page view instance. Used for correlation between page
+ view and other telemetry items.
+ :paramtype id: str
+ :keyword name: Required. Event name. Keep it low cardinality to allow proper grouping and
+ useful metrics.
+ :paramtype name: str
+ :keyword url: Request URL with all query string parameters.
+ :paramtype url: str
+ :keyword duration: Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view
+ (PageViewData), this is the duration. For a page view with performance information
+ (PageViewPerfData), this is the page load time. Must be less than 1000 days.
+ :paramtype duration: str
+ :keyword referred_uri: Fully qualified page URI or URL of the referring page; if unknown, leave
+ blank.
+ :paramtype referred_uri: str
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(PageViewData, self).__init__(**kwargs)
+ self.id = kwargs["id"]
+ self.name = kwargs["name"]
+ self.url = kwargs.get("url", None)
+ self.duration = kwargs.get("duration", None)
+ self.referred_uri = kwargs.get("referred_uri", None)
+ self.properties = kwargs.get("properties", None)
+ self.measurements = kwargs.get("measurements", None)
+
+
+class PageViewPerfData(MonitorDomain):
+ """An instance of PageViewPerf represents: a page view with no performance data, a page view with performance data, or just the performance data of an earlier page request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar id: Required. Identifier of a page view instance. Used for correlation between page view
+ and other telemetry items.
+ :vartype id: str
+ :ivar name: Required. Event name. Keep it low cardinality to allow proper grouping and useful
+ metrics.
+ :vartype name: str
+ :ivar url: Request URL with all query string parameters.
+ :vartype url: str
+ :ivar duration: Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData),
+ this is the duration. For a page view with performance information (PageViewPerfData), this is
+ the page load time. Must be less than 1000 days.
+ :vartype duration: str
+ :ivar perf_total: Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff.
+ :vartype perf_total: str
+ :ivar network_connect: Network connection time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :vartype network_connect: str
+ :ivar sent_request: Sent request time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :vartype sent_request: str
+ :ivar received_response: Received response time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :vartype received_response: str
+ :ivar dom_processing: DOM processing time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :vartype dom_processing: str
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "id": {"required": True, "max_length": 512, "min_length": 0},
+ "name": {"required": True, "max_length": 1024, "min_length": 0},
+ "url": {"max_length": 2048, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "url": {"key": "url", "type": "str"},
+ "duration": {"key": "duration", "type": "str"},
+ "perf_total": {"key": "perfTotal", "type": "str"},
+ "network_connect": {"key": "networkConnect", "type": "str"},
+ "sent_request": {"key": "sentRequest", "type": "str"},
+ "received_response": {"key": "receivedResponse", "type": "str"},
+ "dom_processing": {"key": "domProcessing", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword id: Required. Identifier of a page view instance. Used for correlation between page
+ view and other telemetry items.
+ :paramtype id: str
+ :keyword name: Required. Event name. Keep it low cardinality to allow proper grouping and
+ useful metrics.
+ :paramtype name: str
+ :keyword url: Request URL with all query string parameters.
+ :paramtype url: str
+ :keyword duration: Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view
+ (PageViewData), this is the duration. For a page view with performance information
+ (PageViewPerfData), this is the page load time. Must be less than 1000 days.
+ :paramtype duration: str
+ :keyword perf_total: Performance total in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :paramtype perf_total: str
+ :keyword network_connect: Network connection time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :paramtype network_connect: str
+ :keyword sent_request: Sent request time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :paramtype sent_request: str
+ :keyword received_response: Received response time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :paramtype received_response: str
+ :keyword dom_processing: DOM processing time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :paramtype dom_processing: str
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(PageViewPerfData, self).__init__(**kwargs)
+ self.id = kwargs["id"]
+ self.name = kwargs["name"]
+ self.url = kwargs.get("url", None)
+ self.duration = kwargs.get("duration", None)
+ self.perf_total = kwargs.get("perf_total", None)
+ self.network_connect = kwargs.get("network_connect", None)
+ self.sent_request = kwargs.get("sent_request", None)
+ self.received_response = kwargs.get("received_response", None)
+ self.dom_processing = kwargs.get("dom_processing", None)
+ self.properties = kwargs.get("properties", None)
+ self.measurements = kwargs.get("measurements", None)
+
+
+class RemoteDependencyData(MonitorDomain):
+ """An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar id: Identifier of a dependency call instance. Used for correlation with the request
+ telemetry item corresponding to this dependency call.
+ :vartype id: str
+ :ivar name: Required. Name of the command initiated with this dependency call. Low cardinality
+ value. Examples are stored procedure name and URL path template.
+ :vartype name: str
+ :ivar result_code: Result code of a dependency call. Examples are SQL error code and HTTP
+ status code.
+ :vartype result_code: str
+ :ivar data: Command initiated by this dependency call. Examples are SQL statement and HTTP URL
+ with all query parameters.
+ :vartype data: str
+ :ivar type: Dependency type name. Very low cardinality value for logical grouping of
+ dependencies and interpretation of other fields like commandName and resultCode. Examples are
+ SQL, Azure table, and HTTP.
+ :vartype type: str
+ :ivar target: Target site of a dependency call. Examples are server name, host address.
+ :vartype target: str
+ :ivar duration: Required. Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than
+ 1000 days.
+ :vartype duration: str
+ :ivar success: Indication of successful or unsuccessful call.
+ :vartype success: bool
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "id": {"max_length": 512, "min_length": 0},
+ "name": {"required": True, "max_length": 1024, "min_length": 0},
+ "result_code": {"max_length": 1024, "min_length": 0},
+ "data": {"max_length": 8192, "min_length": 0},
+ "type": {"max_length": 1024, "min_length": 0},
+ "target": {"max_length": 1024, "min_length": 0},
+ "duration": {"required": True},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "result_code": {"key": "resultCode", "type": "str"},
+ "data": {"key": "data", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ "target": {"key": "target", "type": "str"},
+ "duration": {"key": "duration", "type": "str"},
+ "success": {"key": "success", "type": "bool"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword id: Identifier of a dependency call instance. Used for correlation with the request
+ telemetry item corresponding to this dependency call.
+ :paramtype id: str
+ :keyword name: Required. Name of the command initiated with this dependency call. Low
+ cardinality value. Examples are stored procedure name and URL path template.
+ :paramtype name: str
+ :keyword result_code: Result code of a dependency call. Examples are SQL error code and HTTP
+ status code.
+ :paramtype result_code: str
+ :keyword data: Command initiated by this dependency call. Examples are SQL statement and HTTP
+ URL with all query parameters.
+ :paramtype data: str
+ :keyword type: Dependency type name. Very low cardinality value for logical grouping of
+ dependencies and interpretation of other fields like commandName and resultCode. Examples are
+ SQL, Azure table, and HTTP.
+ :paramtype type: str
+ :keyword target: Target site of a dependency call. Examples are server name, host address.
+ :paramtype target: str
+ :keyword duration: Required. Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than
+ 1000 days.
+ :paramtype duration: str
+ :keyword success: Indication of successful or unsuccessful call.
+ :paramtype success: bool
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(RemoteDependencyData, self).__init__(**kwargs)
+ self.id = kwargs.get("id", None)
+ self.name = kwargs["name"]
+ self.result_code = kwargs.get("result_code", None)
+ self.data = kwargs.get("data", None)
+ self.type = kwargs.get("type", None)
+ self.target = kwargs.get("target", None)
+ self.duration = kwargs["duration"]
+ self.success = kwargs.get("success", True)
+ self.properties = kwargs.get("properties", None)
+ self.measurements = kwargs.get("measurements", None)
+
+
+class RequestData(MonitorDomain):
+ """An instance of Request represents completion of an external request to the application to do work and contains a summary of that request execution and the results.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar id: Required. Identifier of a request call instance. Used for correlation between request
+ and other telemetry items.
+ :vartype id: str
+ :ivar name: Name of the request. Represents code path taken to process request. Low cardinality
+ value to allow better grouping of requests. For HTTP requests it represents the HTTP method and
+ URL path template like 'GET /values/{id}'.
+ :vartype name: str
+ :ivar duration: Required. Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than
+ 1000 days.
+ :vartype duration: str
+ :ivar success: Required. Indication of successful or unsuccessful call.
+ :vartype success: bool
+ :ivar response_code: Required. Result of a request execution. HTTP status code for HTTP
+ requests.
+ :vartype response_code: str
+ :ivar source: Source of the request. Examples are the instrumentation key of the caller or the
+ ip address of the caller.
+ :vartype source: str
+ :ivar url: Request URL with all query string parameters.
+ :vartype url: str
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "id": {"required": True, "max_length": 512, "min_length": 0},
+ "name": {"max_length": 1024, "min_length": 0},
+ "duration": {"required": True},
+ "success": {"required": True},
+ "response_code": {"required": True, "max_length": 1024, "min_length": 0},
+ "source": {"max_length": 1024, "min_length": 0},
+ "url": {"max_length": 2048, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "duration": {"key": "duration", "type": "str"},
+ "success": {"key": "success", "type": "bool"},
+ "response_code": {"key": "responseCode", "type": "str"},
+ "source": {"key": "source", "type": "str"},
+ "url": {"key": "url", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword id: Required. Identifier of a request call instance. Used for correlation between
+ request and other telemetry items.
+ :paramtype id: str
+ :keyword name: Name of the request. Represents code path taken to process request. Low
+ cardinality value to allow better grouping of requests. For HTTP requests it represents the
+ HTTP method and URL path template like 'GET /values/{id}'.
+ :paramtype name: str
+ :keyword duration: Required. Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than
+ 1000 days.
+ :paramtype duration: str
+ :keyword success: Required. Indication of successful or unsuccessful call.
+ :paramtype success: bool
+ :keyword response_code: Required. Result of a request execution. HTTP status code for HTTP
+ requests.
+ :paramtype response_code: str
+ :keyword source: Source of the request. Examples are the instrumentation key of the caller or
+ the ip address of the caller.
+ :paramtype source: str
+ :keyword url: Request URL with all query string parameters.
+ :paramtype url: str
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(RequestData, self).__init__(**kwargs)
+ self.id = kwargs["id"]
+ self.name = kwargs.get("name", None)
+ self.duration = kwargs["duration"]
+ self.success = kwargs.get("success", True)
+ self.response_code = kwargs["response_code"]
+ self.source = kwargs.get("source", None)
+ self.url = kwargs.get("url", None)
+ self.properties = kwargs.get("properties", None)
+ self.measurements = kwargs.get("measurements", None)
+
+
+class StackFrame(msrest.serialization.Model):
+ """Stack frame information.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar level: Required.
+ :vartype level: int
+ :ivar method: Required. Method name.
+ :vartype method: str
+ :ivar assembly: Name of the assembly (dll, jar, etc.) containing this function.
+ :vartype assembly: str
+ :ivar file_name: File name or URL of the method implementation.
+ :vartype file_name: str
+ :ivar line: Line number of the code implementation.
+ :vartype line: int
+ """
+
+ _validation = {
+ "level": {"required": True},
+ "method": {"required": True, "max_length": 1024, "min_length": 0},
+ "assembly": {"max_length": 1024, "min_length": 0},
+ "file_name": {"max_length": 1024, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "level": {"key": "level", "type": "int"},
+ "method": {"key": "method", "type": "str"},
+ "assembly": {"key": "assembly", "type": "str"},
+ "file_name": {"key": "fileName", "type": "str"},
+ "line": {"key": "line", "type": "int"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword level: Required.
+ :paramtype level: int
+ :keyword method: Required. Method name.
+ :paramtype method: str
+ :keyword assembly: Name of the assembly (dll, jar, etc.) containing this function.
+ :paramtype assembly: str
+ :keyword file_name: File name or URL of the method implementation.
+ :paramtype file_name: str
+ :keyword line: Line number of the code implementation.
+ :paramtype line: int
+ """
+ super(StackFrame, self).__init__(**kwargs)
+ self.level = kwargs["level"]
+ self.method = kwargs["method"]
+ self.assembly = kwargs.get("assembly", None)
+ self.file_name = kwargs.get("file_name", None)
+ self.line = kwargs.get("line", None)
+
+
+class TelemetryErrorDetails(msrest.serialization.Model):
+ """The error details.
+
+ :ivar index: The index in the original payload of the item.
+ :vartype index: int
+ :ivar status_code: The item specific `HTTP Response status code <#Response Status Codes>`_.
+ :vartype status_code: int
+ :ivar message: The error message.
+ :vartype message: str
+ """
+
+ _attribute_map = {
+ "index": {"key": "index", "type": "int"},
+ "status_code": {"key": "statusCode", "type": "int"},
+ "message": {"key": "message", "type": "str"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword index: The index in the original payload of the item.
+ :paramtype index: int
+ :keyword status_code: The item specific `HTTP Response status code <#Response Status Codes>`_.
+ :paramtype status_code: int
+ :keyword message: The error message.
+ :paramtype message: str
+ """
+ super(TelemetryErrorDetails, self).__init__(**kwargs)
+ self.index = kwargs.get("index", None)
+ self.status_code = kwargs.get("status_code", None)
+ self.message = kwargs.get("message", None)
+
+
+class TelemetryEventData(MonitorDomain):
+ """Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar name: Required. Event name. Keep it low cardinality to allow proper grouping and useful
+ metrics.
+ :vartype name: str
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "name": {"required": True, "max_length": 512, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "name": {"key": "name", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword name: Required. Event name. Keep it low cardinality to allow proper grouping and
+ useful metrics.
+ :paramtype name: str
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(TelemetryEventData, self).__init__(**kwargs)
+ self.name = kwargs["name"]
+ self.properties = kwargs.get("properties", None)
+ self.measurements = kwargs.get("measurements", None)
+
+
+class TelemetryExceptionData(MonitorDomain):
+ """An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar exceptions: Required. Exception chain - list of inner exceptions.
+ :vartype exceptions: list[~azure_monitor_client.models.TelemetryExceptionDetails]
+ :ivar severity_level: Severity level. Mostly used to indicate exception severity level when it
+ is reported by logging library. Possible values include: "Verbose", "Information", "Warning",
+ "Error", "Critical".
+ :vartype severity_level: str or ~azure_monitor_client.models.SeverityLevel
+ :ivar problem_id: Identifier of where the exception was thrown in code. Used for exceptions
+ grouping. Typically a combination of exception type and a function from the call stack.
+ :vartype problem_id: str
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "exceptions": {"required": True},
+ "problem_id": {"max_length": 1024, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "exceptions": {"key": "exceptions", "type": "[TelemetryExceptionDetails]"},
+ "severity_level": {"key": "severityLevel", "type": "str"},
+ "problem_id": {"key": "problemId", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword exceptions: Required. Exception chain - list of inner exceptions.
+ :paramtype exceptions: list[~azure_monitor_client.models.TelemetryExceptionDetails]
+ :keyword severity_level: Severity level. Mostly used to indicate exception severity level when
+ it is reported by logging library. Possible values include: "Verbose", "Information",
+ "Warning", "Error", "Critical".
+ :paramtype severity_level: str or ~azure_monitor_client.models.SeverityLevel
+ :keyword problem_id: Identifier of where the exception was thrown in code. Used for exceptions
+ grouping. Typically a combination of exception type and a function from the call stack.
+ :paramtype problem_id: str
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(TelemetryExceptionData, self).__init__(**kwargs)
+ self.exceptions = kwargs["exceptions"]
+ self.severity_level = kwargs.get("severity_level", None)
+ self.problem_id = kwargs.get("problem_id", None)
+ self.properties = kwargs.get("properties", None)
+ self.measurements = kwargs.get("measurements", None)
+
+
+class TelemetryExceptionDetails(msrest.serialization.Model):
+ """Exception details of the exception in a chain.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: In case exception is nested (outer exception contains inner one), the id and outerId
+ properties are used to represent the nesting.
+ :vartype id: int
+ :ivar outer_id: The value of outerId is a reference to an element in ExceptionDetails that
+ represents the outer exception.
+ :vartype outer_id: int
+ :ivar type_name: Exception type name.
+ :vartype type_name: str
+ :ivar message: Required. Exception message.
+ :vartype message: str
+ :ivar has_full_stack: Indicates if full exception stack is provided in the exception. The stack
+ may be trimmed, such as in the case of a StackOverflow exception.
+ :vartype has_full_stack: bool
+ :ivar stack: Text describing the stack. Either stack or parsedStack should have a value.
+ :vartype stack: str
+ :ivar parsed_stack: List of stack frames. Either stack or parsedStack should have a value.
+ :vartype parsed_stack: list[~azure_monitor_client.models.StackFrame]
+ """
+
+ _validation = {
+ "type_name": {"max_length": 1024, "min_length": 0},
+ "message": {"required": True, "max_length": 32768, "min_length": 0},
+ "stack": {"max_length": 32768, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "id": {"key": "id", "type": "int"},
+ "outer_id": {"key": "outerId", "type": "int"},
+ "type_name": {"key": "typeName", "type": "str"},
+ "message": {"key": "message", "type": "str"},
+ "has_full_stack": {"key": "hasFullStack", "type": "bool"},
+ "stack": {"key": "stack", "type": "str"},
+ "parsed_stack": {"key": "parsedStack", "type": "[StackFrame]"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword id: In case exception is nested (outer exception contains inner one), the id and
+ outerId properties are used to represent the nesting.
+ :paramtype id: int
+ :keyword outer_id: The value of outerId is a reference to an element in ExceptionDetails that
+ represents the outer exception.
+ :paramtype outer_id: int
+ :keyword type_name: Exception type name.
+ :paramtype type_name: str
+ :keyword message: Required. Exception message.
+ :paramtype message: str
+ :keyword has_full_stack: Indicates if full exception stack is provided in the exception. The
+ stack may be trimmed, such as in the case of a StackOverflow exception.
+ :paramtype has_full_stack: bool
+ :keyword stack: Text describing the stack. Either stack or parsedStack should have a value.
+ :paramtype stack: str
+ :keyword parsed_stack: List of stack frames. Either stack or parsedStack should have a value.
+ :paramtype parsed_stack: list[~azure_monitor_client.models.StackFrame]
+ """
+ super(TelemetryExceptionDetails, self).__init__(**kwargs)
+ self.id = kwargs.get("id", None)
+ self.outer_id = kwargs.get("outer_id", None)
+ self.type_name = kwargs.get("type_name", None)
+ self.message = kwargs["message"]
+ self.has_full_stack = kwargs.get("has_full_stack", True)
+ self.stack = kwargs.get("stack", None)
+ self.parsed_stack = kwargs.get("parsed_stack", None)
+
+
+class TelemetryItem(msrest.serialization.Model):
+ """System variables for a telemetry item.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar version: Envelope version. For internal use only. By assigning this the default, it will
+ not be serialized within the payload unless changed to a value other than #1.
+ :vartype version: int
+ :ivar name: Required. Type name of telemetry data item.
+ :vartype name: str
+ :ivar time: Required. Event date time when telemetry item was created. This is the wall clock
+ time on the client when the event was generated. There is no guarantee that the client's time
+ is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z'
+ character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the
+ number of decimal seconds digits provided are variable (and unspecified). Consumers should
+ handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies
+ a fixed length. Example: 2009-06-15T13:45:30.0000000Z.
+ :vartype time: ~datetime.datetime
+ :ivar sample_rate: Sampling rate used in application. This telemetry item represents 100 /
+ sampleRate actual telemetry items.
+ :vartype sample_rate: float
+ :ivar sequence: Sequence field used to track absolute order of uploaded events.
+ :vartype sequence: str
+ :ivar instrumentation_key: The instrumentation key of the Application Insights resource.
+ :vartype instrumentation_key: str
+ :ivar tags: A set of tags. Key/value collection of context properties. See ContextTagKeys for
+ information on available properties.
+ :vartype tags: dict[str, str]
+ :ivar data: Telemetry data item.
+ :vartype data: ~azure_monitor_client.models.MonitorBase
+ """
+
+ _validation = {
+ "name": {"required": True},
+ "time": {"required": True},
+ "sequence": {"max_length": 64, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "version": {"key": "ver", "type": "int"},
+ "name": {"key": "name", "type": "str"},
+ "time": {"key": "time", "type": "iso-8601"},
+ "sample_rate": {"key": "sampleRate", "type": "float"},
+ "sequence": {"key": "seq", "type": "str"},
+ "instrumentation_key": {"key": "iKey", "type": "str"},
+ "tags": {"key": "tags", "type": "{str}"},
+ "data": {"key": "data", "type": "MonitorBase"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword version: Envelope version. For internal use only. By assigning this the default, it
+ will not be serialized within the payload unless changed to a value other than #1.
+ :paramtype version: int
+ :keyword name: Required. Type name of telemetry data item.
+ :paramtype name: str
+ :keyword time: Required. Event date time when telemetry item was created. This is the wall
+ clock time on the client when the event was generated. There is no guarantee that the client's
+ time is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z'
+ character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the
+ number of decimal seconds digits provided are variable (and unspecified). Consumers should
+ handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies
+ a fixed length. Example: 2009-06-15T13:45:30.0000000Z.
+ :paramtype time: ~datetime.datetime
+ :keyword sample_rate: Sampling rate used in application. This telemetry item represents 100 /
+ sampleRate actual telemetry items.
+ :paramtype sample_rate: float
+ :keyword sequence: Sequence field used to track absolute order of uploaded events.
+ :paramtype sequence: str
+ :keyword instrumentation_key: The instrumentation key of the Application Insights resource.
+ :paramtype instrumentation_key: str
+ :keyword tags: A set of tags. Key/value collection of context properties. See ContextTagKeys
+ for information on available properties.
+ :paramtype tags: dict[str, str]
+ :keyword data: Telemetry data item.
+ :paramtype data: ~azure_monitor_client.models.MonitorBase
+ """
+ super(TelemetryItem, self).__init__(**kwargs)
+ self.version = kwargs.get("version", 1)
+ self.name = kwargs["name"]
+ self.time = kwargs["time"]
+ self.sample_rate = kwargs.get("sample_rate", 100)
+ self.sequence = kwargs.get("sequence", None)
+ self.instrumentation_key = kwargs.get("instrumentation_key", None)
+ self.tags = kwargs.get("tags", None)
+ self.data = kwargs.get("data", None)
+
+
+class TrackResponse(msrest.serialization.Model):
+ """Response containing the status of each telemetry item.
+
+ :ivar items_received: The number of items received.
+ :vartype items_received: int
+ :ivar items_accepted: The number of items accepted.
+ :vartype items_accepted: int
+ :ivar errors: An array of error detail objects.
+ :vartype errors: list[~azure_monitor_client.models.TelemetryErrorDetails]
+ """
+
+ _attribute_map = {
+ "items_received": {"key": "itemsReceived", "type": "int"},
+ "items_accepted": {"key": "itemsAccepted", "type": "int"},
+ "errors": {"key": "errors", "type": "[TelemetryErrorDetails]"},
+ }
+
+ def __init__(self, **kwargs):
+ """
+ :keyword items_received: The number of items received.
+ :paramtype items_received: int
+ :keyword items_accepted: The number of items accepted.
+ :paramtype items_accepted: int
+ :keyword errors: An array of error detail objects.
+ :paramtype errors: list[~azure_monitor_client.models.TelemetryErrorDetails]
+ """
+ super(TrackResponse, self).__init__(**kwargs)
+ self.items_received = kwargs.get("items_received", None)
+ self.items_accepted = kwargs.get("items_accepted", None)
+ self.errors = kwargs.get("errors", None)
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/_models_py3.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/_models_py3.py
new file mode 100644
index 00000000..9741154c
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/models/_models_py3.py
@@ -0,0 +1,1342 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+import datetime
+from typing import Any, Dict, List, Optional, Union
+
+from azure.core.exceptions import HttpResponseError
+import msrest.serialization
+
+from ._azure_monitor_client_enums import *
+
+
+class MonitorDomain(msrest.serialization.Model):
+ """The abstract common base of all domains.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ """
+
+ _validation = {
+ "version": {"required": True},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ }
+
+ def __init__(self, *, version: int = 2, additional_properties: Optional[Dict[str, Any]] = None, **kwargs):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ """
+ super(MonitorDomain, self).__init__(**kwargs)
+ self.additional_properties = additional_properties
+ self.version = version
+
+
+class AvailabilityData(MonitorDomain):
+ """Instances of AvailabilityData represent the result of executing an availability test.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar id: Required. Identifier of a test run. Use it to correlate steps of test run and
+ telemetry generated by the service.
+ :vartype id: str
+ :ivar name: Required. Name of the test that these availability results represent.
+ :vartype name: str
+ :ivar duration: Required. Duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.
+ :vartype duration: str
+ :ivar success: Required. Success flag.
+ :vartype success: bool
+ :ivar run_location: Name of the location where the test was run from.
+ :vartype run_location: str
+ :ivar message: Diagnostic message for the result.
+ :vartype message: str
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "id": {"required": True, "max_length": 512, "min_length": 0},
+ "name": {"required": True, "max_length": 1024, "min_length": 0},
+ "duration": {"required": True},
+ "success": {"required": True},
+ "run_location": {"max_length": 1024, "min_length": 0},
+ "message": {"max_length": 8192, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "duration": {"key": "duration", "type": "str"},
+ "success": {"key": "success", "type": "bool"},
+ "run_location": {"key": "runLocation", "type": "str"},
+ "message": {"key": "message", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(
+ self,
+ *,
+ version: int = 2,
+ id: str,
+ name: str,
+ duration: str,
+ success: bool,
+ additional_properties: Optional[Dict[str, Any]] = None,
+ run_location: Optional[str] = None,
+ message: Optional[str] = None,
+ properties: Optional[Dict[str, str]] = None,
+ measurements: Optional[Dict[str, float]] = None,
+ **kwargs
+ ):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword id: Required. Identifier of a test run. Use it to correlate steps of test run and
+ telemetry generated by the service.
+ :paramtype id: str
+ :keyword name: Required. Name of the test that these availability results represent.
+ :paramtype name: str
+ :keyword duration: Required. Duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000
+ days.
+ :paramtype duration: str
+ :keyword success: Required. Success flag.
+ :paramtype success: bool
+ :keyword run_location: Name of the location where the test was run from.
+ :paramtype run_location: str
+ :keyword message: Diagnostic message for the result.
+ :paramtype message: str
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(AvailabilityData, self).__init__(additional_properties=additional_properties, version=version, **kwargs)
+ self.id = id
+ self.name = name
+ self.duration = duration
+ self.success = success
+ self.run_location = run_location
+ self.message = message
+ self.properties = properties
+ self.measurements = measurements
+
+
+class MessageData(MonitorDomain):
+ """Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into instances of this type. The message does not have measurements.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar message: Required. Trace message.
+ :vartype message: str
+ :ivar severity_level: Trace severity level. Possible values include: "Verbose", "Information",
+ "Warning", "Error", "Critical".
+ :vartype severity_level: str or ~azure_monitor_client.models.SeverityLevel
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "message": {"required": True, "max_length": 32768, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "message": {"key": "message", "type": "str"},
+ "severity_level": {"key": "severityLevel", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(
+ self,
+ *,
+ version: int = 2,
+ message: str,
+ additional_properties: Optional[Dict[str, Any]] = None,
+ severity_level: Optional[Union[str, "SeverityLevel"]] = None,
+ properties: Optional[Dict[str, str]] = None,
+ measurements: Optional[Dict[str, float]] = None,
+ **kwargs
+ ):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword message: Required. Trace message.
+ :paramtype message: str
+ :keyword severity_level: Trace severity level. Possible values include: "Verbose",
+ "Information", "Warning", "Error", "Critical".
+ :paramtype severity_level: str or ~azure_monitor_client.models.SeverityLevel
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(MessageData, self).__init__(additional_properties=additional_properties, version=version, **kwargs)
+ self.message = message
+ self.severity_level = severity_level
+ self.properties = properties
+ self.measurements = measurements
+
+
+class MetricDataPoint(msrest.serialization.Model):
+ """Metric data single measurement.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar namespace: Namespace of the metric.
+ :vartype namespace: str
+ :ivar name: Required. Name of the metric.
+ :vartype name: str
+ :ivar data_point_type: Metric type. Single measurement or the aggregated value. Possible values
+ include: "Measurement", "Aggregation".
+ :vartype data_point_type: str or ~azure_monitor_client.models.DataPointType
+ :ivar value: Required. Single value for measurement. Sum of individual measurements for the
+ aggregation.
+ :vartype value: float
+ :ivar count: Metric weight of the aggregated metric. Should not be set for a measurement.
+ :vartype count: int
+ :ivar min: Minimum value of the aggregated metric. Should not be set for a measurement.
+ :vartype min: float
+ :ivar max: Maximum value of the aggregated metric. Should not be set for a measurement.
+ :vartype max: float
+ :ivar std_dev: Standard deviation of the aggregated metric. Should not be set for a
+ measurement.
+ :vartype std_dev: float
+ """
+
+ _validation = {
+ "namespace": {"max_length": 256, "min_length": 0},
+ "name": {"required": True, "max_length": 1024, "min_length": 0},
+ "value": {"required": True},
+ }
+
+ _attribute_map = {
+ "namespace": {"key": "ns", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "data_point_type": {"key": "kind", "type": "str"},
+ "value": {"key": "value", "type": "float"},
+ "count": {"key": "count", "type": "int"},
+ "min": {"key": "min", "type": "float"},
+ "max": {"key": "max", "type": "float"},
+ "std_dev": {"key": "stdDev", "type": "float"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: str,
+ value: float,
+ namespace: Optional[str] = None,
+ data_point_type: Optional[Union[str, "DataPointType"]] = None,
+ count: Optional[int] = None,
+ min: Optional[float] = None,
+ max: Optional[float] = None,
+ std_dev: Optional[float] = None,
+ **kwargs
+ ):
+ """
+ :keyword namespace: Namespace of the metric.
+ :paramtype namespace: str
+ :keyword name: Required. Name of the metric.
+ :paramtype name: str
+ :keyword data_point_type: Metric type. Single measurement or the aggregated value. Possible
+ values include: "Measurement", "Aggregation".
+ :paramtype data_point_type: str or ~azure_monitor_client.models.DataPointType
+ :keyword value: Required. Single value for measurement. Sum of individual measurements for the
+ aggregation.
+ :paramtype value: float
+ :keyword count: Metric weight of the aggregated metric. Should not be set for a measurement.
+ :paramtype count: int
+ :keyword min: Minimum value of the aggregated metric. Should not be set for a measurement.
+ :paramtype min: float
+ :keyword max: Maximum value of the aggregated metric. Should not be set for a measurement.
+ :paramtype max: float
+ :keyword std_dev: Standard deviation of the aggregated metric. Should not be set for a
+ measurement.
+ :paramtype std_dev: float
+ """
+ super(MetricDataPoint, self).__init__(**kwargs)
+ self.namespace = namespace
+ self.name = name
+ self.data_point_type = data_point_type
+ self.value = value
+ self.count = count
+ self.min = min
+ self.max = max
+ self.std_dev = std_dev
+
+
+class MetricsData(MonitorDomain):
+ """An instance of the Metric item is a list of measurements (single data points) and/or aggregations.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar metrics: Required. List of metrics. Only one metric in the list is currently supported by
+ Application Insights storage. If multiple data points were sent only the first one will be
+ used.
+ :vartype metrics: list[~azure_monitor_client.models.MetricDataPoint]
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "metrics": {"required": True},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "metrics": {"key": "metrics", "type": "[MetricDataPoint]"},
+ "properties": {"key": "properties", "type": "{str}"},
+ }
+
+ def __init__(
+ self,
+ *,
+ version: int = 2,
+ metrics: List["MetricDataPoint"],
+ additional_properties: Optional[Dict[str, Any]] = None,
+ properties: Optional[Dict[str, str]] = None,
+ **kwargs
+ ):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword metrics: Required. List of metrics. Only one metric in the list is currently supported
+ by Application Insights storage. If multiple data points were sent only the first one will be
+ used.
+ :paramtype metrics: list[~azure_monitor_client.models.MetricDataPoint]
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ """
+ super(MetricsData, self).__init__(additional_properties=additional_properties, version=version, **kwargs)
+ self.metrics = metrics
+ self.properties = properties
+
+
+class MonitorBase(msrest.serialization.Model):
+ """Data struct to contain only C section with custom fields.
+
+ :ivar base_type: Name of item (B section) if any. If telemetry data is derived straight from
+ this, this should be null.
+ :vartype base_type: str
+ :ivar base_data: The data payload for the telemetry request.
+ :vartype base_data: ~azure_monitor_client.models.MonitorDomain
+ """
+
+ _attribute_map = {
+ "base_type": {"key": "baseType", "type": "str"},
+ "base_data": {"key": "baseData", "type": "MonitorDomain"},
+ }
+
+ def __init__(self, *, base_type: Optional[str] = None, base_data: Optional["MonitorDomain"] = None, **kwargs):
+ """
+ :keyword base_type: Name of item (B section) if any. If telemetry data is derived straight from
+ this, this should be null.
+ :paramtype base_type: str
+ :keyword base_data: The data payload for the telemetry request.
+ :paramtype base_data: ~azure_monitor_client.models.MonitorDomain
+ """
+ super(MonitorBase, self).__init__(**kwargs)
+ self.base_type = base_type
+ self.base_data = base_data
+
+
+class PageViewData(MonitorDomain):
+ """An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar id: Required. Identifier of a page view instance. Used for correlation between page view
+ and other telemetry items.
+ :vartype id: str
+ :ivar name: Required. Event name. Keep it low cardinality to allow proper grouping and useful
+ metrics.
+ :vartype name: str
+ :ivar url: Request URL with all query string parameters.
+ :vartype url: str
+ :ivar duration: Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData),
+ this is the duration. For a page view with performance information (PageViewPerfData), this is
+ the page load time. Must be less than 1000 days.
+ :vartype duration: str
+ :ivar referred_uri: Fully qualified page URI or URL of the referring page; if unknown, leave
+ blank.
+ :vartype referred_uri: str
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "id": {"required": True, "max_length": 512, "min_length": 0},
+ "name": {"required": True, "max_length": 1024, "min_length": 0},
+ "url": {"max_length": 2048, "min_length": 0},
+ "referred_uri": {"max_length": 2048, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "url": {"key": "url", "type": "str"},
+ "duration": {"key": "duration", "type": "str"},
+ "referred_uri": {"key": "referredUri", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(
+ self,
+ *,
+ version: int = 2,
+ id: str,
+ name: str,
+ additional_properties: Optional[Dict[str, Any]] = None,
+ url: Optional[str] = None,
+ duration: Optional[str] = None,
+ referred_uri: Optional[str] = None,
+ properties: Optional[Dict[str, str]] = None,
+ measurements: Optional[Dict[str, float]] = None,
+ **kwargs
+ ):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword id: Required. Identifier of a page view instance. Used for correlation between page
+ view and other telemetry items.
+ :paramtype id: str
+ :keyword name: Required. Event name. Keep it low cardinality to allow proper grouping and
+ useful metrics.
+ :paramtype name: str
+ :keyword url: Request URL with all query string parameters.
+ :paramtype url: str
+ :keyword duration: Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view
+ (PageViewData), this is the duration. For a page view with performance information
+ (PageViewPerfData), this is the page load time. Must be less than 1000 days.
+ :paramtype duration: str
+ :keyword referred_uri: Fully qualified page URI or URL of the referring page; if unknown, leave
+ blank.
+ :paramtype referred_uri: str
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(PageViewData, self).__init__(additional_properties=additional_properties, version=version, **kwargs)
+ self.id = id
+ self.name = name
+ self.url = url
+ self.duration = duration
+ self.referred_uri = referred_uri
+ self.properties = properties
+ self.measurements = measurements
+
+
+class PageViewPerfData(MonitorDomain):
+ """An instance of PageViewPerf represents: a page view with no performance data, a page view with performance data, or just the performance data of an earlier page request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar id: Required. Identifier of a page view instance. Used for correlation between page view
+ and other telemetry items.
+ :vartype id: str
+ :ivar name: Required. Event name. Keep it low cardinality to allow proper grouping and useful
+ metrics.
+ :vartype name: str
+ :ivar url: Request URL with all query string parameters.
+ :vartype url: str
+ :ivar duration: Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData),
+ this is the duration. For a page view with performance information (PageViewPerfData), this is
+ the page load time. Must be less than 1000 days.
+ :vartype duration: str
+ :ivar perf_total: Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff.
+ :vartype perf_total: str
+ :ivar network_connect: Network connection time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :vartype network_connect: str
+ :ivar sent_request: Sent request time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :vartype sent_request: str
+ :ivar received_response: Received response time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :vartype received_response: str
+ :ivar dom_processing: DOM processing time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :vartype dom_processing: str
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "id": {"required": True, "max_length": 512, "min_length": 0},
+ "name": {"required": True, "max_length": 1024, "min_length": 0},
+ "url": {"max_length": 2048, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "url": {"key": "url", "type": "str"},
+ "duration": {"key": "duration", "type": "str"},
+ "perf_total": {"key": "perfTotal", "type": "str"},
+ "network_connect": {"key": "networkConnect", "type": "str"},
+ "sent_request": {"key": "sentRequest", "type": "str"},
+ "received_response": {"key": "receivedResponse", "type": "str"},
+ "dom_processing": {"key": "domProcessing", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(
+ self,
+ *,
+ version: int = 2,
+ id: str,
+ name: str,
+ additional_properties: Optional[Dict[str, Any]] = None,
+ url: Optional[str] = None,
+ duration: Optional[str] = None,
+ perf_total: Optional[str] = None,
+ network_connect: Optional[str] = None,
+ sent_request: Optional[str] = None,
+ received_response: Optional[str] = None,
+ dom_processing: Optional[str] = None,
+ properties: Optional[Dict[str, str]] = None,
+ measurements: Optional[Dict[str, float]] = None,
+ **kwargs
+ ):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword id: Required. Identifier of a page view instance. Used for correlation between page
+ view and other telemetry items.
+ :paramtype id: str
+ :keyword name: Required. Event name. Keep it low cardinality to allow proper grouping and
+ useful metrics.
+ :paramtype name: str
+ :keyword url: Request URL with all query string parameters.
+ :paramtype url: str
+ :keyword duration: Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view
+ (PageViewData), this is the duration. For a page view with performance information
+ (PageViewPerfData), this is the page load time. Must be less than 1000 days.
+ :paramtype duration: str
+ :keyword perf_total: Performance total in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :paramtype perf_total: str
+ :keyword network_connect: Network connection time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :paramtype network_connect: str
+ :keyword sent_request: Sent request time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :paramtype sent_request: str
+ :keyword received_response: Received response time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :paramtype received_response: str
+ :keyword dom_processing: DOM processing time in TimeSpan 'G' (general long) format:
+ d:hh:mm:ss.fffffff.
+ :paramtype dom_processing: str
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(PageViewPerfData, self).__init__(additional_properties=additional_properties, version=version, **kwargs)
+ self.id = id
+ self.name = name
+ self.url = url
+ self.duration = duration
+ self.perf_total = perf_total
+ self.network_connect = network_connect
+ self.sent_request = sent_request
+ self.received_response = received_response
+ self.dom_processing = dom_processing
+ self.properties = properties
+ self.measurements = measurements
+
+
+class RemoteDependencyData(MonitorDomain):
+ """An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar id: Identifier of a dependency call instance. Used for correlation with the request
+ telemetry item corresponding to this dependency call.
+ :vartype id: str
+ :ivar name: Required. Name of the command initiated with this dependency call. Low cardinality
+ value. Examples are stored procedure name and URL path template.
+ :vartype name: str
+ :ivar result_code: Result code of a dependency call. Examples are SQL error code and HTTP
+ status code.
+ :vartype result_code: str
+ :ivar data: Command initiated by this dependency call. Examples are SQL statement and HTTP URL
+ with all query parameters.
+ :vartype data: str
+ :ivar type: Dependency type name. Very low cardinality value for logical grouping of
+ dependencies and interpretation of other fields like commandName and resultCode. Examples are
+ SQL, Azure table, and HTTP.
+ :vartype type: str
+ :ivar target: Target site of a dependency call. Examples are server name, host address.
+ :vartype target: str
+ :ivar duration: Required. Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than
+ 1000 days.
+ :vartype duration: str
+ :ivar success: Indication of successful or unsuccessful call.
+ :vartype success: bool
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "id": {"max_length": 512, "min_length": 0},
+ "name": {"required": True, "max_length": 1024, "min_length": 0},
+ "result_code": {"max_length": 1024, "min_length": 0},
+ "data": {"max_length": 8192, "min_length": 0},
+ "type": {"max_length": 1024, "min_length": 0},
+ "target": {"max_length": 1024, "min_length": 0},
+ "duration": {"required": True},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "result_code": {"key": "resultCode", "type": "str"},
+ "data": {"key": "data", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ "target": {"key": "target", "type": "str"},
+ "duration": {"key": "duration", "type": "str"},
+ "success": {"key": "success", "type": "bool"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(
+ self,
+ *,
+ version: int = 2,
+ name: str,
+ duration: str,
+ additional_properties: Optional[Dict[str, Any]] = None,
+ id: Optional[str] = None,
+ result_code: Optional[str] = None,
+ data: Optional[str] = None,
+ type: Optional[str] = None,
+ target: Optional[str] = None,
+ success: Optional[bool] = True,
+ properties: Optional[Dict[str, str]] = None,
+ measurements: Optional[Dict[str, float]] = None,
+ **kwargs
+ ):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword id: Identifier of a dependency call instance. Used for correlation with the request
+ telemetry item corresponding to this dependency call.
+ :paramtype id: str
+ :keyword name: Required. Name of the command initiated with this dependency call. Low
+ cardinality value. Examples are stored procedure name and URL path template.
+ :paramtype name: str
+ :keyword result_code: Result code of a dependency call. Examples are SQL error code and HTTP
+ status code.
+ :paramtype result_code: str
+ :keyword data: Command initiated by this dependency call. Examples are SQL statement and HTTP
+ URL with all query parameters.
+ :paramtype data: str
+ :keyword type: Dependency type name. Very low cardinality value for logical grouping of
+ dependencies and interpretation of other fields like commandName and resultCode. Examples are
+ SQL, Azure table, and HTTP.
+ :paramtype type: str
+ :keyword target: Target site of a dependency call. Examples are server name, host address.
+ :paramtype target: str
+ :keyword duration: Required. Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than
+ 1000 days.
+ :paramtype duration: str
+ :keyword success: Indication of successful or unsuccessful call.
+ :paramtype success: bool
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(RemoteDependencyData, self).__init__(
+ additional_properties=additional_properties, version=version, **kwargs
+ )
+ self.id = id
+ self.name = name
+ self.result_code = result_code
+ self.data = data
+ self.type = type
+ self.target = target
+ self.duration = duration
+ self.success = success
+ self.properties = properties
+ self.measurements = measurements
+
+
+class RequestData(MonitorDomain):
+ """An instance of Request represents completion of an external request to the application to do work and contains a summary of that request execution and the results.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar id: Required. Identifier of a request call instance. Used for correlation between request
+ and other telemetry items.
+ :vartype id: str
+ :ivar name: Name of the request. Represents code path taken to process request. Low cardinality
+ value to allow better grouping of requests. For HTTP requests it represents the HTTP method and
+ URL path template like 'GET /values/{id}'.
+ :vartype name: str
+ :ivar duration: Required. Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than
+ 1000 days.
+ :vartype duration: str
+ :ivar success: Required. Indication of successful or unsuccessful call.
+ :vartype success: bool
+ :ivar response_code: Required. Result of a request execution. HTTP status code for HTTP
+ requests.
+ :vartype response_code: str
+ :ivar source: Source of the request. Examples are the instrumentation key of the caller or the
+ ip address of the caller.
+ :vartype source: str
+ :ivar url: Request URL with all query string parameters.
+ :vartype url: str
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "id": {"required": True, "max_length": 512, "min_length": 0},
+ "name": {"max_length": 1024, "min_length": 0},
+ "duration": {"required": True},
+ "success": {"required": True},
+ "response_code": {"required": True, "max_length": 1024, "min_length": 0},
+ "source": {"max_length": 1024, "min_length": 0},
+ "url": {"max_length": 2048, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "duration": {"key": "duration", "type": "str"},
+ "success": {"key": "success", "type": "bool"},
+ "response_code": {"key": "responseCode", "type": "str"},
+ "source": {"key": "source", "type": "str"},
+ "url": {"key": "url", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(
+ self,
+ *,
+ version: int = 2,
+ id: str,
+ duration: str,
+ success: bool = True,
+ response_code: str,
+ additional_properties: Optional[Dict[str, Any]] = None,
+ name: Optional[str] = None,
+ source: Optional[str] = None,
+ url: Optional[str] = None,
+ properties: Optional[Dict[str, str]] = None,
+ measurements: Optional[Dict[str, float]] = None,
+ **kwargs
+ ):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword id: Required. Identifier of a request call instance. Used for correlation between
+ request and other telemetry items.
+ :paramtype id: str
+ :keyword name: Name of the request. Represents code path taken to process request. Low
+ cardinality value to allow better grouping of requests. For HTTP requests it represents the
+ HTTP method and URL path template like 'GET /values/{id}'.
+ :paramtype name: str
+ :keyword duration: Required. Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than
+ 1000 days.
+ :paramtype duration: str
+ :keyword success: Required. Indication of successful or unsuccessful call.
+ :paramtype success: bool
+ :keyword response_code: Required. Result of a request execution. HTTP status code for HTTP
+ requests.
+ :paramtype response_code: str
+ :keyword source: Source of the request. Examples are the instrumentation key of the caller or
+ the ip address of the caller.
+ :paramtype source: str
+ :keyword url: Request URL with all query string parameters.
+ :paramtype url: str
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(RequestData, self).__init__(additional_properties=additional_properties, version=version, **kwargs)
+ self.id = id
+ self.name = name
+ self.duration = duration
+ self.success = success
+ self.response_code = response_code
+ self.source = source
+ self.url = url
+ self.properties = properties
+ self.measurements = measurements
+
+
+class StackFrame(msrest.serialization.Model):
+ """Stack frame information.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar level: Required.
+ :vartype level: int
+ :ivar method: Required. Method name.
+ :vartype method: str
+ :ivar assembly: Name of the assembly (dll, jar, etc.) containing this function.
+ :vartype assembly: str
+ :ivar file_name: File name or URL of the method implementation.
+ :vartype file_name: str
+ :ivar line: Line number of the code implementation.
+ :vartype line: int
+ """
+
+ _validation = {
+ "level": {"required": True},
+ "method": {"required": True, "max_length": 1024, "min_length": 0},
+ "assembly": {"max_length": 1024, "min_length": 0},
+ "file_name": {"max_length": 1024, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "level": {"key": "level", "type": "int"},
+ "method": {"key": "method", "type": "str"},
+ "assembly": {"key": "assembly", "type": "str"},
+ "file_name": {"key": "fileName", "type": "str"},
+ "line": {"key": "line", "type": "int"},
+ }
+
+ def __init__(
+ self,
+ *,
+ level: int,
+ method: str,
+ assembly: Optional[str] = None,
+ file_name: Optional[str] = None,
+ line: Optional[int] = None,
+ **kwargs
+ ):
+ """
+ :keyword level: Required.
+ :paramtype level: int
+ :keyword method: Required. Method name.
+ :paramtype method: str
+ :keyword assembly: Name of the assembly (dll, jar, etc.) containing this function.
+ :paramtype assembly: str
+ :keyword file_name: File name or URL of the method implementation.
+ :paramtype file_name: str
+ :keyword line: Line number of the code implementation.
+ :paramtype line: int
+ """
+ super(StackFrame, self).__init__(**kwargs)
+ self.level = level
+ self.method = method
+ self.assembly = assembly
+ self.file_name = file_name
+ self.line = line
+
+
+class TelemetryErrorDetails(msrest.serialization.Model):
+ """The error details.
+
+ :ivar index: The index in the original payload of the item.
+ :vartype index: int
+ :ivar status_code: The item specific `HTTP Response status code <#Response Status Codes>`_.
+ :vartype status_code: int
+ :ivar message: The error message.
+ :vartype message: str
+ """
+
+ _attribute_map = {
+ "index": {"key": "index", "type": "int"},
+ "status_code": {"key": "statusCode", "type": "int"},
+ "message": {"key": "message", "type": "str"},
+ }
+
+ def __init__(
+ self, *, index: Optional[int] = None, status_code: Optional[int] = None, message: Optional[str] = None, **kwargs
+ ):
+ """
+ :keyword index: The index in the original payload of the item.
+ :paramtype index: int
+ :keyword status_code: The item specific `HTTP Response status code <#Response Status Codes>`_.
+ :paramtype status_code: int
+ :keyword message: The error message.
+ :paramtype message: str
+ """
+ super(TelemetryErrorDetails, self).__init__(**kwargs)
+ self.index = index
+ self.status_code = status_code
+ self.message = message
+
+
+class TelemetryEventData(MonitorDomain):
+ """Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar name: Required. Event name. Keep it low cardinality to allow proper grouping and useful
+ metrics.
+ :vartype name: str
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "name": {"required": True, "max_length": 512, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "name": {"key": "name", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(
+ self,
+ *,
+ version: int = 2,
+ name: str,
+ additional_properties: Optional[Dict[str, Any]] = None,
+ properties: Optional[Dict[str, str]] = None,
+ measurements: Optional[Dict[str, float]] = None,
+ **kwargs
+ ):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword name: Required. Event name. Keep it low cardinality to allow proper grouping and
+ useful metrics.
+ :paramtype name: str
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(TelemetryEventData, self).__init__(additional_properties=additional_properties, version=version, **kwargs)
+ self.name = name
+ self.properties = properties
+ self.measurements = measurements
+
+
+class TelemetryExceptionData(MonitorDomain):
+ """An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :vartype additional_properties: dict[str, any]
+ :ivar version: Required. Schema version.
+ :vartype version: int
+ :ivar exceptions: Required. Exception chain - list of inner exceptions.
+ :vartype exceptions: list[~azure_monitor_client.models.TelemetryExceptionDetails]
+ :ivar severity_level: Severity level. Mostly used to indicate exception severity level when it
+ is reported by logging library. Possible values include: "Verbose", "Information", "Warning",
+ "Error", "Critical".
+ :vartype severity_level: str or ~azure_monitor_client.models.SeverityLevel
+ :ivar problem_id: Identifier of where the exception was thrown in code. Used for exceptions
+ grouping. Typically a combination of exception type and a function from the call stack.
+ :vartype problem_id: str
+ :ivar properties: Collection of custom properties.
+ :vartype properties: dict[str, str]
+ :ivar measurements: Collection of custom measurements.
+ :vartype measurements: dict[str, float]
+ """
+
+ _validation = {
+ "version": {"required": True},
+ "exceptions": {"required": True},
+ "problem_id": {"max_length": 1024, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "additional_properties": {"key": "", "type": "{object}"},
+ "version": {"key": "ver", "type": "int"},
+ "exceptions": {"key": "exceptions", "type": "[TelemetryExceptionDetails]"},
+ "severity_level": {"key": "severityLevel", "type": "str"},
+ "problem_id": {"key": "problemId", "type": "str"},
+ "properties": {"key": "properties", "type": "{str}"},
+ "measurements": {"key": "measurements", "type": "{float}"},
+ }
+
+ def __init__(
+ self,
+ *,
+ version: int = 2,
+ exceptions: List["TelemetryExceptionDetails"],
+ additional_properties: Optional[Dict[str, Any]] = None,
+ severity_level: Optional[Union[str, "SeverityLevel"]] = None,
+ problem_id: Optional[str] = None,
+ properties: Optional[Dict[str, str]] = None,
+ measurements: Optional[Dict[str, float]] = None,
+ **kwargs
+ ):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword version: Required. Schema version.
+ :paramtype version: int
+ :keyword exceptions: Required. Exception chain - list of inner exceptions.
+ :paramtype exceptions: list[~azure_monitor_client.models.TelemetryExceptionDetails]
+ :keyword severity_level: Severity level. Mostly used to indicate exception severity level when
+ it is reported by logging library. Possible values include: "Verbose", "Information",
+ "Warning", "Error", "Critical".
+ :paramtype severity_level: str or ~azure_monitor_client.models.SeverityLevel
+ :keyword problem_id: Identifier of where the exception was thrown in code. Used for exceptions
+ grouping. Typically a combination of exception type and a function from the call stack.
+ :paramtype problem_id: str
+ :keyword properties: Collection of custom properties.
+ :paramtype properties: dict[str, str]
+ :keyword measurements: Collection of custom measurements.
+ :paramtype measurements: dict[str, float]
+ """
+ super(TelemetryExceptionData, self).__init__(
+ additional_properties=additional_properties, version=version, **kwargs
+ )
+ self.exceptions = exceptions
+ self.severity_level = severity_level
+ self.problem_id = problem_id
+ self.properties = properties
+ self.measurements = measurements
+
+
+class TelemetryExceptionDetails(msrest.serialization.Model):
+ """Exception details of the exception in a chain.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: In case exception is nested (outer exception contains inner one), the id and outerId
+ properties are used to represent the nesting.
+ :vartype id: int
+ :ivar outer_id: The value of outerId is a reference to an element in ExceptionDetails that
+ represents the outer exception.
+ :vartype outer_id: int
+ :ivar type_name: Exception type name.
+ :vartype type_name: str
+ :ivar message: Required. Exception message.
+ :vartype message: str
+ :ivar has_full_stack: Indicates if full exception stack is provided in the exception. The stack
+ may be trimmed, such as in the case of a StackOverflow exception.
+ :vartype has_full_stack: bool
+ :ivar stack: Text describing the stack. Either stack or parsedStack should have a value.
+ :vartype stack: str
+ :ivar parsed_stack: List of stack frames. Either stack or parsedStack should have a value.
+ :vartype parsed_stack: list[~azure_monitor_client.models.StackFrame]
+ """
+
+ _validation = {
+ "type_name": {"max_length": 1024, "min_length": 0},
+ "message": {"required": True, "max_length": 32768, "min_length": 0},
+ "stack": {"max_length": 32768, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "id": {"key": "id", "type": "int"},
+ "outer_id": {"key": "outerId", "type": "int"},
+ "type_name": {"key": "typeName", "type": "str"},
+ "message": {"key": "message", "type": "str"},
+ "has_full_stack": {"key": "hasFullStack", "type": "bool"},
+ "stack": {"key": "stack", "type": "str"},
+ "parsed_stack": {"key": "parsedStack", "type": "[StackFrame]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ message: str,
+ id: Optional[int] = None,
+ outer_id: Optional[int] = None,
+ type_name: Optional[str] = None,
+ has_full_stack: Optional[bool] = True,
+ stack: Optional[str] = None,
+ parsed_stack: Optional[List["StackFrame"]] = None,
+ **kwargs
+ ):
+ """
+ :keyword id: In case exception is nested (outer exception contains inner one), the id and
+ outerId properties are used to represent the nesting.
+ :paramtype id: int
+ :keyword outer_id: The value of outerId is a reference to an element in ExceptionDetails that
+ represents the outer exception.
+ :paramtype outer_id: int
+ :keyword type_name: Exception type name.
+ :paramtype type_name: str
+ :keyword message: Required. Exception message.
+ :paramtype message: str
+ :keyword has_full_stack: Indicates if full exception stack is provided in the exception. The
+ stack may be trimmed, such as in the case of a StackOverflow exception.
+ :paramtype has_full_stack: bool
+ :keyword stack: Text describing the stack. Either stack or parsedStack should have a value.
+ :paramtype stack: str
+ :keyword parsed_stack: List of stack frames. Either stack or parsedStack should have a value.
+ :paramtype parsed_stack: list[~azure_monitor_client.models.StackFrame]
+ """
+ super(TelemetryExceptionDetails, self).__init__(**kwargs)
+ self.id = id
+ self.outer_id = outer_id
+ self.type_name = type_name
+ self.message = message
+ self.has_full_stack = has_full_stack
+ self.stack = stack
+ self.parsed_stack = parsed_stack
+
+
+class TelemetryItem(msrest.serialization.Model):
+ """System variables for a telemetry item.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar version: Envelope version. For internal use only. By assigning this the default, it will
+ not be serialized within the payload unless changed to a value other than #1.
+ :vartype version: int
+ :ivar name: Required. Type name of telemetry data item.
+ :vartype name: str
+ :ivar time: Required. Event date time when telemetry item was created. This is the wall clock
+ time on the client when the event was generated. There is no guarantee that the client's time
+ is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z'
+ character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the
+ number of decimal seconds digits provided are variable (and unspecified). Consumers should
+ handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies
+ a fixed length. Example: 2009-06-15T13:45:30.0000000Z.
+ :vartype time: ~datetime.datetime
+ :ivar sample_rate: Sampling rate used in application. This telemetry item represents 100 /
+ sampleRate actual telemetry items.
+ :vartype sample_rate: float
+ :ivar sequence: Sequence field used to track absolute order of uploaded events.
+ :vartype sequence: str
+ :ivar instrumentation_key: The instrumentation key of the Application Insights resource.
+ :vartype instrumentation_key: str
+ :ivar tags: A set of tags. Key/value collection of context properties. See ContextTagKeys for
+ information on available properties.
+ :vartype tags: dict[str, str]
+ :ivar data: Telemetry data item.
+ :vartype data: ~azure_monitor_client.models.MonitorBase
+ """
+
+ _validation = {
+ "name": {"required": True},
+ "time": {"required": True},
+ "sequence": {"max_length": 64, "min_length": 0},
+ }
+
+ _attribute_map = {
+ "version": {"key": "ver", "type": "int"},
+ "name": {"key": "name", "type": "str"},
+ "time": {"key": "time", "type": "iso-8601"},
+ "sample_rate": {"key": "sampleRate", "type": "float"},
+ "sequence": {"key": "seq", "type": "str"},
+ "instrumentation_key": {"key": "iKey", "type": "str"},
+ "tags": {"key": "tags", "type": "{str}"},
+ "data": {"key": "data", "type": "MonitorBase"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: str,
+ time: datetime.datetime,
+ version: Optional[int] = 1,
+ sample_rate: Optional[float] = 100,
+ sequence: Optional[str] = None,
+ instrumentation_key: Optional[str] = None,
+ tags: Optional[Dict[str, str]] = None,
+ data: Optional["MonitorBase"] = None,
+ **kwargs
+ ):
+ """
+ :keyword version: Envelope version. For internal use only. By assigning this the default, it
+ will not be serialized within the payload unless changed to a value other than #1.
+ :paramtype version: int
+ :keyword name: Required. Type name of telemetry data item.
+ :paramtype name: str
+ :keyword time: Required. Event date time when telemetry item was created. This is the wall
+ clock time on the client when the event was generated. There is no guarantee that the client's
+ time is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z'
+ character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the
+ number of decimal seconds digits provided are variable (and unspecified). Consumers should
+ handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies
+ a fixed length. Example: 2009-06-15T13:45:30.0000000Z.
+ :paramtype time: ~datetime.datetime
+ :keyword sample_rate: Sampling rate used in application. This telemetry item represents 100 /
+ sampleRate actual telemetry items.
+ :paramtype sample_rate: float
+ :keyword sequence: Sequence field used to track absolute order of uploaded events.
+ :paramtype sequence: str
+ :keyword instrumentation_key: The instrumentation key of the Application Insights resource.
+ :paramtype instrumentation_key: str
+ :keyword tags: A set of tags. Key/value collection of context properties. See ContextTagKeys
+ for information on available properties.
+ :paramtype tags: dict[str, str]
+ :keyword data: Telemetry data item.
+ :paramtype data: ~azure_monitor_client.models.MonitorBase
+ """
+ super(TelemetryItem, self).__init__(**kwargs)
+ self.version = version
+ self.name = name
+ self.time = time
+ self.sample_rate = sample_rate
+ self.sequence = sequence
+ self.instrumentation_key = instrumentation_key
+ self.tags = tags
+ self.data = data
+
+
+class TrackResponse(msrest.serialization.Model):
+ """Response containing the status of each telemetry item.
+
+ :ivar items_received: The number of items received.
+ :vartype items_received: int
+ :ivar items_accepted: The number of items accepted.
+ :vartype items_accepted: int
+ :ivar errors: An array of error detail objects.
+ :vartype errors: list[~azure_monitor_client.models.TelemetryErrorDetails]
+ """
+
+ _attribute_map = {
+ "items_received": {"key": "itemsReceived", "type": "int"},
+ "items_accepted": {"key": "itemsAccepted", "type": "int"},
+ "errors": {"key": "errors", "type": "[TelemetryErrorDetails]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ items_received: Optional[int] = None,
+ items_accepted: Optional[int] = None,
+ errors: Optional[List["TelemetryErrorDetails"]] = None,
+ **kwargs
+ ):
+ """
+ :keyword items_received: The number of items received.
+ :paramtype items_received: int
+ :keyword items_accepted: The number of items accepted.
+ :paramtype items_accepted: int
+ :keyword errors: An array of error detail objects.
+ :paramtype errors: list[~azure_monitor_client.models.TelemetryErrorDetails]
+ """
+ super(TrackResponse, self).__init__(**kwargs)
+ self.items_received = items_received
+ self.items_accepted = items_accepted
+ self.errors = errors
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/operations/__init__.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/operations/__init__.py
new file mode 100644
index 00000000..a1b6ce78
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/operations/__init__.py
@@ -0,0 +1,13 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from ._azure_monitor_client_operations import AzureMonitorClientOperationsMixin
+
+__all__ = [
+ "AzureMonitorClientOperationsMixin",
+]
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/operations/_azure_monitor_client_operations.py b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/operations/_azure_monitor_client_operations.py
new file mode 100644
index 00000000..6bc3c37e
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/operations/_azure_monitor_client_operations.py
@@ -0,0 +1,140 @@
+# pylint: disable=too-many-lines
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import TYPE_CHECKING
+
+from msrest import Serializer
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import HttpResponse
+from azure.core.rest import HttpRequest
+
+from .. import models as _models
+from .._vendor import _convert_request
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from typing import Any, Callable, Dict, List, Optional, TypeVar
+
+ T = TypeVar("T")
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+# fmt: off
+
+def build_track_request(
+ **kwargs # type: Any
+):
+ # type: (...) -> HttpRequest
+ content_type = kwargs.pop('content_type', None) # type: Optional[str]
+
+ accept = "application/json"
+ # Construct URL
+ _url = kwargs.pop("template_url", "/track")
+
+ # Construct headers
+ _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ if content_type is not None:
+ _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str')
+ _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=_url,
+ headers=_header_parameters,
+ **kwargs
+ )
+
+
+# fmt: on
+class AzureMonitorClientOperationsMixin(object):
+
+ def track(
+ self,
+ body, # type: List["_models.TelemetryItem"]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "_models.TrackResponse"
+ """Track telemetry events.
+
+ This operation sends a sequence of telemetry events that will be monitored by Azure Monitor.
+
+ :param body: The list of telemetry events to track.
+ :type body: list[~azure_monitor_client.models.TelemetryItem]
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: TrackResponse, or the result of cls(response)
+ :rtype: ~azure_monitor_client.models.TrackResponse
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop("cls", None) # type: ClsType["_models.TrackResponse"]
+ error_map = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 400: lambda response: HttpResponseError(
+ response=response, model=self._deserialize(_models.TrackResponse, response)
+ ),
+ 402: lambda response: HttpResponseError(
+ response=response, model=self._deserialize(_models.TrackResponse, response)
+ ),
+ 429: lambda response: HttpResponseError(
+ response=response, model=self._deserialize(_models.TrackResponse, response)
+ ),
+ 500: lambda response: HttpResponseError(
+ response=response, model=self._deserialize(_models.TrackResponse, response)
+ ),
+ 503: lambda response: HttpResponseError(
+ response=response, model=self._deserialize(_models.TrackResponse, response)
+ ),
+ }
+ error_map.update(kwargs.pop("error_map", {}))
+
+ content_type = kwargs.pop("content_type", "application/json") # type: Optional[str]
+
+ _json = self._serialize.body(body, "[TelemetryItem]")
+
+ request = build_track_request(
+ content_type=content_type,
+ json=_json,
+ template_url=self.track.metadata["url"],
+ )
+ request = _convert_request(request)
+ path_format_arguments = {
+ "Host": self._serialize.url("self._config.host", self._config.host, "str", skip_quote=True),
+ }
+ request.url = self._client.format_url(request.url, **path_format_arguments)
+
+ pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access
+ request, stream=False, **kwargs
+ )
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 206]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize("TrackResponse", pipeline_response)
+
+ if response.status_code == 206:
+ deserialized = self._deserialize("TrackResponse", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ track.metadata = {"url": "/track"} # type: ignore
diff --git a/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/py.typed b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/py.typed
new file mode 100644
index 00000000..e5aff4f8
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/monitor/opentelemetry/exporter/_generated/py.typed
@@ -0,0 +1 @@
+# Marker file for PEP 561. \ No newline at end of file