Skip to content

Commit bfb35af

Browse files
committed
Merge branch 'logs-api-python' of https://github.com/bwren/azure-docs-pr into logs-api-python
2 parents cf889f9 + 6edcf1b commit bfb35af

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

articles/azure-monitor/logs/tutorial-logs-ingestion-code.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,20 @@ The following PowerShell code sends data to the endpoint by using HTTP REST fund
106106
The following sample code uses the [Azure Monitor Ingestion client library for Python](/python/api/overview/azure/monitor-ingestion-readme).
107107
108108
109-
1. Use [pip](https://pypi.org/project/pip/) to install the Azure Monitor Ingestion client library for Python and the Azure Identity library, which is required for the authentication used in this sample.
109+
1. Use [pip](https://pypi.org/project/pip/) to install the Azure Monitor Ingestion and Azure Identity client libraries for Python. The Azure Identity library is required for the authentication used in this sample.
110+
110111
```bash
111112
pip install azure-monitor-ingestion
112113
pip install azure-identity
113114
```
114115
115-
3. Create the following environment variables with values for your Azure AD application. These values are used by `DefaultAzureCredential` in the Azure Identity library.
116+
2. Create the following environment variables with values for your Azure AD application. These values are used by `DefaultAzureCredential` in the Azure Identity library.
116117
117118
- AZURE_TENANT_ID
118119
- AZURE_CLIENT_ID
119120
- AZURE_CLIENT_SECRET
120121
121-
2. Replace the variables in the following sample code with values from your DCE, and DCR. You might also want to replace the sample data in the **Step 2** section with your own.
122+
3. Replace the variables in the following sample code with values from your DCE and DCR. You might also want to replace the sample data in the **Step 2** section with your own.
122123
123124
124125
```python
@@ -174,20 +175,21 @@ The following sample code uses the [Azure Monitor Ingestion client library for P
174175
The following sample code uses the [Azure Monitor Ingestion client library for JavaScript](/javascript/api/overview/azure/monitor-ingestion-readme).
175176
176177
177-
1. Use [npm](https://www.npmjs.com/) to install the Azure Monitor Ingestion client library for JavaScript and the Azure Identity library which is required for the authentication used in this sample.
178+
1. Use [npm](https://www.npmjs.com/) to install the Azure Monitor Ingestion and Azure Identity client libraries for JavaScript. The Azure Identity library is required for the authentication used in this sample.
179+
178180
179181
```bash
180182
npm install --save @azure/monitor-ingestion
181183
npm install --save @azure/identity
182184
```
183185
184-
3. Create the following environment variables with values for your Azure AD application. These values are used by `DefaultAzureCredential` in the Azure Identity library.
186+
2. Create the following environment variables with values for your Azure AD application. These values are used by `DefaultAzureCredential` in the Azure Identity library.
185187
186188
- AZURE_TENANT_ID
187189
- AZURE_CLIENT_ID
188190
- AZURE_CLIENT_SECRET
189191
190-
3. Replace the variables in the following sample code with values from your DCE, and DCR. You might also want to replace the sample data with your own.
192+
3. Replace the variables in the following sample code with values from your DCE and DCR. You might also want to replace the sample data with your own.
191193
192194
```javascript
193195
const { isAggregateLogsUploadError, DefaultAzureCredential } = require("@azure/identity");
@@ -248,13 +250,13 @@ The following sample code uses the [Azure Monitor Ingestion client library for J
248250
});
249251
```
250252
251-
3. Execute the code, and the data should arrive in your Log Analytics workspace within a few minutes.
253+
4. Execute the code, and the data should arrive in your Log Analytics workspace within a few minutes.
252254
253255
## [Java](#tab/java)
254256
The following sample code uses the [Azure Monitor Ingestion client library for Java](/java/api/overview/azure/monitor-ingestion-readme).
255257
256258
257-
1. Include the Logs ingestion package and the `azure-identity` package from the [Azure Identity library](https://github.com/Azure/azure-sdk-for-java/tree/azure-monitor-ingestion_1.0.1/sdk/identity/azure-identity) which is used for the authentication used in this sample.
259+
1. Include the Logs ingestion package and the `azure-identity` package from the [Azure Identity library](https://github.com/Azure/azure-sdk-for-java/tree/azure-monitor-ingestion_1.0.1/sdk/identity/azure-identity). The Azure Identity library is required for the authentication used in this sample.
258260
259261
> [!NOTE]
260262
> See the Maven repositories for [Microsoft Azure Client Library For Identity](https://mvnrepository.com/artifact/com.azure/azure-identity) and [Microsoft Azure SDK For Azure Monitor Data Ingestion](https://mvnrepository.com/artifact/com.azure/azure-monitor-ingestion) for the latest versions.
@@ -263,12 +265,11 @@ The following sample code uses the [Azure Monitor Ingestion client library for J
263265
<dependency>
264266
<groupId>com.azure</groupId>
265267
<artifactId>azure-monitor-ingestion</artifactId>
266-
<version>1.0.0</version>
267-
</dependency>
268+
<version>{get-latest-version}</version>
268269
<dependency>
269270
<groupId>com.azure</groupId>
270271
<artifactId>azure-identity</artifactId>
271-
<version>1.8.0</version>
272+
<version>{get-latest-version}</version>
272273
</dependency>
273274
```
274275
@@ -279,7 +280,7 @@ The following sample code uses the [Azure Monitor Ingestion client library for J
279280
- AZURE_CLIENT_ID
280281
- AZURE_CLIENT_SECRET
281282
282-
4. Replace the variables in the following sample code with values from your DCE, and DCR. You may also want to replace the sample data with your own.
283+
4. Replace the variables in the following sample code with values from your DCE and DCR. You may also want to replace the sample data with your own.
283284
284285
```java
285286
public static void main(String[] args) {
@@ -333,7 +334,7 @@ The following sample code uses the [Azure Monitor Ingestion client library for J
333334
334335
The following script uses the [Azure Monitor Ingestion client library for .NET](/dotnet/api/overview/azure/Monitor.Ingestion-readme).
335336
336-
1. Install the Azure Monitor Ingestion client library and the Azure Identity library which is required for the authentication used in this sample.
337+
1. Install the Azure Monitor Ingestion client library and the Azure Identity library. The Azure Identity library is required for the authentication used in this sample.
337338
338339
```dotnetcli
339340
dotnet add package Azure.Identity
@@ -346,7 +347,7 @@ The following script uses the [Azure Monitor Ingestion client library for .NET](
346347
- AZURE_CLIENT_ID
347348
- AZURE_CLIENT_SECRET
348349
349-
2. Replace the variables in the following sample code with values from your DCE, and DCR. You may also want to replace the sample data with your own.
350+
2. Replace the variables in the following sample code with values from your DCE and DCR. You may also want to replace the sample data with your own.
350351
351352
352353

0 commit comments

Comments
 (0)