@@ -68,13 +68,19 @@ def track_pageview(
68
68
) -> None :
69
69
"""
70
70
Send information about the page viewed in the application (a web page for instance).
71
+
71
72
:param name: the name of the page that was viewed.
73
+ :type name: str
72
74
:param url: the URL of the page that was viewed.
75
+ :type url: str
73
76
:param duration: the duration of the page view in milliseconds. (defaults to: 0)
77
+ :duration: int
74
78
:param properties: the set of custom properties the client wants attached to this data item.
75
79
(defaults to: None)
80
+ :type properties: :class:`typing.Dict[str, object]`
76
81
:param measurements: the set of custom measurements the client wants to attach to this data item.
77
82
(defaults to: None)
83
+ :type measurements: :class:`typing.Dict[str, object]`
78
84
"""
79
85
self ._client .track_pageview (name , url , duration , properties , measurements )
80
86
@@ -88,13 +94,16 @@ def track_exception(
88
94
) -> None :
89
95
"""
90
96
Send information about a single exception that occurred in the application.
97
+
91
98
:param exception_type: the type of the exception that was thrown.
92
99
:param value: the exception that the client wants to send.
93
100
:param trace: the traceback information as returned by :func:`sys.exc_info`.
94
101
:param properties: the set of custom properties the client wants attached to this data item.
95
102
(defaults to: None)
103
+ :type properties: :class:`typing.Dict[str, object]`
96
104
:param measurements: the set of custom measurements the client wants to attach to this data item.
97
105
(defaults to: None)
106
+ :type measurements: :class:`typing.Dict[str, object]`
98
107
"""
99
108
self ._client .track_exception (
100
109
exception_type , value , trace , properties , measurements
@@ -108,11 +117,15 @@ def track_event(
108
117
) -> None :
109
118
"""
110
119
Send information about a single event that has occurred in the context of the application.
120
+
111
121
:param name: the data to associate to this event.
122
+ :type name: str
112
123
:param properties: the set of custom properties the client wants attached to this data item.
113
124
(defaults to: None)
125
+ :type properties: :class:`typing.Dict[str, object]`
114
126
:param measurements: the set of custom measurements the client wants to attach to this data item.
115
127
(defaults to: None)
128
+ :type measurements: :class:`typing.Dict[str, object]`
116
129
"""
117
130
self ._client .track_event (name , properties = properties , measurements = measurements )
118
131
@@ -129,19 +142,27 @@ def track_metric(
129
142
) -> NotImplemented :
130
143
"""
131
144
Send information about a single metric data point that was captured for the application.
145
+
132
146
:param name: The name of the metric that was captured.
147
+ :type name: str
133
148
:param value: The value of the metric that was captured.
149
+ :type value: float
134
150
:param tel_type: The type of the metric. (defaults to: TelemetryDataPointType.aggregation`)
135
151
:param count: the number of metrics that were aggregated into this data point. (defaults to: None)
152
+ :type count: int
136
153
:param min_val: the minimum of all metrics collected that were aggregated into this data point.
137
154
(defaults to: None)
155
+ :type min_val: float
138
156
:param max_val: the maximum of all metrics collected that were aggregated into this data point.
139
157
(defaults to: None)
158
+ :type max_val: float
140
159
:param std_dev: the standard deviation of all metrics collected that were aggregated into this data point.
141
160
(defaults to: None)
161
+ :type std_dev: float
142
162
:param properties: the set of custom properties the client wants attached to this data item.
143
163
(defaults to: None)
144
- """
164
+ :type properties: :class:`typing.Dict[str, object]`
165
+ """
145
166
self ._client .track_metric (
146
167
name , value , tel_type , count , min_val , max_val , std_dev , properties
147
168
)
@@ -151,8 +172,11 @@ def track_trace(
151
172
):
152
173
"""
153
174
Sends a single trace statement.
175
+
154
176
:param name: the trace statement.
177
+ :type name: str
155
178
:param properties: the set of custom properties the client wants attached to this data item. (defaults to: None)
179
+ :type properties: :class:`typing.Dict[str, object]`
156
180
:param severity: the severity level of this trace, one of DEBUG, INFO, WARNING, ERROR, CRITICAL
157
181
"""
158
182
self ._client .track_trace (name , properties , severity )
@@ -172,19 +196,30 @@ def track_request(
172
196
):
173
197
"""
174
198
Sends a single request that was captured for the application.
199
+
175
200
:param name: The name for this request. All requests with the same name will be grouped together.
201
+ :type name: str
176
202
:param url: The actual URL for this request (to show in individual request instances).
203
+ :type url: str
177
204
:param success: True if the request ended in success, False otherwise.
205
+ :type success: bool
178
206
:param start_time: the start time of the request. The value should look the same as the one returned by
179
207
:func:`datetime.isoformat`. (defaults to: None)
208
+ :type start_time: str
180
209
:param duration: the number of milliseconds that this request lasted. (defaults to: None)
210
+ :type duration: int
181
211
:param response_code: the response code that this request returned. (defaults to: None)
212
+ :type response_code: str
182
213
:param http_method: the HTTP method that triggered this request. (defaults to: None)
214
+ :type http_method: str
183
215
:param properties: the set of custom properties the client wants attached to this data item.
184
216
(defaults to: None)
217
+ :type properties: :class:`typing.Dict[str, object]`
185
218
:param measurements: the set of custom measurements the client wants to attach to this data item.
186
219
(defaults to: None)
220
+ :type measurements: :class:`typing.Dict[str, object]`
187
221
:param request_id: the id for this request. If None, a new uuid will be generated. (defaults to: None)
222
+ :type request_id: str
188
223
"""
189
224
self ._client .track_request (
190
225
name ,
@@ -214,25 +249,33 @@ def track_dependency(
214
249
):
215
250
"""
216
251
Sends a single dependency telemetry that was captured for the application.
252
+
217
253
:param name: the name of the command initiated with this dependency call. Low cardinality value.
218
254
Examples are stored procedure name and URL path template.
255
+ :type name: str
219
256
:param data: the command initiated by this dependency call.
257
+ :type data: str
220
258
Examples are SQL statement and HTTP URL with all query parameters.
221
259
:param type_name: the dependency type name. Low cardinality value for logical grouping of dependencies and
222
260
interpretation of other fields like commandName and resultCode. Examples are SQL, Azure table, and HTTP.
223
- (default to: None)
224
- :param target: the target site of a dependency call. Examples are server name, host address.
225
261
(default to: None)
226
- :param duration: the number of milliseconds that this dependency call lasted.
227
- (defaults to: None)
228
- :param success: true if the dependency call ended in success, false otherwise.
229
- (defaults to: None)
F438
262
+ :type type_name: str
263
+ :param target: the target site of a dependency call. Examples are server name, host address. (default to: None)
264
+ :type target: str
265
+ :param duration: the number of milliseconds that this dependency call lasted. (defaults to: None)
266
+ :type duration: int
267
+ :param success: true if the dependency call ended in success, false otherwise. (defaults to: None)
268
+ :type success: bool
230
269
:param result_code: the result code of a dependency call. Examples are SQL error code and HTTP status code.
231
270
(defaults to: None)
271
+ :type result_code: str
232
272
:param properties: the set of custom properties the client wants attached to this data item. (defaults to: None)
273
+ :type properties: :class:`typing.Dict[str, object]`
233
274
:param measurements: the set of custom measurements the client wants to attach to this data item.
234
275
(defaults to: None)
235
- :param id: the id for this dependency call. If None, a new uuid will be generated. (defaults to: None)
276
+ :type measurements: :class:`typing.Dict[str, object]`
277
+ :param dependency_id: the id for this dependency call. If None, a new uuid will be generated. (defaults to: None)
278
+ :type dependency_id: str
236
279
"""
237
280
self ._client .track_dependency (
238
281
name ,
0 commit comments