Skip to content

Commit baeec84

Browse files
committed
update manual inst docs
Signed-off-by: Rasmus Kuusmann <[email protected]>
1 parent b1c06a2 commit baeec84

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

gdi/get-data-in/application/otel-dotnet/instrumentation/manual-dotnet-instrumentation.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,19 @@ To create custom spans and traces, follow these steps:
3131
3232
private static readonly ActivitySource RegisteredActivity = new ActivitySource("Examples.ManualInstrumentations.Registered");
3333
34-
4. Create an ``Activity``. Optionally, set tags:
34+
4. Create an ``Activity`` (Span). Optionally, set tags:
3535

3636
.. code:: csharp
3737
38-
using (var activity = RegisteredActivity.StartActivity("Main"))
38+
using (var activity = RegisteredActivity.StartActivity("Custom Span Name"))
3939
{
4040
activity?.SetTag("foo", "bar1");
41-
// your logic for Main activity
41+
// your logic for your custom activity
4242
}
4343
44-
4. Register your ``ActivitySource`` by setting the ``OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_SOURCES`` environmental variable. You can set the value to either ``Examples.ManualInstrumentations.Registered`` or to ``Examples.ManualInstrumentations.*``, which registers the entire prefix.
44+
5. Register your ``ActivitySource`` by setting the ``OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_SOURCES`` environmental variable. You can set the value to either ``Examples.ManualInstrumentations.Registered`` or to ``Examples.ManualInstrumentations.*``, which registers the entire prefix.
45+
46+
6. Invoke the action that generates an ``Activity``, note the trade ID of the ``Activity``, and locate the trace in Splunk APM. You should now see a span with the display name "Custom Span Name" in the trace tree.
4547

4648
See the :new-page:`OpenTelemetry official documentation <https://opentelemetry.io/docs/languages/net/instrumentation/#traces>` for additional information and examples.
4749

0 commit comments

Comments
 (0)