-
Notifications
You must be signed in to change notification settings - Fork 462
feat(profiling): add DD_PROFILING_API_TIMEOUT_MS
#14844
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
base: main
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
release note lgtm
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe average import time from this PR is: 261 ± 8 ms. The average import time from base is: 260 ± 8 ms. The import time difference between this PR and base is: 0.4 ± 0.4 ms. The difference is not statistically significant (z = 1.22). Import time breakdownThe following import paths have grown:
|
ddtrace/internal/datadog/profiling/dd_wrapper/include/constants.hpp
Outdated
Show resolved
Hide resolved
static inline std::string url{ "http://localhost:8126" }; | ||
static inline ExporterTagset user_tags{}; | ||
static inline std::string output_filename{ "" }; | ||
static inline uint64_t max_timeout_ms{ g_default_max_timeout_ms }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
g_default_max_timeout_ms
isn't being used anywhere else, can you inline its value here with the same comment?
Or are there future uses of it, in which case it makes sense to define the global.
ddup_config_sample_pool_capacity(clamp_to_uint64_unsigned(sample_pool_capacity)) | ||
|
||
if timeout is not None: | ||
# timeout is in seconds with float type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to my code suggestions above, why is it float
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dd-trace-py/ddtrace/settings/profiling.py
Line 208 in 92937df
default=10.0, |
api_timeout is defined as float here. I can change it to int there too, but then it kinda looks like a breaking change to me.
Performance SLOsComparing candidate taegyunkim/prof-12719 (4b12370) with baseline main (e888762) 🟡 Near SLO Breach (5 suites)🟡 djangosimple - 30/30✅ appsecTime: ✅ 20.486ms (SLO: <22.300ms -8.1%) vs baseline: -0.1% Memory: ✅ 65.447MB (SLO: <67.000MB -2.3%) vs baseline: +4.8% ✅ exception-replay-enabledTime: ✅ 1.345ms (SLO: <1.450ms -7.2%) vs baseline: ~same Memory: ✅ 64.497MB (SLO: <67.000MB -3.7%) vs baseline: +4.6% ✅ iastTime: ✅ 20.503ms (SLO: <22.250ms -7.8%) vs baseline: +0.3% Memory: ✅ 65.477MB (SLO: <67.000MB -2.3%) vs baseline: +4.9% ✅ profilerTime: ✅ 15.344ms (SLO: <16.550ms -7.3%) vs baseline: +0.5% Memory: ✅ 53.807MB (SLO: <54.500MB 🟡 -1.3%) vs baseline: +5.0% ✅ resource-renamingTime: ✅ 20.521ms (SLO: <21.750ms -5.7%) vs baseline: +0.2% Memory: ✅ 65.464MB (SLO: <67.000MB -2.3%) vs baseline: +4.9% ✅ span-code-originTime: ✅ 26.203ms (SLO: <28.200ms -7.1%) vs baseline: +0.2% Memory: ✅ 67.523MB (SLO: <69.500MB -2.8%) vs baseline: +5.0% ✅ tracerTime: ✅ 20.450ms (SLO: <21.750ms -6.0%) vs baseline: ~same Memory: ✅ 65.419MB (SLO: <67.000MB -2.4%) vs baseline: +5.0% ✅ tracer-and-profilerTime: ✅ 22.007ms (SLO: <23.500ms -6.4%) vs baseline: -0.2% Memory: ✅ 66.743MB (SLO: <67.500MB 🟡 -1.1%) vs baseline: +5.1% ✅ tracer-dont-create-db-spansTime: ✅ 19.353ms (SLO: <21.500ms -10.0%) vs baseline: +0.2% Memory: ✅ 65.479MB (SLO: <66.000MB 🟡 -0.8%) vs baseline: +4.9% ✅ tracer-minimalTime: ✅ 16.645ms (SLO: <17.500ms -4.9%) vs baseline: ~same Memory: ✅ 65.536MB (SLO: <66.000MB 🟡 -0.7%) vs baseline: +5.3% ✅ tracer-nativeTime: ✅ 20.429ms (SLO: <21.750ms -6.1%) vs baseline: -0.2% Memory: ✅ 71.395MB (SLO: <72.500MB 🟡 -1.5%) vs baseline: +4.9% ✅ tracer-no-cachesTime: ✅ 18.465ms (SLO: <19.650ms -6.0%) vs baseline: +0.2% Memory: ✅ 65.543MB (SLO: <67.000MB -2.2%) vs baseline: +5.1% ✅ tracer-no-databasesTime: ✅ 18.760ms (SLO: <20.100ms -6.7%) vs baseline: ~same Memory: ✅ 65.420MB (SLO: <67.000MB -2.4%) vs baseline: +5.3% ✅ tracer-no-middlewareTime: ✅ 20.169ms (SLO: <21.500ms -6.2%) vs baseline: +0.2% Memory: ✅ 65.456MB (SLO: <67.000MB -2.3%) vs baseline: +4.8% ✅ tracer-no-templatesTime: ✅ 20.250ms (SLO: <22.000ms -8.0%) vs baseline: -0.2% Memory: ✅ 65.430MB (SLO: <67.000MB -2.3%) vs baseline: +4.9% 🟡 errortrackingdjangosimple - 6/6✅ errortracking-enabled-allTime: ✅ 18.043ms (SLO: <19.850ms -9.1%) vs baseline: +0.1% Memory: ✅ 65.254MB (SLO: <66.500MB 🟡 -1.9%) vs baseline: +4.8% ✅ errortracking-enabled-userTime: ✅ 18.102ms (SLO: <19.400ms -6.7%) vs baseline: +0.3% Memory: ✅ 65.274MB (SLO: <66.500MB 🟡 -1.8%) vs baseline: +4.9% ✅ tracer-enabledTime: ✅ 18.233ms (SLO: <19.450ms -6.3%) vs baseline: +1.2% Memory: ✅ 65.294MB (SLO: <66.500MB 🟡 -1.8%) vs baseline: +5.0% 🟡 flasksimple - 18/18✅ appsec-getTime: ✅ 4.590ms (SLO: <4.750ms -3.4%) vs baseline: +0.3% Memory: ✅ 62.069MB (SLO: <65.000MB -4.5%) vs baseline: +5.3% ✅ appsec-postTime: ✅ 6.617ms (SLO: <6.750ms 🟡 -2.0%) vs baseline: -0.2% Memory: ✅ 61.951MB (SLO: <65.000MB -4.7%) vs baseline: +4.3% ✅ appsec-telemetryTime: ✅ 4.596ms (SLO: <4.750ms -3.3%) vs baseline: -0.3% Memory: ✅ 61.951MB (SLO: <65.000MB -4.7%) vs baseline: +5.0% ✅ debuggerTime: ✅ 1.858ms (SLO: <2.000ms -7.1%) vs baseline: -0.3% Memory: ✅ 45.495MB (SLO: <47.000MB -3.2%) vs baseline: +4.9% ✅ iast-getTime: ✅ 1.860ms (SLO: <2.000ms -7.0%) vs baseline: +0.2% Memory: ✅ 42.408MB (SLO: <49.000MB 📉 -13.5%) vs baseline: +5.1% ✅ profilerTime: ✅ 1.910ms (SLO: <2.100ms -9.1%) vs baseline: -0.2% Memory: ✅ 46.557MB (SLO: <47.000MB 🟡 -0.9%) vs baseline: +5.0% ✅ resource-renamingTime: ✅ 3.373ms (SLO: <3.650ms -7.6%) vs baseline: -0.1% Memory: ✅ 52.160MB (SLO: <53.500MB -2.5%) vs baseline: +4.7% ✅ tracerTime: ✅ 3.358ms (SLO: <3.650ms -8.0%) vs baseline: -0.3% Memory: ✅ 52.180MB (SLO: <53.500MB -2.5%) vs baseline: +4.7% ✅ tracer-nativeTime: ✅ 3.363ms (SLO: <3.650ms -7.9%) vs baseline: -0.3% Memory: ✅ 58.124MB (SLO: <60.000MB -3.1%) vs baseline: +4.6% 🟡 otelspan - 22/22✅ add-eventTime: ✅ 40.998ms (SLO: <47.150ms 📉 -13.0%) vs baseline: -0.3% Memory: ✅ 44.264MB (SLO: <47.000MB -5.8%) vs baseline: +5.3% ✅ add-metricsTime: ✅ 318.292ms (SLO: <344.800ms -7.7%) vs baseline: -0.2% Memory: ✅ 616.538MB (SLO: <630.000MB -2.1%) vs baseline: +5.0% ✅ add-tagsTime: ✅ 288.502ms (SLO: <314.000ms -8.1%) vs baseline: +0.1% Memory: ✅ 618.500MB (SLO: <630.000MB 🟡 -1.8%) vs baseline: +4.9% ✅ get-contextTime: ✅ 83.206ms (SLO: <92.350ms -9.9%) vs baseline: +3.0% Memory: ✅ 39.777MB (SLO: <46.500MB 📉 -14.5%) vs baseline: +4.9% ✅ is-recordingTime: ✅ 38.763ms (SLO: <44.500ms 📉 -12.9%) vs baseline: +1.4% Memory: ✅ 43.610MB (SLO: <47.500MB -8.2%) vs baseline: +4.8% ✅ record-exceptionTime: ✅ 59.398ms (SLO: <67.650ms 📉 -12.2%) vs baseline: +1.6% Memory: ✅ 40.143MB (SLO: <47.000MB 📉 -14.6%) vs baseline: +5.0% ✅ set-statusTime: ✅ 44.735ms (SLO: <50.400ms 📉 -11.2%) vs baseline: +1.6% Memory: ✅ 43.615MB (SLO: <47.000MB -7.2%) vs baseline: +4.8% ✅ startTime: ✅ 37.527ms (SLO: <43.450ms 📉 -13.6%) vs baseline: -0.2% Memory: ✅ 43.605MB (SLO: <47.000MB -7.2%) vs baseline: +4.9% ✅ start-finishTime: ✅ 83.506ms (SLO: <88.000ms -5.1%) vs baseline: +0.8% Memory: ✅ 34.583MB (SLO: <46.500MB 📉 -25.6%) vs baseline: +5.1% ✅ start-finish-telemetryTime: ✅ 83.718ms (SLO: <89.000ms -5.9%) vs baseline: -0.6% Memory: ✅ 34.583MB (SLO: <46.500MB 📉 -25.6%) vs baseline: +4.8% ✅ update-nameTime: ✅ 39.374ms (SLO: <45.150ms 📉 -12.8%) vs baseline: +0.6% Memory: ✅ 43.918MB (SLO: <47.000MB -6.6%) vs baseline: +4.8% 🟡 span - 26/26✅ add-eventTime: ✅ 20.502ms (SLO: <22.500ms -8.9%) vs baseline: +0.2% Memory: ✅ 49.614MB (SLO: <53.000MB -6.4%) vs baseline: +4.8% ✅ add-metricsTime: ✅ 90.250ms (SLO: <93.500ms -3.5%) vs baseline: -1.1% Memory: ✅ 690.392MB (SLO: <961.000MB 📉 -28.2%) vs baseline: +4.9% ✅ add-tagsTime: ✅ 148.613ms (SLO: <155.000ms -4.1%) vs baseline: +0.2% Memory: ✅ 690.296MB (SLO: <962.500MB 📉 -28.3%) vs baseline: +4.8% ✅ get-contextTime: ✅ 18.865ms (SLO: <20.500ms -8.0%) vs baseline: -0.2% Memory: ✅ 48.471MB (SLO: <53.000MB -8.5%) vs baseline: +5.2% ✅ is-recordingTime: ✅ 19.534ms (SLO: <20.500ms -4.7%) vs baseline: +1.5% Memory: ✅ 48.373MB (SLO: <53.000MB -8.7%) vs baseline: +4.6% ✅ record-exceptionTime: ✅ 37.564ms (SLO: <40.000ms -6.1%) vs baseline: -0.2% Memory: ✅ 42.315MB (SLO: <53.000MB 📉 -20.2%) vs baseline: +4.4% ✅ set-statusTime: ✅ 20.855ms (SLO: <22.000ms -5.2%) vs baseline: +0.3% Memory: ✅ 48.438MB (SLO: <53.000MB -8.6%) vs baseline: +4.8% ✅ startTime: ✅ 18.957ms (SLO: <20.500ms -7.5%) vs baseline: +1.6% Memory: ✅ 48.433MB (SLO: <53.000MB -8.6%) vs baseline: +4.7% ✅ start-finishTime: ✅ 51.618ms (SLO: <52.500ms 🟡 -1.7%) vs baseline: ~same Memory: ✅ 32.204MB (SLO: <34.000MB -5.3%) vs baseline: +5.3% ✅ start-finish-telemetryTime: ✅ 52.935ms (SLO: <54.500ms -2.9%) vs baseline: ~same Memory: ✅ 32.086MB (SLO: <34.000MB -5.6%) vs baseline: +4.9% ✅ start-finish-traceid128Time: ✅ 54.957ms (SLO: <57.000ms -3.6%) vs baseline: ~same Memory: ✅ 32.185MB (SLO: <34.000MB -5.3%) vs baseline: +5.1% ✅ start-traceid128Time: ✅ 19.231ms (SLO: <22.500ms 📉 -14.5%) vs baseline: +0.4% Memory: ✅ 48.310MB (SLO: <53.000MB -8.8%) vs baseline: +4.6% ✅ update-nameTime: ✅ 19.333ms (SLO: <22.000ms 📉 -12.1%) vs baseline: +0.1% Memory: ✅ 49.162MB (SLO: <53.000MB -7.2%) vs baseline: +4.9%
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly nits in comments, stamping to unblock
DD_PROFILING_API_TIMEOUT
useful againDD_PROFILING_API_TIMEOUT_MS
…s.hpp Co-authored-by: Vlad Scherbich <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little context but overall what I see makes sense to me
sample_pool_capacity: Optional[int] = None, | ||
timeout: Optional[int] = None) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sample_pool_capacity: Optional[int] = None, | |
timeout: Optional[int] = None) -> None: | |
sample_pool_capacity: Optional[int] = None, | |
timeout: Optional[int] = None, | |
) -> None: |
nit would that be legal syntax? it would minimise the diff the next time we add an argument/change this one
help_type="Float", | ||
help="The timeout in seconds before dropping events if the HTTP API does not reply", | ||
deprecations=[("api_timeout", None, "4.0.0")], | ||
help="(Deprecated) The timeout in seconds before dropping events if the HTTP API does not reply", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
help="(Deprecated) The timeout in seconds before dropping events if the HTTP API does not reply", | |
help="(Deprecated) The timeout in seconds before dropping events if the HTTP API does not reply. Use api_timeout_ms instead.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
release note and benchmark changes lgtm
Description
DD_PROFILING_API_TIMEOUT
worked for legacy Python profile exporter which was removed in #13599. Native profile exporter never supported it. AddingDD_PROFILING_API_TIMEOUT_MS
for native exporter.Testing
Risks
Additional Notes