-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of generated telemetry client #25
Conversation
"AWS Toolkit For VisualStudio", | ||
"AWS Toolkit For VS Code", | ||
"Amazon Q For JetBrains", | ||
"Amazon Q For VS Code" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to add Amazon Q for Eclipse
or for now, can we use AWS Toolkit for Eclipse?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep - good catch. The entire schema likely needs updates. This was lifted out of the JB toolkit to get started with. For now I will add the new product type and we can evolve the rest of the schema over time as needed.
} | ||
|
||
@Override | ||
public final AwsSessionCredentials resolveCredentials() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if any of the commands in the function fail, do we get an exception from the underlying code that we need to handle at the caller side? or we get empty string values for credentials, which then we treat as an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They throw unchecked exceptions back up to the caller. I will be expanding the telemetry wrapper over time to include better error handling. Basically events will be batched and retried for sending later if errors occur.
private static final ToolkitTelemetryClient CLIENT = createDefaultTelemetryClient(); | ||
private static final Region TELEMETRY_REGION = Region.US_EAST_1; | ||
private static final String TELEMETRY_ENDPOINT = "https://client-telemetry.us-east-1.amazonaws.com"; | ||
private static final String TELEMETRY_IDENTITY_POOL = "us-east-1:820fd6d1-95c0-4ca4-bffb-3f01d32da842"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's going to be same for all stages: gamma, dev, prod?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't include details for non public endpoints in the source. What we can do later if needed is make it configurable or environment variable so it can be overridden for internal testing.
Description of changes:
Implementation of a AWS SDK backed generated Toolkit Telemetry client that will be used to send both telemetry events and user feedback.
The client is automatically generated as part of the plugin's Maven build and moved to the expected location in
target/generated-sources
. I have wired up a basic wrapper that provides an instance of the client configured with Cognito Identity auth based on the Toolkit's identity pool.Next step is to make the generated telemetry definitions available so event and feedback payloads can be marshalled into this client.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.