Skip to content

Commit d5ff615

Browse files
authored
Fix region-param bug (#32580)
1 parent 7610f04 commit d5ff615

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

content/en/logs/guide/apigee.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,24 @@ Use the MessageLogging policy type with the syslog parameter on your API to log
5151
[2]: https://cloud.google.com/apigee/docs/api-platform/reference/policies/message-logging-policy
5252

5353
{{% /site-region %}}
54+
5455
#### JavaScript policy
5556

5657
Send Apigee proxy logs to Datadog using Apigee's JavaScript policy. For detailed instructions, see the [Apigee documentation][1].
5758

5859
1. Select the Apigee proxy from which you want to send logs to Datadog.
5960
2. In the selected proxy overview page, click the **DEVELOP** tab.
6061
3. Select **New Script**.
61-
4. Select JavaScript and add flow variables into JavaScript from the [Apigee flow variable reference][4].
62+
4. Select JavaScript and add flow variables into JavaScript from the [Apigee flow variable reference][4].
63+
6264

63-
{{% collapse-content title="Example JavaScript code snippet" level="h4" expanded=false %}}
65+
<details>
66+
<summary><strong>Example JavaScript code snippet</strong></summary>
6467

6568
See the following example JavaScript code snippet. Replace `<DATADOG_API_KEY>` in the `dd_api_url` variable with your [Datadog API KEY][3]. The JavaScript has been configured to capture the essential flow variables as log attributes in Datadog. The attributes are named according to the list of standard attributes.
6669

67-
```
70+
71+
```java
6872
// Set the Datadog API URL here.
6973
var dd_api_url = "https://http-intake.logs.{{< region-param key="dd_site" code="true" >}}/api/v2/logs?dd-api-key=<DATADOG_API_KEY>&ddsource=apigee";
7074

@@ -138,8 +142,7 @@ var myLoggingRequest = new Request(dd_api_url, "POST", headers, JSON.stringify(l
138142
httpClient.send(myLoggingRequest);
139143
```
140144

141-
{{% /collapse-content %}}
142-
145+
</details>
143146

144147
## Troubleshooting
145148

0 commit comments

Comments
 (0)