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

sdk-trace: add SpanData #372

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Conversation

iRevive
Copy link
Contributor

@iRevive iRevive commented Nov 15, 2023

Reference Link
Spec https://opentelemetry.io/docs/specs/otel/trace/api/#span
Java implementation SpanData.java

The last *Data model.

@iRevive iRevive added tracing Improvements to tracing module module:sdk Features and improvements to the sdk module labels Nov 15, 2023
Comment on lines +57 to +61
def startTimestamp: FiniteDuration

/** The end time of the span.
*/
def endTimestamp: Option[FiniteDuration]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can use shorter alternatives:

def start: FiniteDuration
def end: Option[FiniteDuration]

WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

This isn't really user-facing tho right? I think I prefer the current names.

@iRevive iRevive force-pushed the sdk-trace/span-data branch from b158cfa to 668855d Compare November 15, 2023 08:43
@iRevive iRevive force-pushed the sdk-trace/span-data branch from 668855d to 324344f Compare November 15, 2023 10:47
Comment on lines +83 to +89
override protected def scalaCheckTestParameters: Test.Parameters =
if (PlatformCompat.isJVM)
super.scalaCheckTestParameters
else
super.scalaCheckTestParameters
.withMinSuccessfulTests(10)
.withMaxSize(10)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test suite fails on Scala Native with the original config. For example:
https://github.com/typelevel/otel4s/actions/runs/6874901322/job/18698109030

Copy link
Member

Choose a reason for hiding this comment

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

😕 looks like it's being killed for OOM? it's fine, when we run SN tests they haven't been optimized or JITed unlike JVM/JS ...

@armanbilge
Copy link
Member

I see the Java API includes several "total" methods which we've omitted for now, any comment?

@iRevive
Copy link
Contributor Author

iRevive commented Nov 15, 2023

I see the Java API includes several "total" methods which we've omitted for now, any comment?

There is a thing called SpanLimits. You can configure certain constraints and drop attributes, events, and links if they don't match (e.g. attribute name length > limit). That's what they refer to.

Exporters primarily require these fields. So I keep them outside of the scope for now.

@iRevive iRevive merged commit 56e3809 into typelevel:main Nov 15, 2023
10 checks passed
@iRevive iRevive deleted the sdk-trace/span-data branch November 15, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:sdk Features and improvements to the sdk module tracing Improvements to tracing module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants