Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/core/src/amazonqFeatureDev/client/featureDev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
import { ToolkitError, isAwsError } from '../../shared/errors'
import { getCodewhispererConfig } from '../../codewhisperer/client/codewhisperer'
import { createCodeWhispererChatStreamingClient } from '../../shared/clients/codewhispererChatClient'
import { getClientId, getOptOutPreference, getOperatingSystem } from '../../shared/telemetry/util'
import { getClientId, getOptOutPreference, getOperatingSystem, getUserAgent } from '../../shared/telemetry/util'
import { extensionVersion } from '../../shared/vscode/env'

// Re-enable once BE is able to handle retries.
Expand All @@ -46,6 +46,7 @@ export async function createFeatureDevProxyClient(options?: Partial<ServiceOptio
region: cwsprConfig.region,
endpoint: cwsprConfig.endpoint,
token: new Token({ token: bearerToken }),
customUserAgent: getUserAgent(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already done by createAwsService(), which is called on line 42 above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is a caller to createFeatureDevProxyClient perhaps passing customUserAgent and overriding this?

Copy link
Contributor Author

@chengoramazon chengoramazon Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can not see where customUserAgent predefined in createAwsService. Can you point me to the right place?

I have verified there are not callers override the customUserAgent.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (userAgent && !opt.customUserAgent) {
opt.customUserAgent = getUserAgent({ includePlatform: true, includeClientId: true })
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I am going to cancel this PR then.

httpOptions: {
connectTimeout: 10000, // 10 seconds, 3 times P99 API latency
},
Expand Down
Loading