Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Aug 3, 2023
1 parent 567b176 commit 9c99c06
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions opencensus-shim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ To allow the shim to work for metrics, add the shim as a dependency.
Applications also need to attach OpenCensus metrics to their metric readers on registration.

```java
PeriodicMetricReader reader = ...
SdkMeterProvider.builder()
.registerMetricReader(OpenCensusMetrics.attachTo(reader))
.buildAndRegisterGlobal();
SdkMeterProvider.builder().registerMetricReader(PeriodicMetricReader.builder(exporter).addMetricProducer(OpenCensusMetricProducer.create()).build())
```

For example, if a logging exporter were configured, the following would be
Expand Down

0 comments on commit 9c99c06

Please sign in to comment.