Skip to content

Commit

Permalink
Update Readme samples (Azure#16024)
Browse files Browse the repository at this point in the history
* Update Readme

* Update CI pipelines to exclude mgmt packages

* Update preview directory

* Remove common dir
  • Loading branch information
srnagar authored Oct 7, 2020
1 parent 07e15e8 commit 43e5f92
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
4 changes: 4 additions & 0 deletions sdk/monitor/ci.mgmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ trigger:
paths:
include:
- sdk/monitor/
exclude:
- sdk/monitor/opentelemetry-exporter-azuremonitor

pr:
branches:
Expand All @@ -20,6 +22,8 @@ pr:
paths:
include:
- sdk/monitor/
exclude:
- sdk/monitor/opentelemetry-exporter-azuremonitor

stages:
- template: ../../eng/pipelines/templates/stages/archetype-sdk-management.yml
Expand Down
23 changes: 22 additions & 1 deletion sdk/monitor/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ trigger:
paths:
include:
- sdk/monitor/
- eng/common/
exclude:
- sdk/monitor/mgmt-v2015_04_01
- sdk/monitor/mgmt-v2015_07_01
- sdk/monitor/mgmt-v2016_03_01
- sdk/monitor/mgmt-v2017_03_01_preview
- sdk/monitor/mgmt-v2017_04_01
- sdk/monitor/mgmt-v2017_05_01_preview
- sdk/monitor/mgmt-v2018_01_01
- sdk/monitor/mgmt-v2018_03_01
- sdk/monitor/mgmt-v2018_04_16
- sdk/monitor/mgmt-v2018_09_01

pr:
branches:
Expand All @@ -21,6 +31,17 @@ pr:
paths:
include:
- sdk/monitor/
exclude:
- sdk/monitor/mgmt-v2015_04_01
- sdk/monitor/mgmt-v2015_07_01
- sdk/monitor/mgmt-v2016_03_01
- sdk/monitor/mgmt-v2017_03_01_preview
- sdk/monitor/mgmt-v2017_04_01
- sdk/monitor/mgmt-v2017_05_01_preview
- sdk/monitor/mgmt-v2018_01_01
- sdk/monitor/mgmt-v2018_03_01
- sdk/monitor/mgmt-v2018_04_16
- sdk/monitor/mgmt-v2018_09_01

extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
Expand Down
7 changes: 4 additions & 3 deletions sdk/monitor/opentelemetry-exporter-azuremonitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ right corner.
### Creating exporter for Azure Monitor
<!-- embedme ./src/samples/java/com/azure/opentelemetry/exporter/azuremonitor/ReadmeSamples.java#L25-L27 -->
```java
AzureMonitorExporter azureMonitorExporter = new MonitorExporterClientBuilder()
AzureMonitorExporter azureMonitorExporter = new AzureMonitorExporterBuilder()
.instrumentationKey("{instrumentation-key}")
.buildExporter();
```

#### Exporting span data

The following example shows how to export a collection of available SpanData to Azure Monitor thorugh the
The following example shows how to export a collection of available [Spans](span_data) to Azure Monitor through the
`AzureMonitorExporter`

<!-- embedme ./src/samples/java/com/azure/opentelemetry/exporter/azuremonitor/ReadmeSamples.java#L34-L39 -->
```java
AzureMonitorExporter azureMonitorExporter = new MonitorExporterClientBuilder()
AzureMonitorExporter azureMonitorExporter = new AzureMonitorExporterBuilder()
.instrumentationKey("{instrumentation-key}")
.buildExporter();

Expand Down Expand Up @@ -111,5 +111,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[application_insights_intro]: https://docs.microsoft.com/azure/azure-monitor/app/app-insights-overview
[azure_portal]: https://ms.portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/microsoft.insights%2Fcomponents
[opentelemetry_io]: https://opentelemetry.io/
[span_data]: https://opentelemetry.lightstep.com/spans

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%monitor%2Fopentelemetry-exporter-azuremonitor%2FREADME.png)

0 comments on commit 43e5f92

Please sign in to comment.