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

[Docs] Combined initial documentation work #121

Merged
merged 10 commits into from
May 25, 2023
Merged

[Docs] Combined initial documentation work #121

merged 10 commits into from
May 25, 2023

Conversation

ktoso
Copy link
Member

@ktoso ktoso commented Apr 13, 2023

Replaces #69

Resolves #80

//
// This source file is part of the Swift OpenTelemetry open source project
//
// Copyright (c) 2021 Moritz Lang and the Swift OpenTelemetry project authors
Copy link
Member Author

@ktoso ktoso Apr 13, 2023

Choose a reason for hiding this comment

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

Authorship I believe you'd be fine with the samples using this repo's copyright @slashmo ?
I'll change that in a bit

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, that's fine 👍

Docs/README.md Outdated Show resolved Hide resolved
Docs/SwiftDistributedTracing/empty.swift Show resolved Hide resolved
Samples/Dinner/README.md Outdated Show resolved Hide resolved
Samples/Dinner/README.md Show resolved Hide resolved
Sources/Tracing/Docs.docc/Guides/InstrumentYourLibrary.md Outdated Show resolved Hide resolved
Sources/Tracing/Docs.docc/Guides/TraceYourApplication.md Outdated Show resolved Hide resolved
ktoso added 5 commits May 22, 2023 21:45
Update Samples/Dinner/docker/collector-config.yaml

Co-authored-by: Moritz Lang <[email protected]>

minor cleanup

wip
**Motivation:**

Since modifying an attribute needs to hit a lock this pattern is more
efficient
**Motivation:**

This type will be deprecated as soon as possible and only serves as a
bridge for Swift 5.6 adopters.
swift run -c release
```

Refer to the "Trace Your Application" guide in the documentation to learn more about how to interpret this sample.
Copy link
Member

Choose a reason for hiding this comment

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

Could this link to "Trace Your Application" guide directly from here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah okey

Copy link
Member Author

Choose a reason for hiding this comment

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

Heh actually such link is not possible unless as a <a href... I can do those later, I don't know the URL to point to unless we have something published on the package index.

Copy link
Contributor

@porglezomp porglezomp left a comment

Choose a reason for hiding this comment

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

I went through part of the application example and ran into the fact that it seems like the example is already the parallelized trace, despite what the docs suggest. Is that expected? It seems like it might be nice to have it be able to produce both kinds of traces so that someone following the tutorial can actually explore the comparison features, etc.

Sources/Tracing/Docs.docc/Guides/TraceYourApplication.md Outdated Show resolved Hide resolved
> ```
>
> - Zipkin UI URL: http://localhost:9411/
> - Jaeger UI URL: ...
Copy link
Contributor

Choose a reason for hiding this comment

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

This space unintentionally left blank? Partially duplicates the content above, but also this is the spot where I looked.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks I'll remove those - here, we mention it above right

let package = Package(
name: "onboarding",
platforms: [
.macOS("14.0.0"),
Copy link
Contributor

@porglezomp porglezomp May 23, 2023

Choose a reason for hiding this comment

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

Should this really be 14.0.0? I adjusted this to 13.0.0 so I could run it and it worked fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll drop to 13 thanks

ktoso added 2 commits May 25, 2023 12:19
**Motivation:**

This type will be deprecated as soon as possible and only serves as a
bridge for Swift 5.6 adopters.
@ktoso
Copy link
Member Author

ktoso commented May 25, 2023

I take the few minor comments as overall approval, thanks folks!

@ktoso ktoso enabled auto-merge (squash) May 25, 2023 10:22
@ktoso ktoso disabled auto-merge May 25, 2023 10:22
@ktoso
Copy link
Member Author

ktoso commented May 25, 2023

I went through part of the application example and ran into the fact that it seems like the example is already the parallelized trace, despite what the docs suggest. Is that expected? It seems like it might be nice to have it be able to produce both kinds of traces so that someone following the tutorial can actually explore the comparison features, etc.

I think that's off and I'll follow up on that, thank you @porglezomp ! #124

@ktoso ktoso merged commit 4018353 into main May 25, 2023
@ktoso ktoso deleted the docs-1.0 branch May 25, 2023 17:01
}

func chopVegetables() async throws -> [Vegetable] {
try await otelChopping1.tracer().withSpan("chopVegetables") { _ in
Copy link

Choose a reason for hiding this comment

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

I know I'm coming in late, but how come this is explicitly referencing otelChopping1?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just to mock a multi node trace in one process. I'll make an actual multi process example soon to complement this with more "normal" usage

Copy link

Choose a reason for hiding this comment

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

Oh, got it. That wasn't explicitly clear when looking at this example what it was actually demonstrating


`Instrument` has two requirements:

1. An `Instrument/extract(_:into:using:)` method, which extracts values from a generic carrier (e.g. HTTP headers) and store them into a `Baggage` instance
Copy link

Choose a reason for hiding this comment

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

I'm assuming this is referenced this way, so that when cross-module symbols are able to be referenced by DocC, we can just come back and add the 2nd set of `?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah currently we can't cross link so it's just a code marker. I may go around and make them explicit links manually hmm

@@ -27,4 +26,4 @@
##
##===----------------------------------------------------------------------===##

swift package --disable-sandbox preview-documentation --target $1
xcrun swift package --disable-sandbox preview-documentation --target Tracing
Copy link

Choose a reason for hiding this comment

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

Well this doesn't seem that portable 😛

Copy link
Member

Choose a reason for hiding this comment

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

What would be the alternative? Is there a portable way to pick up the currently selected toolchain? I don't think non-Darwin platforms even allow something like that.

Copy link

Choose a reason for hiding this comment

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

Platform checks to determine if it should be prefixed with xcrun

Copy link
Member

Choose a reason for hiding this comment

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

Potentially, I'm not sure if the intention was to create a script that runs purely on macOS CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Span references LoggingContext in its docs
6 participants