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

Support SpanKind and linked traces as Span options #688

Merged
merged 11 commits into from
Jan 13, 2023

Conversation

bpholt
Copy link
Member

@bpholt bpholt commented Dec 21, 2022

OpenTelemetry has the concepts of span kinds and linked traces, both of which I'd like to be able to specify for Natchez traces. This is a first draft of adding them to the Natchez API via the Span.Options interface, along with expanding where span options can be set.

Right now only the core, OpenTelemetry, Jaeger, X-Ray, log, and no-op modules are updated to support the new attributes. I wanted to get feedback on the API before spending time figuring out how this maps into the other backends.

@mpilquist
Copy link
Member

Approach looks good to me!

@bpholt bpholt force-pushed the span-options branch 2 times, most recently from 3d3f4b7 to 58a7207 Compare January 12, 2023 07:37
@bpholt
Copy link
Member Author

bpholt commented Jan 12, 2023

The Continuous Integration / Build and Test (ubuntu-latest, 3.2.1, temurin@8, rootJVM) (pull_request) check seems to be hung on the "Cache sbt" step, so we may have to rerun it if it eventually times out. Other than that, I think this is now ready to review, so I'm going to move it out of Draft status.

@bpholt bpholt marked this pull request as ready for review January 12, 2023 23:38
def root(name: String): Resource[F, Span[F]]
final def root(name: String): Resource[F, Span[F]] = root(name, Span.Options.Defaults)

def root(name: String, options: Span.Options): Resource[F, 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.

Would be good to add some docs about the use cases for options here. Nothing too extensive.

@mpilquist mpilquist merged commit c8bf574 into typelevel:main Jan 13, 2023
@bpholt bpholt deleted the span-options branch January 13, 2023 15:57
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.

2 participants