@@ -82,7 +82,6 @@ using OpenTelemetry;
82
82
using OpenTelemetry .Resources ;
83
83
using OpenTelemetry .Trace ;
84
84
85
- // Define some important constants and the activity source.
86
85
// These can come from a config file, constants file, etc.
87
86
var serviceName = " MyCompany.MyProduct.MyService" ;
88
87
var serviceVersion = " 1.0.0" ;
@@ -175,7 +174,7 @@ generally sufficient to just have one defined per service.
175
174
176
175
## Creating Spans
177
176
178
- To create an activity , give it a name and create it from your ` Tracer ` .
177
+ To create a span , give it a name and create it from your ` Tracer ` .
179
178
180
179
``` csharp
181
180
using var span = MyTracer .StartActiveSpan (" SayHello" );
@@ -239,7 +238,7 @@ block is explicitly defined, rather than scoped to `DoWork` itself like
239
238
240
239
## Get the current Span
241
240
242
- Sometimes it's helpful to access whatever the current ` Activity ` is at a point
241
+ Sometimes it's helpful to access whatever the current ` TelemetrySpan ` is at a point
243
242
in time so you can enrich it with more information.
244
243
245
244
``` csharp
@@ -275,11 +274,11 @@ using var span = tracer.StartActiveSpan("SayHello");
275
274
276
275
// ...
277
276
278
- myActivity ? .AddEvent (new ( " Gonna try it! " ) );
277
+ span .AddEvent (" Doing something... " );
279
278
280
279
// ...
281
280
282
- myActivity ? .AddEvent (new ( " Did it!" ) );
281
+ span .AddEvent (" Dit it!" );
283
282
```
284
283
285
284
Events can also be created with a timestamp and a collection of Tags.
0 commit comments