Skip to content

Commit

Permalink
[Main][Task]27365739: Turn on Ikey depreciation message with sampling…
Browse files Browse the repository at this point in the history
… rate 0.0001% (#2317)

* turn cfgsync

* update

* update
  • Loading branch information
Karlie-777 committed Mar 29, 2024
1 parent 81c2a18 commit d5a0b48
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -457,7 +457,11 @@ As part of changes being introduced in version 2.6.0 we are deprecating and remo

## Service Notification

As part of changes being introduced in version 3.0.3, we are intergrating [cfgSync plugin](https://github.com/microsoft/ApplicationInsights-JS/tree/main/extensions/applicationinsights-cfgsync-js) and [throttle manager](./docs/ThrottleMgr.md) to AISKU. By default, these components will be disabled during the current initial release, but they will be enabled by default in future releases once extensive production level testing is completed.
As part of changes being introduced in version 3.0.3, we are intergrating [cfgSync plugin](https://github.com/microsoft/ApplicationInsights-JS/tree/main/extensions/applicationinsights-cfgsync-js) and [throttle manager](./docs/ThrottleMgr.md) to AISKU.
For versions before 3.1.2, these components are disabled by default.

For versions after 3.1.2, these components are **turned on by default**.
See [feature opt-in status](./docs/WebConfig.md) for more details.

## Single Page Applications

Expand Down
6 changes: 3 additions & 3 deletions docs/WebConfig.md
Expand Up @@ -15,10 +15,10 @@ CDN details
| enabled | General on/off | `true` (on)
| featureOptIn | opt-in feature list | iKeyUsage (*inital opt-in*)
| featureOptIn.iKeyUsage.mode | feature-iKeyUsage enable/disable status | `3` (enable/opt-in)
| featureOptIn.iKeyUsage.onCfg | override values of the following cdn `config` when feature-iKeyUsage is enabled | <sub>DefaultThrottleMsgKey</sub></br>throttleMgrCfg.109.enabled: `false`</br> <sub>InstrumentationKeyDeprecation</sub></br> throttleMgrCfg.106.enabled: `true`
| featureOptIn.iKeyUsage.offCfg | override values of the following cdn `config` when feature-iKeyUsage is disabled | <sub>DefaultThrottleMsgKey</sub></br>throttleMgrCfg.109.enabled: `false`</br> <sub>InstrumentationKeyDeprecation</sub></br> throttleMgrCfg.106.enabled: `false`
| featureOptIn.iKeyUsage.onCfg | override values of the following cdn `config` when feature-iKeyUsage is enabled | <sub>DefaultThrottleMsgKey</sub></br>throttleMgrCfg.109.disabled: `false`</br> <sub>InstrumentationKeyDeprecation</sub></br> throttleMgrCfg.106.disabled: `false`
| featureOptIn.iKeyUsage.offCfg | override values of the following cdn `config` when feature-iKeyUsage is disabled | <sub>DefaultThrottleMsgKey</sub></br>throttleMgrCfg.109.disabled: `true`</br> <sub>InstrumentationKeyDeprecation</sub></br> throttleMgrCfg.106.disabled: `true`
| config | override values for user's core config | throttleMgrCfg
| config.throttleMgrCfg | override values for user's throttleMgrCfg under core config | <sub>InstrumentationKeyDeprecation</sub></br> throttleMgrCfg.106:</br>{ `"enabled": true`, *// will send ikey InstrumentationKey Deprecation message*</br>`"limit": { "samplingRate": 1, "maxSendNumber": 1}`, *// sampling rate: 0.0001%, and will send max one message per time* </br>`"interval": {"monthInterval": 2,"daysOfMonth": [1]}`} *// message will be sent on the first day every 2 months*,</br><sub>DefaultThrottleMsgKey</sub></br>throttleMgrCfg.109:</br>{ `"enabled": false`, *// will not send default ikey message*</br> ... *// all other settings are same with the InstrumentationKeyDeprecation settings*}</br>
| config.throttleMgrCfg | override values for user's throttleMgrCfg under core config | <sub>InstrumentationKeyDeprecation</sub></br> throttleMgrCfg.106:</br>{ `"disabled": false`, *// will send ikey InstrumentationKey Deprecation message*</br>`"limit": { "samplingRate": 1, "maxSendNumber": 1}`, *// sampling rate: 0.0001%, and will send max one message per time* </br>`"interval": {"monthInterval": 2,"daysOfMonth": [1]}`} *// message will be sent on the first day every 2 months*,</br><sub>DefaultThrottleMsgKey</sub></br>throttleMgrCfg.109:</br>{ `"disabled": false`, *// generally enable*</br> ... *// all other settings are same with the InstrumentationKeyDeprecation settings*}</br>

#### Note

Expand Down
12 changes: 6 additions & 6 deletions tools/config/config.json
Expand Up @@ -5,19 +5,19 @@
"iKeyUsage": {
"mode": 3,
"onCfg": {
"throttleMgrCfg.109.enabled": false,
"throttleMgrCfg.106.enabled": true
"throttleMgrCfg.109.disabled": false,
"throttleMgrCfg.106.disabled": false
},
"offCfg": {
"throttleMgrCfg.109.enabled": false,
"throttleMgrCfg.106.enabled": false
"throttleMgrCfg.109.disabled": true,
"throttleMgrCfg.106.disabled": true
}
}
},
"config": {
"throttleMgrCfg": {
"109": {
"enabled": false,
"disabled": false,
"limit": {
"samplingRate": 1,
"maxSendNumber": 1
Expand All @@ -28,7 +28,7 @@
}
},
"106": {
"enabled": true,
"disabled": false,
"limit": {
"samplingRate": 1,
"maxSendNumber": 1
Expand Down
9 changes: 5 additions & 4 deletions tools/config/scripts/publishReleaseToCdn.ps1
Expand Up @@ -6,7 +6,7 @@ param (
[string] $resourceGroup = $null, # Identifies the target Azure Subscription Resource Group (if not encoded in the cdnStorePath)
[string] $sasToken = $null, # The SAS Token to use rather than using or attempting to login
[string] $logPath = $null, # The location where logs should be written
[switch] $overwrite = $false, # Overwrite any existing files
[switch] $overwrite = $true, # Overwrite any existing files
[switch] $testOnly = $false, # Uploads to a "tst" test container on the storage account
[switch] $cdn = $false # (No longer used -- kept for now for backward compatibility)
)
Expand Down Expand Up @@ -81,6 +81,7 @@ if ([string]::IsNullOrWhiteSpace($jsSdkDir) -eq $true) {

$cacheControl1Year = "public, max-age=31536000, immutable, no-transform";
$contentType = "text/javascript; charset=utf-8";
$cacheControl30Min = "public, max-age=1800, immutable, no-transform";

Write-LogParams

Expand Down Expand Up @@ -110,9 +111,9 @@ Write-Log "---------------------------------------------------------------------
# Publish the full versioned files to all release folders
if ($version.type -eq "release") {
# Normal publishing deployment
PublishFiles $releaseFiles "beta" $cacheControl1Year $contentType $overwrite
PublishFiles $releaseFiles "next" $cacheControl1Year $contentType $overwrite
PublishFiles $releaseFiles "scripts/b" $cacheControl1Year $contentType $overwrite
PublishFiles $releaseFiles "beta" $cacheControl30Min $contentType $overwrite
PublishFiles $releaseFiles "next" $cacheControl30Min $contentType $overwrite
PublishFiles $releaseFiles "scripts/b" $cacheControl30Min $contentType $overwrite
}
elseif ($version.type -eq "rc") {
PublishFiles $releaseFiles "beta" $cacheControl1Year $contentType $overwrite
Expand Down

0 comments on commit d5a0b48

Please sign in to comment.