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

Move span pointer to inferred (root) span #552

Merged
merged 5 commits into from
Jan 30, 2025

Conversation

nhulston
Copy link
Contributor

What does this PR do?

Put span pointers on inferred (root) span instead of the lambda (child) span, as discussed in Slack.

Note that moving the location of the span pointer has no actual effect on the functionality and requires no changes on the UI side. As long as a span is found with a matching hash, span pointers work. Since the spans are on the same trace, this has no noticeable change for our users.

Motivation

Discussed in Slack; this change just aligns span pointers with bottlecap (universally instrumented) runtimes.

Testing Guidelines

Manual testing. See this span and you will see that the span links are on the inferred span now.

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

@nhulston
Copy link
Contributor Author

Waiting on #551

@nhulston nhulston marked this pull request as ready for review January 30, 2025 15:50
@nhulston nhulston requested a review from a team as a code owner January 30, 2025 15:50
@@ -1368,8 +1368,9 @@ def create_function_execution_span(
if parent_span:
span.parent_id = parent_span.span_id
if span_pointers:
root_span = parent_span if parent_span else span
Copy link
Contributor

Choose a reason for hiding this comment

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

nano-nit: is root_span the right name? should this be target_span or something?

Copy link
Contributor Author

@nhulston nhulston Jan 30, 2025

Choose a reason for hiding this comment

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

Could be either; I think root_span makes sense because in the case of S3, the parent_span is the root span if it exists; if it doesn't exist, then the span is the root span of the trace

Copy link
Contributor

@apiarian-datadog apiarian-datadog left a comment

Choose a reason for hiding this comment

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

looks right!

@nhulston nhulston merged commit 7893e9b into main Jan 30, 2025
59 checks passed
@nhulston nhulston deleted the nicholas.hulston/put-span-pointers-on-root-span branch January 30, 2025 22:30
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