Browse Source

Small library doc updates (#9868)

Trask Stalnaker 1 year ago
parent
commit
0a717edeb8

+ 1 - 1
instrumentation/ktor/ktor-1.0/library/README.md

@@ -33,7 +33,7 @@ Initialize instrumentation by installing the `KtorServerTracing` feature. You mu
 the feature.
 
 ```kotlin
-OpenTelemetry openTelemetry = initializeOpenTelemetryForMe()
+OpenTelemetry openTelemetry = ...
 
 embeddedServer(Netty, 8080) {
   install(KtorServerTracing) {

+ 2 - 2
instrumentation/ktor/ktor-2.0/library/README.md

@@ -35,7 +35,7 @@ Initialize instrumentation by installing the `KtorServerTracing` feature. You mu
 the feature.
 
 ```kotlin
-val openTelemetry: OpenTelemetry = initializeOpenTelemetryForMe()
+val openTelemetry: OpenTelemetry = ...
 
 embeddedServer(Netty, 8080) {
   install(KtorServerTracing) {
@@ -50,7 +50,7 @@ Initialize instrumentation by installing the `KtorClientTracing` feature. You mu
 the feature.
 
 ```kotlin
-val openTelemetry: OpenTelemetry = initializeOpenTelemetryForMe()
+val openTelemetry: OpenTelemetry = ...
 
 val client = HttpClient {
   install(KtorClientTracing) {

+ 3 - 8
instrumentation/mongo/mongo-3.1/library/README.md

@@ -6,7 +6,7 @@ This package contains the library to help instrument MongoDB Client.
 
 ### Dependencies
 
-Replace OPENTELEMETRY_VERSION with the [latest release](https://central.sonatype.com/search?q=g:io.opentelemetry.instrumentation++a:opentelemetry-mongo-3.1&smo=true).
+Replace OPENTELEMETRY_VERSION with the [latest release](https://central.sonatype.com/search?q=g%3Aio.opentelemetry.instrumentation+a%3Aopentelemetry-mongo-3.1).
 
 For Maven, add to your `pom.xml` dependencies:
 
@@ -31,7 +31,8 @@ implementation("io.opentelemetry.instrumentation:instrumentation:opentelemetry-m
 The instrumentation is initialized by passing a `MongoTelemetry::newCommandListener()` to the `MongoClientSettings` builder. You must set the `OpenTelemetry` to use with the feature.
 
 ```java
-OpenTelemetry openTelemetry = initializeOpenTelemetryForMe();
+OpenTelemetry openTelemetry = ...;
+
 MongoTelemetry mongoTelemetry = MongoTelemetry.builder(openTelemetry).build();
 
 MongoClientSettings settings = MongoClientSettings.builder()
@@ -42,9 +43,3 @@ MongoClientSettings settings = MongoClientSettings.builder()
 // With Reactive Streams
 MongoClient client = MongoClients.create(settings);
 ```
-
-A logging message example produced by `LoggingSpanExporter`:
-
-```
-INFO: 'insert test.MyCollection' : 4487bebe5fcfc91af2cd517685552a33 a56685e62bf8f87c CLIENT [tracer: io.opentelemetry.mongo-3.1:1.31.0-alpha] AttributesMap{data={db.operation=insert, db.mongodb.collection=MyCollection, net.peer.port=27017, db.name=test, db.connection_string=mongodb://localhost:27017, net.peer.name=localhost, db.statement={"insert": "MyCollection", "ordered": "?", "txnNumber": "?", "$db": "?", "$clusterTime": {"clusterTime": "?", "signature": {"hash": "?", "keyId": "?"}}, "lsid": {"id": "?"}, "documents": [{"_id": "?", "name": "?", "createdAt": "?", "updatedAt": "?"}]}, db.system=mongodb}, capacity=128, totalAddedValues=8}
-```