This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tag request spans with manifest size (#104)
* Add a few todos for where to add the size calculation Update the CachedManifest object to have a size field and default it to 0 for now * Add size to the state controller class and return it in the compile query result * Adjust tests following the new changes to the cache * Remove manifest size from the compile response * Tag spans in the state controller when loading the manifest from cache or disk * Calculate the size of the manifest whenever it's read from disk. Store that size in the cached object. Remove some test span code * Calculate the manifest size on startup too * Add a temporary location where the span will be tagged once development is complete * Move the os.path.getsize call into the filesystem service * Fix a test after adding the get size call to server startuo * Remove outdated dummy code to make a test pass * more tagging work and cleanup * on the /parse flow, the manifest is only loaded into memory and not yet written out to disk, so we can't read the size of it in parse_from_source(). Instead, the size should be retrieved in serialize_manifest() after it's been written out to disk * Add a method to update the cache using what's in StateController. This is needed because the cache update was pulled out of the parse_from_source() method and will be called after the manifest has been written out to disk to ensure we can get the size of it * Only tag the parse endpoint span with manifest size * Don't tag the span on calls to the push endpoint because I don't think it adds much * Remove unused import * Remove unused import * Formatting * Revert change * fix linter issues * Remove unused import * Install ddtrace as part of the run tests step since it's needed in views.py * try to fix linter * Add changelog * Add back in missing line to calculate and set the manifest size when serializing to disk * Move the tracing logic to tracer from views. This is cleaner and allows us to skip all tracing logic if it isn't enabled * Try removing ddtrace now that the logic has been moved out of views * Change naming for consistency * Wrap the get_size function with @tracer.wrap
- Loading branch information
Showing
8 changed files
with
101 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: Under the Hood | ||
body: Cache the size of the manifest and tag request spans with it for more observability | ||
time: 2022-10-13T14:24:50.302275-04:00 | ||
custom: | ||
Author: jp-dbt | ||
Issue: "104" | ||
PR: "104" |
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
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