Skip to content

Commit

Permalink
remove micrometer sample - they'd go to samples repo
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Jul 13, 2022
1 parent d73762f commit ce4e303
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 349 deletions.
9 changes: 0 additions & 9 deletions sdk/core/azure-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,6 @@
<version>1.1.4</version> <!-- {x-version-update;javax.json:javax.json-api;external_dependency} -->
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
<version>1.9.1</version> <!-- {x-version-update;io.micrometer:micrometer-core;external_dependency} -->
<scope>test</scope>
</dependency>

</dependencies>

<build>
Expand Down Expand Up @@ -248,7 +240,6 @@
<include>com.fasterxml.jackson.dataformat:jackson-dataformat-xml:[2.13.3]</include> <!-- {x-include-update;com.fasterxml.jackson.dataformat:jackson-dataformat-xml;external_dependency} -->
<include>com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.13.3]</include> <!-- {x-include-update;com.fasterxml.jackson.datatype:jackson-datatype-jsr310;external_dependency} -->
<include>org.slf4j:slf4j-api:[1.7.36]</include> <!-- {x-include-update;org.slf4j:slf4j-api;external_dependency} -->
<include>io.micrometer:micrometer-core:[1.9.1]</include> <!-- {x-include-update;io.micrometer:micrometer-core;external_dependency}-->
</includes>
</bannedDependencies>
</rules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ public interface MeterProvider {
*
* <!-- src_embed com.azure.core.util.metrics.MeterProvider.createMeter -->
* <pre>
* MetricsOptions metricsOptions = new MicrometerMetricsOptions&#40;&#41;
* .setRegistry&#40;new LoggingMeterRegistry&#40;&#41;&#41;;
* MetricsOptions metricsOptions = new MetricsOptions&#40;&#41;;
*
* Meter meter = meterProvider.createMeter&#40;&quot;azure-core&quot;, &quot;1.0.0&quot;, metricsOptions&#41;;
* Meter meter = MeterProvider.getDefaultProvider&#40;&#41;.createMeter&#40;&quot;azure-core&quot;, &quot;1.0.0&quot;, metricsOptions&#41;;
* </pre>
* <!-- end com.azure.core.util.metrics.MeterProvider.createMeter -->
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.azure.core.util.Context;
import com.azure.core.util.MetricsOptions;
import com.azure.core.util.TelemetryAttributes;
import io.micrometer.core.instrument.logging.LoggingMeterRegistry;

import java.time.Instant;
import java.util.Collections;
Expand All @@ -16,17 +15,16 @@
* Contains code snippets for {@link Meter} showing how to use it in Azure client libraries.
*/
public class MetricsJavaDocCodeSnippets {
final MeterProvider meterProvider = new MicrometerMeterProvider();
final MeterProvider meterProvider = MeterProvider.getDefaultProvider();
final Meter defaultMeter = meterProvider.createMeter("azure-core-metrics-samples", "1.0.0", null);
/**
* Code snippet for {@link MeterProvider#createMeter(String, String, MetricsOptions)}}
*/
public void createMeter() {
// BEGIN: com.azure.core.util.metrics.MeterProvider.createMeter
MetricsOptions metricsOptions = new MicrometerMetricsOptions()
.setRegistry(new LoggingMeterRegistry());
MetricsOptions metricsOptions = new MetricsOptions();

Meter meter = meterProvider.createMeter("azure-core", "1.0.0", metricsOptions);
Meter meter = MeterProvider.getDefaultProvider().createMeter("azure-core", "1.0.0", metricsOptions);
// END: com.azure.core.util.metrics.MeterProvider.createMeter
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit ce4e303

Please sign in to comment.