You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/serverless/azure_app_service/linux_code.md
+59-3Lines changed: 59 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,8 @@ Set your Datadog site to {{< region-param key="dd_site" code="true" >}}. Default
133
133
134
134
Additional flags, like `--service` and `--env`, can be used to set the service and environment tags. For a full list of options, run `datadog-ci aas instrument --help`.
135
135
136
+
`datadog-ci aas instrument` only needs to be run once to set up instrumentation. You do not need to re-run it on every code deployment, only re-run it to change your Datadog configuration.
137
+
136
138
#### Azure Cloud Shell
137
139
138
140
To use the Datadog CLI in [Azure Cloud Shell][203], open a cloud shell, set your API key and site in the `DD_API_KEY` and `DD_SITE` environment variables, and use `npx` to run the CLI directly:
@@ -469,18 +471,28 @@ To instrument a [deployment slot][801] instead of the main web app, use one of t
469
471
{{< tabs >}}
470
472
{{% tab "Datadog CLI" %}}
471
473
472
-
Using the [Datadog CLI][1] (v5.9.0+), add the `--slot` flag. Use `--env`to set a distinct environment tag for the slot:
474
+
Using the [Datadog CLI][1] (v5.9.0+), add the `--slot` flag. Use `--service`, `--env`, and `--version`to set distinct unified service tagging values for the slot.
**Note**: When `datadog_env` is set on your main web app module, the module marks `DD_ENV` as a sticky setting, so your `env` tag persists across slot swaps.
@@ -526,6 +540,9 @@ Update your template to target a deployment slot instead of the main web app:
526
540
param webAppName string
527
541
param slotName string
528
542
543
+
@description('Names of app settings already marked slot-sticky on this web app. Pass [] for a new app with no existing sticky settings. This template does a full replace of slotConfigNames — omitting an existing sticky setting name will de-sticky it.')
@@ -583,6 +612,10 @@ Redeploy your updated template:
583
612
az deployment group create --resource-group <RESOURCE GROUP> --template-file <TEMPLATE FILE>
584
613
```
585
614
615
+
**Note**: Azure app settings swap between slots by default. The `slotConfigNames` resource above marks `DD_ENV` as sticky, so your `env` tag persists across slot swaps.
616
+
617
+
The `slotConfigNames` resource does a full replace of the sticky-settings list. Pass any settings already marked sticky in `existingStickyAppSettingNames`, or `[]` for a new app. Any name omitted is de-stickied.
618
+
586
619
{{% /tab %}}
587
620
{{% tab "ARM Template" %}}
588
621
@@ -602,6 +635,11 @@ Update your template to target a deployment slot instead of the main web app:
602
635
// ...
603
636
"datadogApiKey": {
604
637
"type":"securestring"
638
+
},
639
+
"existingStickyAppSettingNames": {
640
+
"type":"array",
641
+
"defaultValue": [],
642
+
"metadata": { "description":"Names of app settings already marked slot-sticky on this web app. Pass [] for a new app with no existing sticky settings. This template does a full replace of slotConfigNames — omitting an existing sticky setting name will de-sticky it." }
605
643
}
606
644
},
607
645
"variables": {
@@ -655,6 +693,20 @@ Update your template to target a deployment slot instead of the main web app:
655
693
}
656
694
}]
657
695
}
696
+
},
697
+
// Marks DD_ENV as slot-sticky so your `env` tag persists across slot swaps. Replaces the
698
+
// full slotConfigNames list — existingStickyAppSettingNames must include any settings
699
+
// already marked sticky or they will be de-stickied.
@@ -666,6 +718,10 @@ Redeploy your updated template:
666
718
az deployment group create --resource-group <RESOURCE GROUP> --template-file <TEMPLATE FILE>
667
719
```
668
720
721
+
**Note**: Azure app settings swap between slots by default. The `slotConfigNames` resource above marks `DD_ENV` as sticky, so your `env` tag persists across slot swaps.
722
+
723
+
The `slotConfigNames` resource does a full replace of the sticky-settings list. Pass any settings already marked sticky in `existingStickyAppSettingNames`, or `[]` for a new app. Any name omitted is de-stickied.
Copy file name to clipboardExpand all lines: content/en/serverless/azure_app_service/linux_container.md
+59-3Lines changed: 59 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -226,6 +226,8 @@ Set your Datadog site to {{< region-param key="dd_site" code="true" >}}. Default
226
226
227
227
Additional flags, like `--service` and `--env`, can be used to set the service and environment tags. For a full list of options, run `datadog-ci aas instrument --help`.
228
228
229
+
`datadog-ci aas instrument` only needs to be run once to set up instrumentation. You do not need to re-run it on every code deployment, only re-run it to change your Datadog configuration.
230
+
229
231
#### Azure Cloud Shell
230
232
231
233
To use the Datadog CLI in [Azure Cloud Shell][603], open cloud shell and use `npx` to run the CLI directly. Set your API key and site in the `DD_API_KEY` and `DD_SITE` environment variables, and then run the CLI:
@@ -534,18 +536,28 @@ To instrument a [deployment slot][901] instead of the main web app, use one of t
534
536
{{< tabs >}}
535
537
{{% tab "Datadog CLI" %}}
536
538
537
-
Using the [Datadog CLI][1] (v5.9.0+), add the `--slot` flag. Use `--env`to set a distinct environment tag for the slot:
539
+
Using the [Datadog CLI][1] (v5.9.0+), add the `--slot` flag. Use `--service`, `--env`, and `--version`to set distinct unified service tagging values for the slot.
**Note**: When `datadog_env` is set on your main web app module, the module marks `DD_ENV` as a sticky setting, so your `env` tag persists across slot swaps.
@@ -592,6 +606,9 @@ Update your template to target a deployment slot instead of the main web app:
592
606
param webAppName string
593
607
param slotName string
594
608
609
+
@description('Names of app settings already marked slot-sticky on this web app. Pass [] for a new app with no existing sticky settings. This template does a full replace of slotConfigNames — omitting an existing sticky setting name will de-sticky it.')
@@ -661,6 +690,10 @@ Redeploy your updated template:
661
690
az deployment group create --resource-group <RESOURCE GROUP> --template-file <TEMPLATE FILE>
662
691
```
663
692
693
+
**Note**: Azure app settings swap between slots by default. The `slotConfigNames` resource above marks `DD_ENV` as sticky, so your `env` tag persists across slot swaps.
694
+
695
+
The `slotConfigNames` resource does a full replace of the sticky-settings list. Pass any settings already marked sticky in `existingStickyAppSettingNames`, or `[]` for a new app. Any name omitted is de-stickied.
696
+
664
697
{{% /tab %}}
665
698
{{% tab "ARM Template" %}}
666
699
@@ -680,6 +713,11 @@ Update your template to target a deployment slot instead of the main web app:
680
713
// ...
681
714
"datadogApiKey": {
682
715
"type":"securestring"
716
+
},
717
+
"existingStickyAppSettingNames": {
718
+
"type":"array",
719
+
"defaultValue": [],
720
+
"metadata": { "description":"Names of app settings already marked slot-sticky on this web app. Pass [] for a new app with no existing sticky settings. This template does a full replace of slotConfigNames — omitting an existing sticky setting name will de-sticky it." }
683
721
}
684
722
},
685
723
"variables": {
@@ -745,6 +783,20 @@ Update your template to target a deployment slot instead of the main web app:
745
783
}
746
784
}]
747
785
}
786
+
},
787
+
// Marks DD_ENV as slot-sticky so your `env` tag persists across slot swaps. Replaces the
788
+
// full slotConfigNames list — existingStickyAppSettingNames must include any settings
789
+
// already marked sticky or they will be de-stickied.
@@ -756,6 +808,10 @@ Redeploy your updated template:
756
808
az deployment group create --resource-group <RESOURCE GROUP> --template-file <TEMPLATE FILE>
757
809
```
758
810
811
+
**Note**: Azure app settings swap between slots by default. The `slotConfigNames` resource above marks `DD_ENV` as sticky, so your `env` tag persists across slot swaps.
812
+
813
+
The `slotConfigNames` resource does a full replace of the sticky-settings list. Pass any settings already marked sticky in `existingStickyAppSettingNames`, or `[]` for a new app. Any name omitted is de-stickied.
0 commit comments