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

[Serverless Mini Agent] Add Azure App Service Runtime Tags #512

Merged
merged 7 commits into from
Jul 2, 2024

Conversation

duncanpharvey
Copy link
Contributor

@duncanpharvey duncanpharvey commented Jun 27, 2024

What does this PR do?

Adds the following span tags to traces sent by the Serverless Mini Agent in Azure Functions.

  • aas.environment.runtime
  • aas.environment.runtime_version
  • aas.environment.function_runtime

Motivation

https://datadoghq.atlassian.net/browse/SVLS-4935

  • Usage tracking for mini agent private beta
  • Span tag parity with Datadog Agent

Additional Notes

Updates how Azure Metadata values are retrieved so empty strings are mapped to unknown.

How to test the change?

  • Build mini agent locally
  • Deploy Azure Function with mini agent binary in root path
  • Set DD_MINI_AGENT_PATH
    • Azure: /home/site/wwwroot/datadog-serverless-trace-mini-agent

@duncanpharvey duncanpharvey marked this pull request as ready for review June 27, 2024 19:04
@duncanpharvey duncanpharvey requested review from a team as code owners June 27, 2024 19:04
@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 81.25000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 70.40%. Comparing base (8a5d447) to head (7be4fb2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #512      +/-   ##
==========================================
+ Coverage   70.38%   70.40%   +0.02%     
==========================================
  Files         204      204              
  Lines       27835    27882      +47     
==========================================
+ Hits        19591    19630      +39     
- Misses       8244     8252       +8     
Components Coverage Δ
crashtracker 16.70% <ø> (ø)
datadog-alloc 98.76% <ø> (ø)
data-pipeline 51.15% <ø> (ø)
data-pipeline-ffi 0.00% <ø> (ø)
ddcommon 86.49% <100.00%> (+0.36%) ⬆️
ddcommon-ffi 74.15% <ø> (ø)
ddtelemetry 59.37% <ø> (ø)
ipc 84.66% <ø> (ø)
profiling 78.63% <ø> (ø)
profiling-ffi 58.19% <ø> (ø)
serverless 0.00% <ø> (ø)
sidecar 36.19% <ø> (ø)
sidecar-ffi 0.00% <ø> (ø)
spawn-worker 54.98% <ø> (ø)
trace-mini-agent 69.70% <ø> (ø)
trace-normalization 97.79% <ø> (ø)
trace-obfuscation 95.75% <ø> (ø)
trace-protobuf 77.16% <ø> (ø)
trace-utils 90.84% <0.00%> (-0.37%) ⬇️

Copy link
Contributor

@alexgallotta alexgallotta left a comment

Choose a reason for hiding this comment

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

Looks good! I would add a test with the failing case to make sure it works

@pr-commenter
Copy link

pr-commenter bot commented Jun 27, 2024

Benchmarks

Comparison

Parameters

Baseline Candidate
config baseline candidate
git_branch main duncan-harvey/serverless-runtime-tags
git_commit_date 1719860752 1719928086
git_commit_sha 8a5d447 7be4fb2
See matching parameters
Baseline Candidate
ci_job_date 1719928335 1719928335
ci_job_id 559707445 559707445
ci_pipeline_id 38132004 38132004
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
iterations 717.0 717.0

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.

Candidate

Candidate benchmark details

Group 1

iterations config cpu_model ci_job_date ci_job_id ci_pipeline_id git_commit_sha git_commit_date git_branch
717.0 candidate Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1719928335 559707445 38132004 7be4fb2 1719928086 duncan-harvey/serverless-runtime-tags
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sql/obfuscate_sql_string execution_time 69.753µs 69.816µs ± 0.034µs 69.811µs ± 0.021µs 69.837µs 69.878µs 69.897µs 69.904µs 0.13% 0.407 -0.389 0.05% 0.003µs 1 100
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [69.810µs; 69.823µs] or [-0.010%; +0.010%] None None None

Warnings

Scenario: sql/obfuscate_sql_string, Metric: execution_time

Measurements are autocorrelated.

Autocorrelation is present for lags 1..10.

The measurements are not independent, thus confidence intervals
may be less precise.
---------------------------------------------------------------------------
Scenario: sql/obfuscate_sql_string, Metric: execution_time

Sample size is 100, which is lower than 105.

The minimal sample size in case of normal distribution to achieve significance
level of 0.05 for difference of means with effect size Cohen's d = 0.5 must be at
least 105.

The conclusions from confidence intervals may be invalid.
---------------------------------------------------------------------------

Baseline

Baseline benchmark details

Group 1

iterations config cpu_model ci_job_date ci_job_id ci_pipeline_id git_commit_sha git_commit_date git_branch
717.0 baseline Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1719928335 559707445 38132004 8a5d447 1719860752 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sql/obfuscate_sql_string execution_time 69.787µs 69.917µs ± 0.046µs 69.920µs ± 0.033µs 69.951µs 69.985µs 70.004µs 70.006µs 0.12% -0.330 -0.305 0.07% 0.005µs 1 100
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [69.908µs; 69.926µs] or [-0.013%; +0.013%] None None None

Warnings

Scenario: sql/obfuscate_sql_string, Metric: execution_time

Measurements are autocorrelated.

Autocorrelation is present for lags 1..10.

The measurements are not independent, thus confidence intervals
may be less precise.
---------------------------------------------------------------------------
Scenario: sql/obfuscate_sql_string, Metric: execution_time

Sample size is 100, which is lower than 105.

The minimal sample size in case of normal distribution to achieve significance
level of 0.05 for difference of means with effect size Cohen's d = 0.5 must be at
least 105.

The conclusions from confidence intervals may be invalid.
---------------------------------------------------------------------------

@duncanpharvey duncanpharvey merged commit c00ab02 into main Jul 2, 2024
32 checks passed
@duncanpharvey duncanpharvey deleted the duncan-harvey/serverless-runtime-tags branch July 2, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants