Skip to content

Commit 5c52808

Browse files
authored
Correct some problems in .NET OTel shim doc (open-telemetry#1215)
Missed these!
1 parent 2d15649 commit 5c52808

File tree

1 file changed

+4
-5
lines changed
  • content/en/docs/instrumentation/net

1 file changed

+4
-5
lines changed

content/en/docs/instrumentation/net/shim.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ using OpenTelemetry;
8282
using OpenTelemetry.Resources;
8383
using OpenTelemetry.Trace;
8484

85-
// Define some important constants and the activity source.
8685
// These can come from a config file, constants file, etc.
8786
var serviceName = "MyCompany.MyProduct.MyService";
8887
var serviceVersion = "1.0.0";
@@ -175,7 +174,7 @@ generally sufficient to just have one defined per service.
175174

176175
## Creating Spans
177176

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`.
179178

180179
```csharp
181180
using var span = MyTracer.StartActiveSpan("SayHello");
@@ -239,7 +238,7 @@ block is explicitly defined, rather than scoped to `DoWork` itself like
239238

240239
## Get the current Span
241240

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
243242
in time so you can enrich it with more information.
244243

245244
```csharp
@@ -275,11 +274,11 @@ using var span = tracer.StartActiveSpan("SayHello");
275274

276275
// ...
277276
278-
myActivity?.AddEvent(new("Gonna try it!"));
277+
span.AddEvent("Doing something...");
279278

280279
// ...
281280
282-
myActivity?.AddEvent(new("Did it!"));
281+
span.AddEvent("Dit it!");
283282
```
284283

285284
Events can also be created with a timestamp and a collection of Tags.

0 commit comments

Comments
 (0)