Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify Activity parent in links example (readme) #946

Merged
merged 6 commits into from
Jul 30, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/OpenTelemetry.Api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,17 @@ OpenTelemetry samplers chose not to sample this activity.
activityLinks.Add(new ActivityLink(linkedContext2));

var activity = activitySource.StartActivity(
"ActivityName",
"ActivityWithLinks",
ActivityKind.Server,
"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
default(ActivityContext), // this creates Activity without parent
initialTags,
activityLinks);
```

In case you have a parent and it's remote specify `traceaparent` string
lmolkova marked this conversation as resolved.
Show resolved Hide resolved
lmolkova marked this conversation as resolved.
Show resolved Hide resolved
lmolkova marked this conversation as resolved.
Show resolved Hide resolved
instead of the default context, or if you have parent Activity,
use `Activity.Current.Context` (check for null!).
lmolkova marked this conversation as resolved.
Show resolved Hide resolved
lmolkova marked this conversation as resolved.
Show resolved Hide resolved

### Adding Events

It is possible to [add
Expand Down