-
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.
Implement
repository
fields and support for filtered caller tracking (
#79) * Add repository fields to BuildInfo metric Fixes AM-41 * 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 * Split context generation from defer statement This allow library users to reuse the context augmented with Autometrics, so the tracing and caller information can be a lot more precise Fixes: #78 * Better, shorter error messages * Accept more function signatures in instrument Instead of erroring out when some arguments cannot be inspected for context inspection, we log the information. * Add more build information in binaries This will fix the builds that are downloaded, but not the ones from go install * Fix context replacement for http.Request The context of a HTTP request is not assignable, so we need to read from the existing context and create a new one * Add autometrics.version to build_info metric
- Loading branch information
Showing
28 changed files
with
1,431 additions
and
636 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
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.