Merged
Conversation
mhshami01
reviewed
May 26, 2021
src/azure-iot-edge-installer.sh
Outdated
| add_option_args "SCOPE_ID" -s --scope-id | ||
| add_option_args "REGISTRATION_ID" -r --registration-id | ||
| add_option_args "SYMMETRIC_KEY" -k --symmetric-key | ||
| add_option_args "SYMMETRIC_KEY" -cv --correlation-vector |
mhshami01
reviewed
May 26, 2021
src/utils.sh
Outdated
| local e_code=$? | ||
| log_info "Exit %d\n" $e_code | ||
|
|
||
| send_appinsight_telemetry e_code |
mhshami01
reviewed
May 26, 2021
src/utils.sh
Outdated
| IngestionEndpoint="https://dc.services.visualstudio.com/v2/track" | ||
| EventName="Azure-IoT-Edge-Installer-Summary" | ||
| DeviceUniqueID="xinzedPC" | ||
| CurrentTime=$(echo `date '+%Y-%m-%dT%H:%M:%S.%N'`) |
Contributor
There was a problem hiding this comment.
CurrentTime should be generated immediately before the send command
mhshami01
reviewed
May 26, 2021
src/utils.sh
Outdated
| fi | ||
| } | ||
|
|
||
| export -f send_appinsight_telemetry |
Contributor
There was a problem hiding this comment.
export is not needed since we are only using it in the same file?
mhshami01
reviewed
May 26, 2021
mhshami01
reviewed
May 26, 2021
src/utils.sh
Outdated
| # handle correlation vector | ||
| if [ -z $2 ]; | ||
| then | ||
| CORRELATION_VECTOR=$(uuidgen) |
Contributor
There was a problem hiding this comment.
uuidgen requires the package 'uuid-runtime' and is not installed on all distributions by default. can we use uuid instead?
mhshami01
reviewed
May 26, 2021
mhshami01
reviewed
May 26, 2021
mhshami01
reviewed
May 26, 2021
marianan
reviewed
May 26, 2021
marianan
reviewed
May 26, 2021
src/utils.sh
Outdated
| local optin=$(get_opt_in_selection ) | ||
| if [[ $optin == true ]]; | ||
| then | ||
| wget --header='Content-Type: application/json' --header='Accept-Charset: UTF-8' --post-data '{"name":"Microsoft.ApplicationInsights.'$InstrumentationKey'.Event","time": "'$CurrentTime'","iKey": "'$InstrumentationKey'","tags":{"ai.cloud.roleInstance": "'$DeviceUniqueID'"},"data":{"baseType": "EventData","baseData": {"ver": "'$SchemaVersion'","name": "'$EventName'","cv": "'$CORRELATION_VECTOR'","properties":{'$customPropertiesObj'},"measurements":{"duration":57}}}}' $IngestionEndpoint |
marianan
reviewed
May 26, 2021
mhshami01
reviewed
May 26, 2021
Contributor
There was a problem hiding this comment.
I don't think this check is needed. By the time we get here we already know that is is '18.04' :-)
mhshami01
reviewed
May 26, 2021
mhshami01
reviewed
May 26, 2021
mhshami01
reviewed
May 26, 2021
| VERSION_TAG="v0.0.1" | ||
|
|
||
| # where am i | ||
| # where am I |
mhshami01
reviewed
May 26, 2021
src/utils.sh
Outdated
Contributor
There was a problem hiding this comment.
since we need this for other functions, please move it outside of the function scope in case it causes side effects...
mhshami01
approved these changes
May 26, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.