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

Tracing Re-Work and Context Support #69

Merged
merged 5 commits into from
Nov 15, 2024

Conversation

iamemilio
Copy link
Contributor

@iamemilio iamemilio commented Oct 29, 2024

This is a very serious re-structuring of the way that tracing information is passed and stored, allowing us to move logic related to it into a centralized code location. This lets us define our situational policy for how tracing gets handled and passed in one place, and then invoke that library like an SDK to access tracing throughout the application. This should enable much more easy tracing for libraries that we integrate moving forward, and will substantially reduce the bug burden in the long run.

Core changes

  1. A lot of code was moved into common libraries where it is able to be tested and safely re-used
  2. Boutique information around how tracing is passed has been moved to its own library/tool
  3. The TraceFunction function now handles passing tracing to downstream calls, creating segments, and pulling the transaction out of a parameter

@iamemilio
Copy link
Contributor Author

This is getting really, big so I am making sure that the unit tests to cover these changes are in absolute tip top shape

@iamemilio iamemilio marked this pull request as ready for review November 13, 2024 15:52
A new library for tracking stateful information
related to tracing has been created. This allows
us to easily consolidate code and decision making
related to how tracing information is handled.
- Capture errors that are returned from functions
- Improve support for tracing function literals
- Fix Goroutine tracing behavior in main methods
- Allow transactions to be passed to contexts
- Better testing coverage for tracing
The new subobject of tracestate, traceobject
now has a complete suite of unit tests. This will
ensure long term development is stable and
reliable. End to End tests were also updated and
enhanced to cover the new additions.
@iamemilio
Copy link
Contributor Author

This is ready for review, and has been squashed down into more digestible commits.

@iamemilio iamemilio changed the title WIP: Tracing types latest Tracing Re-Work and Context Support Nov 13, 2024
Copy link
Contributor

@mirackara mirackara left a comment

Choose a reason for hiding this comment

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

LGTM -- Just one leftover debug line

parser/agent.go Outdated
}

// Always load the error into the cache
fmt.Println("loaded into cache: ", errExpr)
Copy link
Contributor

Choose a reason for hiding this comment

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

Leftover print statement

@iamemilio iamemilio merged commit 8bb9a36 into newrelic:main Nov 15, 2024
5 checks passed
@iamemilio iamemilio deleted the tracing_types_latest branch November 15, 2024 18:54
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