-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add system to track only Autometricized parents
The parent tracking is span-based (using `(TraceID, SpanId)` as keys) It falls back to the previous method (`runtime.Callers()` analysis) if the function id for a given span is missing from the global state. To prevent the global state from ballooning memory usage, the entries in the span-to-functionIDs table are deleted as part of the cleanup code in `Instrument` (that is why some goroutines outliving their callers with weird scheduling might miss the function id in the global state.) This solution deals well with functions spawning multiple goroutines, but the caller info will be "enhanced" (i.e. with Autometrics annotated functions in the parent field) only if the context created by autometrics.PreInstrument is properly passed to callees, which is a task followed in #78 Fixes: AM-42
- Loading branch information
Showing
6 changed files
with
191 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.