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

Expanded documentation for tracing fields #1128

Closed
wants to merge 25 commits into from

Conversation

sgryphon
Copy link

@sgryphon sgryphon commented Nov 17, 2020

Additional usage documentation for tracing fields, with a longer explanation of trace.id, span.id, and how they are related, and the correlation purpose of each.

Documentation would not reproduce the diagrams inline, so added to the optional docs/usages/.asciidoc file.

Addresses issue #998

Note: I have added the generated files to the PR, as the build 'make check' wants them checked in.

Doc page preview

@ebeahan ebeahan added the ready Issues we'd like to address in the future. label Nov 17, 2020
@webmat webmat added the 1.9.0 label Nov 17, 2020
@sgryphon
Copy link
Author

@webmat I see you added the label 1.9.0, which I am guessing means version 1.9. This is only additional documentation, not an actual schema change, so from SemVer point of view it is can be a patch version 1.7, as it is still fully compatible with 1.7

@webmat
Copy link
Contributor

webmat commented Nov 18, 2020

@sgryphon Yeah we did that tagging as part of regular planning and figuring what we have time for when. We hadn't noticed that you were actually contributing the documentation page itself.

This is great, thank you for submitting that :-)

We will review shortly, and we may indeed backport this all the way back to 1.7, so that the documentation page comes to life before the next release.

@webmat
Copy link
Contributor

webmat commented Nov 18, 2020

@elasticmachine, run elasticsearch-ci/docs

@webmat
Copy link
Contributor

webmat commented Nov 18, 2020

The doc page can now be previewed at https://ecs_1128.docs-preview.app.elstc.co/guide/en/ecs/master/ecs-tracing-usage.html :-)

@webmat
Copy link
Contributor

webmat commented Nov 24, 2020

@axw Do you feel like this doc page captures the discussion in #998?

@webmat webmat requested review from axw and webmat November 24, 2020 19:12
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sgryphon! This looks pretty good overall.

I'm happy to have this usage page. There are some discrepancies with Elastic APM which, along with ECS loggers, is (AFAIK) the only thing using these fields at the moment. I think it's important that we make some adjustments to avoid confusion.

@felixbarny @bmorelli25 any thoughts, concerns?

docs/usage/tracing.asciidoc Outdated Show resolved Hide resolved
docs/usage/tracing.asciidoc Outdated Show resolved Hide resolved
schemas/tracing.yml Outdated Show resolved Hide resolved
Conflicts:
	CHANGELOG.next.md
	docs/field-details.asciidoc
	experimental/generated/beats/fields.ecs.yml
	generated/beats/fields.ecs.yml
	schemas/tracing.yml
…ate transaction spans, link to APM transactions.
@sgryphon
Copy link
Author

Pull request has been updated based on feedback. Please review and let me know if there is anything else needed before it can be merged. Thanks.

axw
axw previously approved these changes Jan 25, 2021
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates @sgryphon. LGTM!

@bmorelli25
Copy link
Member

bmorelli25 commented Jan 25, 2021

@elasticmachine, run elasticsearch-ci/docs

Kicking off a new doc build and will take a look at the changes this afternoon. Thanks for putting this together @sgryphon

Copy link
Member

@bmorelli25 bmorelli25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for putting this together! I have a few grammar/spelling recommendations. Everything is open for discussion, so feel free to let me know if you disagree with anything!

I'll mock up some graphics for this right now.

docs/usage/tracing.asciidoc Outdated Show resolved Hide resolved
docs/usage/tracing.asciidoc Outdated Show resolved Hide resolved
docs/usage/tracing.asciidoc Outdated Show resolved Hide resolved
docs/usage/tracing.asciidoc Outdated Show resolved Hide resolved
docs/usage/tracing.asciidoc Outdated Show resolved Hide resolved
docs/usage/tracing.asciidoc Outdated Show resolved Hide resolved
docs/usage/tracing.asciidoc Outdated Show resolved Hide resolved
docs/usage/tracing.asciidoc Outdated Show resolved Hide resolved
docs/usage/tracing.asciidoc Outdated Show resolved Hide resolved
Comment on lines +39 to +69
Causal relationships between Spans in a single Trace

[Transaction Span A] ←←←(the root transaction span)
|
+------+------+
| | ←←←(call to Service 2)
| v
[Span B] [Transaction Span C] ←←←(C is a child of A)
| |
[Span D] +---+-------+
| |
[Span E] [Span F]
------------------------------------------------------------------

Sometimes it's easier to visualize **Traces** with a time axis as in the diagram
below:

------------------------------------------------------------------
Temporal relationships between Spans in a single Trace

––|–––––––|–––––––|–––––––|–––––––|–––––––|–––––––|–––––––|–> time

Service 1:
[Transaction Span A·······································]
[Span B··············································]
[Span D··········································]

Service 2:
[Transaction Span C····························]
[Span E·······] [Span F··]
------------------------------------------------------------------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of how these render. Let me mock up some graphics to replace these. Give me an hour.

@bmorelli25
Copy link
Member

bmorelli25 commented Jan 26, 2021

Here's what I'm thinking for the causal and temporal graphics. Open to feedback.

@sgryphon If you're getting tired of updating this PR, let me know and I can make these changes for you.

causal-span-trace

temporal-span-trace

@ebeahan
Copy link
Member

ebeahan commented Feb 1, 2021

Thanks, @sgryphon, for taking on authoring this content! The functionality to add the usage docs was added only recently, so it's great to see folks contributing already. 😄

Also, thanks to @axw and @bmorelli25 for the reviews and feedback. These graphics look amazing! ❤️ 💯

From an ECS-perspective, I do have reservations that this content is too focused on terminology and concepts and not focused enough on how to use/populate the ECS fields themselves. I prefer directing users to the APM docs' relevant sections as the more definitive reference for definitions and concepts. The ECS usage docs can then focus on applying the concepts with real-world examples using the tracing.* fields.

Those types of extended examples will help tie together concepts better for ECS users when mapping their own data sources. Some of the original questions from #998 were "How do these [fields] work together?", and I want to ensure that remains in focus here.

sgryphon and others added 8 commits February 2, 2021 16:46
Nice pick up. Yes, it should definitely be an em dash!

Co-authored-by: Brandon Morelli <[email protected]>
@sgryphon
Copy link
Author

sgryphon commented Feb 3, 2021

Here's what I'm thinking for the causal and temporal graphics. Open to feedback.

My question about the graphics are how are they generated? Using ASCII is viewable even in text output.

Mostly for diagrams I use something like PlantUML, to specify the diagram in text (under version control) and then generate the image.

But if you prefer straight images that is okay. I will create some SVG of the able, which are then more easily trackable in version control for changes.

@sgryphon
Copy link
Author

sgryphon commented Feb 3, 2021

Those types of extended examples will help tie together concepts better for ECS users when mapping their own data sources. Some of the original questions from #998 were "How do these [fields] work together?", and I want to ensure that remains in focus here.

Okay, I can expand on "how to populate the ECS fields".

I'll see what I can come up with for a general solution (e.g. users mapping their own sources), but implementations might end up being technology specific, e.g. how you would populate them in using the built in TraceContext support in .NET would be very different than if using the Elastic APM agent in Python, etc.

@github-actions
Copy link

This PR is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the stale Stale issues and pull requests label Feb 24, 2022
@bmorelli25
Copy link
Member

Closing this and moving documentation to the APM Guide. Tracking in elastic/observability-docs#817.

@bmorelli25 bmorelli25 closed this Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Issues we'd like to address in the future. stale Stale issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants