@microsoft/agents-hosting 1.5.0-beta.6.ga236d9a19c → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +10 -9
- package/dist/src/activityHandler.js +2 -2
- package/dist/src/activityHandler.js.map +1 -1
- package/dist/src/agent-client/agentClient.js +49 -40
- package/dist/src/agent-client/agentClient.js.map +1 -1
- package/dist/src/agent-client/agentResponseHandler.js +2 -2
- package/dist/src/agent-client/agentResponseHandler.js.map +1 -1
- package/dist/src/app/agentApplication.d.ts +36 -10
- package/dist/src/app/agentApplication.js +169 -99
- package/dist/src/app/agentApplication.js.map +1 -1
- package/dist/src/app/agentApplicationBuilder.d.ts +15 -0
- package/dist/src/app/agentApplicationBuilder.js +22 -4
- package/dist/src/app/agentApplicationBuilder.js.map +1 -1
- package/dist/src/app/agentApplicationOptions.d.ts +38 -0
- package/dist/src/app/attachmentDownloader.js +2 -2
- package/dist/src/app/attachmentDownloader.js.map +1 -1
- package/dist/src/app/auth/authorization.js +12 -9
- package/dist/src/app/auth/authorization.js.map +1 -1
- package/dist/src/app/auth/authorizationManager.d.ts +18 -5
- package/dist/src/app/auth/authorizationManager.js +258 -45
- package/dist/src/app/auth/authorizationManager.js.map +1 -1
- package/dist/src/app/auth/handlerStorage.js +3 -1
- package/dist/src/app/auth/handlerStorage.js.map +1 -1
- package/dist/src/app/auth/handlers/agenticAuthorization.d.ts +19 -16
- package/dist/src/app/auth/handlers/agenticAuthorization.js +46 -52
- package/dist/src/app/auth/handlers/agenticAuthorization.js.map +1 -1
- package/dist/src/app/auth/handlers/azureBotAuthorization.d.ts +51 -75
- package/dist/src/app/auth/handlers/azureBotAuthorization.js +217 -192
- package/dist/src/app/auth/handlers/azureBotAuthorization.js.map +1 -1
- package/dist/src/app/auth/types.d.ts +100 -1
- package/dist/src/app/auth/utils.d.ts +10 -0
- package/dist/src/app/auth/utils.js +21 -0
- package/dist/src/app/auth/utils.js.map +1 -0
- package/dist/src/app/index.d.ts +1 -0
- package/dist/src/app/index.js +1 -0
- package/dist/src/app/index.js.map +1 -1
- package/dist/src/app/proactive/conversation.d.ts +43 -0
- package/dist/src/app/proactive/conversation.js +67 -0
- package/dist/src/app/proactive/conversation.js.map +1 -0
- package/dist/src/app/proactive/conversationBuilder.d.ts +54 -0
- package/dist/src/app/proactive/conversationBuilder.js +110 -0
- package/dist/src/app/proactive/conversationBuilder.js.map +1 -0
- package/dist/src/app/proactive/conversationReferenceBuilder.d.ts +68 -0
- package/dist/src/app/proactive/conversationReferenceBuilder.js +125 -0
- package/dist/src/app/proactive/conversationReferenceBuilder.js.map +1 -0
- package/dist/src/app/proactive/createConversationOptions.d.ts +30 -0
- package/dist/src/app/proactive/createConversationOptions.js +10 -0
- package/dist/src/app/proactive/createConversationOptions.js.map +1 -0
- package/dist/src/app/proactive/createConversationOptionsBuilder.d.ts +69 -0
- package/dist/src/app/proactive/createConversationOptionsBuilder.js +141 -0
- package/dist/src/app/proactive/createConversationOptionsBuilder.js.map +1 -0
- package/dist/src/app/proactive/index.d.ts +7 -0
- package/dist/src/app/proactive/index.js +26 -0
- package/dist/src/app/proactive/index.js.map +1 -0
- package/dist/src/app/proactive/proactive.d.ts +248 -0
- package/dist/src/app/proactive/proactive.js +310 -0
- package/dist/src/app/proactive/proactive.js.map +1 -0
- package/dist/src/app/proactive/proactiveOptions.d.ts +19 -0
- package/dist/src/app/proactive/proactiveOptions.js +5 -0
- package/dist/src/app/proactive/proactiveOptions.js.map +1 -0
- package/dist/src/app/streaming/streamingResponse.js +2 -2
- package/dist/src/app/streaming/streamingResponse.js.map +1 -1
- package/dist/src/app/teamsAttachmentDownloader.js +2 -2
- package/dist/src/app/teamsAttachmentDownloader.js.map +1 -1
- package/dist/src/app/turnState.js +2 -2
- package/dist/src/app/turnState.js.map +1 -1
- package/dist/src/auth/authConfiguration.d.ts +61 -0
- package/dist/src/auth/authConfiguration.js +52 -3
- package/dist/src/auth/authConfiguration.js.map +1 -1
- package/dist/src/auth/jwt-middleware.js +2 -2
- package/dist/src/auth/jwt-middleware.js.map +1 -1
- package/dist/src/auth/msalConnectionManager.js +20 -0
- package/dist/src/auth/msalConnectionManager.js.map +1 -1
- package/dist/src/auth/msalTokenCredential.js +3 -0
- package/dist/src/auth/msalTokenCredential.js.map +1 -1
- package/dist/src/auth/msalTokenProvider.js +136 -110
- package/dist/src/auth/msalTokenProvider.js.map +1 -1
- package/dist/src/baseAdapter.js +2 -2
- package/dist/src/baseAdapter.js.map +1 -1
- package/dist/src/cloudAdapter.js +201 -154
- package/dist/src/cloudAdapter.js.map +1 -1
- package/dist/src/connector-client/connectorClient.js +176 -127
- package/dist/src/connector-client/connectorClient.js.map +1 -1
- package/dist/src/errorHelper.js +108 -0
- package/dist/src/errorHelper.js.map +1 -1
- package/dist/src/middlewareSet.js +2 -2
- package/dist/src/middlewareSet.js.map +1 -1
- package/dist/src/oauth/userTokenClient.js +78 -48
- package/dist/src/oauth/userTokenClient.js.map +1 -1
- package/dist/src/observability/index.d.ts +2 -0
- package/dist/src/observability/index.js +21 -0
- package/dist/src/observability/index.js.map +1 -0
- package/dist/src/observability/metrics.d.ts +21 -0
- package/dist/src/observability/metrics.js +87 -0
- package/dist/src/observability/metrics.js.map +1 -0
- package/dist/src/observability/traces.d.ts +234 -0
- package/dist/src/observability/traces.js +962 -0
- package/dist/src/observability/traces.js.map +1 -0
- package/dist/src/state/agentState.js +2 -2
- package/dist/src/state/agentState.js.map +1 -1
- package/dist/src/storage/fileStorage.js +38 -28
- package/dist/src/storage/fileStorage.js.map +1 -1
- package/dist/src/storage/memoryStorage.js +41 -30
- package/dist/src/storage/memoryStorage.js.map +1 -1
- package/dist/src/transcript/fileTranscriptLogger.js +2 -2
- package/dist/src/transcript/fileTranscriptLogger.js.map +1 -1
- package/dist/src/transcript/transcriptLoggerMiddleware.js +2 -2
- package/dist/src/transcript/transcriptLoggerMiddleware.js.map +1 -1
- package/dist/src/turnContext.js +48 -42
- package/dist/src/turnContext.js.map +1 -1
- package/package.json +10 -9
- package/src/activityHandler.ts +1 -1
- package/src/agent-client/agentClient.ts +53 -42
- package/src/agent-client/agentResponseHandler.ts +1 -1
- package/src/app/agentApplication.ts +212 -86
- package/src/app/agentApplicationBuilder.ts +26 -4
- package/src/app/agentApplicationOptions.ts +43 -0
- package/src/app/attachmentDownloader.ts +1 -1
- package/src/app/auth/authorization.ts +11 -8
- package/src/app/auth/authorizationManager.ts +297 -45
- package/src/app/auth/handlerStorage.ts +3 -1
- package/src/app/auth/handlers/agenticAuthorization.ts +68 -72
- package/src/app/auth/handlers/azureBotAuthorization.ts +260 -264
- package/src/app/auth/types.ts +102 -1
- package/src/app/auth/utils.ts +22 -0
- package/src/app/index.ts +1 -0
- package/src/app/proactive/conversation.ts +87 -0
- package/src/app/proactive/conversationBuilder.ts +139 -0
- package/src/app/proactive/conversationReferenceBuilder.ts +161 -0
- package/src/app/proactive/createConversationOptions.ts +35 -0
- package/src/app/proactive/createConversationOptionsBuilder.ts +181 -0
- package/src/app/proactive/index.ts +10 -0
- package/src/app/proactive/proactive.ts +524 -0
- package/src/app/proactive/proactiveOptions.ts +24 -0
- package/src/app/streaming/streamingResponse.ts +1 -1
- package/src/app/teamsAttachmentDownloader.ts +1 -1
- package/src/app/turnState.ts +1 -1
- package/src/auth/authConfiguration.ts +58 -1
- package/src/auth/jwt-middleware.ts +1 -1
- package/src/auth/msalConnectionManager.ts +22 -0
- package/src/auth/msalTokenCredential.ts +4 -0
- package/src/auth/msalTokenProvider.ts +138 -107
- package/src/baseAdapter.ts +1 -1
- package/src/cloudAdapter.ts +239 -184
- package/src/connector-client/connectorClient.ts +169 -126
- package/src/errorHelper.ts +124 -0
- package/src/middlewareSet.ts +1 -1
- package/src/oauth/userTokenClient.ts +70 -46
- package/src/observability/index.ts +5 -0
- package/src/observability/metrics.ts +103 -0
- package/src/observability/traces.ts +988 -0
- package/src/state/agentState.ts +1 -1
- package/src/storage/fileStorage.ts +36 -26
- package/src/storage/memoryStorage.ts +40 -29
- package/src/transcript/fileTranscriptLogger.ts +1 -1
- package/src/transcript/transcriptLoggerMiddleware.ts +1 -1
- package/src/turnContext.ts +47 -41
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
import axios, { AxiosInstance } from 'axios'
|
|
5
5
|
import { Activity, ConversationReference } from '@microsoft/agents-activity'
|
|
6
|
-
import { debug } from '@microsoft/agents-
|
|
6
|
+
import { debug } from '@microsoft/agents-telemetry'
|
|
7
7
|
import { normalizeTokenExchangeState } from '../activityWireCompat'
|
|
8
8
|
import { AadResourceUrls, SignInResource, TokenExchangeRequest, TokenOrSinginResourceResponse, TokenResponse, TokenStatus } from './userTokenClient.types'
|
|
9
9
|
import { getProductInfo } from '../getProductInfo'
|
|
10
10
|
import { AuthProvider } from '../auth'
|
|
11
11
|
import { HeaderPropagation, HeaderPropagationCollection } from '../headerPropagation'
|
|
12
12
|
import { getTokenServiceEndpoint } from './customUserTokenAPI'
|
|
13
|
+
import { trace } from '@microsoft/agents-telemetry'
|
|
14
|
+
import { UserTokenClientTraceDefinitions } from '../observability'
|
|
13
15
|
|
|
14
16
|
const logger = debug('agents:user-token-client')
|
|
15
17
|
|
|
@@ -144,13 +146,17 @@ export class UserTokenClient {
|
|
|
144
146
|
* @returns A promise that resolves to the user token.
|
|
145
147
|
*/
|
|
146
148
|
async getUserToken (connectionName: string, channelIdComposite: string, userId: string, code?: string) : Promise<TokenResponse> {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
149
|
+
return trace(UserTokenClientTraceDefinitions.getUserToken, async ({ record }) => {
|
|
150
|
+
const [channelId] = Activity.parseChannelId(channelIdComposite)
|
|
151
|
+
const params = { connectionName, channelId, userId, code }
|
|
152
|
+
const response = await this.client.get('/api/usertoken/GetToken', { params })
|
|
153
|
+
record({ connectionName, channelId, userId, httpStatusCode: response.status?.toString() })
|
|
154
|
+
|
|
155
|
+
if (response?.data) {
|
|
156
|
+
return response.data as TokenResponse
|
|
157
|
+
}
|
|
158
|
+
return { token: undefined }
|
|
159
|
+
})
|
|
154
160
|
}
|
|
155
161
|
|
|
156
162
|
/**
|
|
@@ -161,12 +167,15 @@ export class UserTokenClient {
|
|
|
161
167
|
* @returns A promise that resolves when the sign-out operation is complete.
|
|
162
168
|
*/
|
|
163
169
|
async signOut (userId: string, connectionName: string, channelIdComposite: string) : Promise<void> {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
+
return trace(UserTokenClientTraceDefinitions.signOut, async ({ record }) => {
|
|
171
|
+
const [channelId] = Activity.parseChannelId(channelIdComposite)
|
|
172
|
+
const params = { userId, connectionName, channelId }
|
|
173
|
+
const response = await this.client.delete('/api/usertoken/SignOut', { params })
|
|
174
|
+
record({ userId, connectionName, channelId, httpStatusCode: response.status?.toString() })
|
|
175
|
+
if (response.status !== 200) {
|
|
176
|
+
throw new Error('Failed to sign out')
|
|
177
|
+
}
|
|
178
|
+
})
|
|
170
179
|
}
|
|
171
180
|
|
|
172
181
|
/**
|
|
@@ -178,17 +187,20 @@ export class UserTokenClient {
|
|
|
178
187
|
* @returns A promise that resolves to the signing resource.
|
|
179
188
|
*/
|
|
180
189
|
async getSignInResource (msAppId: string, connectionName: string, conversation: ConversationReference, relatesTo?: ConversationReference) : Promise<SignInResource> {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
return trace(UserTokenClientTraceDefinitions.getSignInResource, async ({ record }) => {
|
|
191
|
+
const tokenExchangeState = {
|
|
192
|
+
connectionName,
|
|
193
|
+
conversation,
|
|
194
|
+
relatesTo,
|
|
195
|
+
msAppId
|
|
196
|
+
}
|
|
197
|
+
const tokenExchangeStateNormalized = normalizeTokenExchangeState(tokenExchangeState)
|
|
198
|
+
const state = Buffer.from(JSON.stringify(tokenExchangeStateNormalized)).toString('base64')
|
|
199
|
+
const params = { state }
|
|
200
|
+
const response = await this.client.get('/api/botsignin/GetSignInResource', { params })
|
|
201
|
+
record({ connectionName, httpStatusCode: response.status?.toString() })
|
|
202
|
+
return response.data as SignInResource
|
|
203
|
+
})
|
|
192
204
|
}
|
|
193
205
|
|
|
194
206
|
/**
|
|
@@ -200,14 +212,17 @@ export class UserTokenClient {
|
|
|
200
212
|
* @returns A promise that resolves to the exchanged token.
|
|
201
213
|
*/
|
|
202
214
|
async exchangeTokenAsync (userId: string, connectionName: string, channelIdComposite: string, tokenExchangeRequest: TokenExchangeRequest) : Promise<TokenResponse> {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
215
|
+
return trace(UserTokenClientTraceDefinitions.exchangeToken, async ({ record }) => {
|
|
216
|
+
const [channelId] = Activity.parseChannelId(channelIdComposite)
|
|
217
|
+
const params = { userId, connectionName, channelId }
|
|
218
|
+
const response = await this.client.post('/api/usertoken/exchange', tokenExchangeRequest, { params })
|
|
219
|
+
record({ userId, connectionName, channelId, httpStatusCode: response.status?.toString() })
|
|
220
|
+
if (response?.data) {
|
|
221
|
+
return response.data as TokenResponse
|
|
222
|
+
} else {
|
|
223
|
+
return { token: undefined }
|
|
224
|
+
}
|
|
225
|
+
})
|
|
211
226
|
}
|
|
212
227
|
|
|
213
228
|
/**
|
|
@@ -223,11 +238,14 @@ export class UserTokenClient {
|
|
|
223
238
|
* @returns A promise that resolves to the token or sign-in resource response.
|
|
224
239
|
*/
|
|
225
240
|
async getTokenOrSignInResource (userId: string, connectionName: string, channelIdComposite: string, conversation: ConversationReference, relatesTo: ConversationReference, code: string, finalRedirect: string = '', fwdUrl: string = '') : Promise<TokenOrSinginResourceResponse> {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
241
|
+
return trace(UserTokenClientTraceDefinitions.getTokenOrSignInResource, async ({ record }) => {
|
|
242
|
+
const [channelId] = Activity.parseChannelId(channelIdComposite)
|
|
243
|
+
const state = Buffer.from(JSON.stringify({ conversation, relatesTo, connectionName, msAppId: this.msAppId })).toString('base64')
|
|
244
|
+
const params = { userId, connectionName, channelId, state, code, finalRedirect, fwdUrl }
|
|
245
|
+
const response = await this.client.get('/api/usertoken/GetTokenOrSignInResource', { params })
|
|
246
|
+
record({ userId, connectionName, channelId, httpStatusCode: response.status?.toString() })
|
|
247
|
+
return response.data as TokenOrSinginResourceResponse
|
|
248
|
+
})
|
|
231
249
|
}
|
|
232
250
|
|
|
233
251
|
/**
|
|
@@ -238,10 +256,13 @@ export class UserTokenClient {
|
|
|
238
256
|
* @returns A promise that resolves to the token status.
|
|
239
257
|
*/
|
|
240
258
|
async getTokenStatus (userId: string, channelIdComposite: string, include: string = null!): Promise<TokenStatus[]> {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
259
|
+
return trace(UserTokenClientTraceDefinitions.getTokenStatus, async ({ record }) => {
|
|
260
|
+
const [channelId] = Activity.parseChannelId(channelIdComposite)
|
|
261
|
+
const params = { userId, channelId, include }
|
|
262
|
+
const response = await this.client.get('/api/usertoken/GetTokenStatus', { params })
|
|
263
|
+
record({ userId, channelId, httpStatusCode: response.status?.toString() })
|
|
264
|
+
return response.data as TokenStatus[]
|
|
265
|
+
})
|
|
245
266
|
}
|
|
246
267
|
|
|
247
268
|
/**
|
|
@@ -253,10 +274,13 @@ export class UserTokenClient {
|
|
|
253
274
|
* @returns A promise that resolves to the AAD tokens.
|
|
254
275
|
*/
|
|
255
276
|
async getAadTokens (userId: string, connectionName: string, channelIdComposite: string, resourceUrls: AadResourceUrls) : Promise<Record<string, TokenResponse>> {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
277
|
+
return trace(UserTokenClientTraceDefinitions.getAadTokens, async ({ record }) => {
|
|
278
|
+
const [channelId] = Activity.parseChannelId(channelIdComposite)
|
|
279
|
+
const params = { userId, connectionName, channelId }
|
|
280
|
+
const response = await this.client.post('/api/usertoken/GetAadTokens', resourceUrls, { params })
|
|
281
|
+
record({ userId, connectionName, channelId, httpStatusCode: response.status?.toString() })
|
|
282
|
+
return response.data as Record<string, TokenResponse>
|
|
283
|
+
})
|
|
260
284
|
}
|
|
261
285
|
|
|
262
286
|
public updateAuthToken (token: string): void {
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { metric, MetricNames } from '@microsoft/agents-telemetry'
|
|
5
|
+
|
|
6
|
+
export const HostingMetrics = {
|
|
7
|
+
// Counters
|
|
8
|
+
activitiesReceivedCounter: metric.counter(MetricNames.ACTIVITIES_RECEIVED, {
|
|
9
|
+
unit: 'activities',
|
|
10
|
+
description: 'Total number of activities received by the adapter'
|
|
11
|
+
}),
|
|
12
|
+
|
|
13
|
+
activitiesSentCounter: metric.counter(MetricNames.ACTIVITIES_SENT, {
|
|
14
|
+
unit: 'activities',
|
|
15
|
+
description: 'Total number of outbound activities sent by the adapter'
|
|
16
|
+
}),
|
|
17
|
+
|
|
18
|
+
activitiesUpdatedCounter: metric.counter(MetricNames.ACTIVITIES_UPDATED, {
|
|
19
|
+
unit: 'activities',
|
|
20
|
+
description: 'Total number of activities updated by the adapter'
|
|
21
|
+
}),
|
|
22
|
+
|
|
23
|
+
activitiesDeletedCounter: metric.counter(MetricNames.ACTIVITIES_DELETED, {
|
|
24
|
+
unit: 'activities',
|
|
25
|
+
description: 'Total number of activities deleted by the adapter'
|
|
26
|
+
}),
|
|
27
|
+
|
|
28
|
+
connectorRequestsCounter: metric.counter(MetricNames.CONNECTOR_REQUESTS, {
|
|
29
|
+
unit: 'request',
|
|
30
|
+
description: 'Total number of outbound connector HTTP requests'
|
|
31
|
+
}),
|
|
32
|
+
|
|
33
|
+
agentClientRequestsCounter: metric.counter(MetricNames.AGENT_CLIENT_REQUESTS, {
|
|
34
|
+
unit: 'request',
|
|
35
|
+
description: 'Total number of inter-agent calls'
|
|
36
|
+
}),
|
|
37
|
+
|
|
38
|
+
turnsTotalCounter: metric.counter(MetricNames.TURNS_COUNT, {
|
|
39
|
+
unit: 'turn',
|
|
40
|
+
description: 'Total turns processed'
|
|
41
|
+
}),
|
|
42
|
+
|
|
43
|
+
turnsErrorsCounter: metric.counter(MetricNames.TURNS_ERRORS, {
|
|
44
|
+
unit: 'turn',
|
|
45
|
+
description: 'Total turns that resulted in an error'
|
|
46
|
+
}),
|
|
47
|
+
|
|
48
|
+
authTokenRequestsCounter: metric.counter(MetricNames.AUTH_TOKEN_REQUEST_COUNT, {
|
|
49
|
+
unit: 'request',
|
|
50
|
+
description: 'Total number of token acquisition attempts'
|
|
51
|
+
}),
|
|
52
|
+
|
|
53
|
+
userTokenClientRequestsCounter: metric.counter(MetricNames.USER_TOKEN_CLIENT_REQUESTS, {
|
|
54
|
+
unit: 'request',
|
|
55
|
+
description: 'Total number of user token client HTTP requests'
|
|
56
|
+
}),
|
|
57
|
+
|
|
58
|
+
proactiveOperationCounter: metric.counter(MetricNames.PROACTIVE_OPERATION_COUNT, {
|
|
59
|
+
unit: 'operation',
|
|
60
|
+
description: 'Total number of proactive operations (sendActivity, continueConversation, createConversation)'
|
|
61
|
+
}),
|
|
62
|
+
|
|
63
|
+
// Duration Histograms
|
|
64
|
+
adapterProcessDuration: metric.histogram(MetricNames.ADAPTER_PROCESS_DURATION, {
|
|
65
|
+
unit: 'ms',
|
|
66
|
+
description: 'Duration of the adapter process method in milliseconds'
|
|
67
|
+
}),
|
|
68
|
+
|
|
69
|
+
connectorRequestDuration: metric.histogram(MetricNames.CONNECTOR_REQUEST_DURATION, {
|
|
70
|
+
unit: 'ms',
|
|
71
|
+
description: 'Duration of outbound connector HTTP requests in milliseconds'
|
|
72
|
+
}),
|
|
73
|
+
|
|
74
|
+
agentClientRequestDuration: metric.histogram(MetricNames.AGENT_CLIENT_REQUEST_DURATION, {
|
|
75
|
+
unit: 'ms',
|
|
76
|
+
description: 'Duration of inter-agent call latency in milliseconds'
|
|
77
|
+
}),
|
|
78
|
+
|
|
79
|
+
turnDuration: metric.histogram(MetricNames.TURN_DURATION, {
|
|
80
|
+
unit: 'ms',
|
|
81
|
+
description: 'Duration of end-to-end turn processing in milliseconds'
|
|
82
|
+
}),
|
|
83
|
+
|
|
84
|
+
storageOperationDuration: metric.histogram(MetricNames.STORAGE_OPERATION_DURATION, {
|
|
85
|
+
unit: 'ms',
|
|
86
|
+
description: 'Duration of storage operations in milliseconds'
|
|
87
|
+
}),
|
|
88
|
+
|
|
89
|
+
authTokenDuration: metric.histogram(MetricNames.AUTH_TOKEN_DURATION, {
|
|
90
|
+
unit: 'ms',
|
|
91
|
+
description: 'Duration of token acquisition latency in milliseconds'
|
|
92
|
+
}),
|
|
93
|
+
|
|
94
|
+
userTokenClientRequestDuration: metric.histogram(MetricNames.USER_TOKEN_CLIENT_REQUEST_DURATION, {
|
|
95
|
+
unit: 'ms',
|
|
96
|
+
description: 'Duration of user token client HTTP requests in milliseconds'
|
|
97
|
+
}),
|
|
98
|
+
|
|
99
|
+
proactiveOperationDuration: metric.histogram(MetricNames.PROACTIVE_OPERATION_DURATION, {
|
|
100
|
+
unit: 'ms',
|
|
101
|
+
description: 'Duration of proactive operations in milliseconds'
|
|
102
|
+
})
|
|
103
|
+
}
|