-
Notifications
You must be signed in to change notification settings - Fork 9
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 _dd.mini_agent_version tag to all spans for Azure Functions, Google Cloud Functions, and Azure Spring Apps #548
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #548 +/- ##
==========================================
- Coverage 70.49% 70.44% -0.05%
==========================================
Files 213 213
Lines 28412 28439 +27
==========================================
+ Hits 20030 20035 +5
- Misses 8382 8404 +22
|
@@ -471,9 +483,15 @@ pub fn enrich_span_with_mini_agent_metadata( | |||
span.meta | |||
.insert("location".to_string(), gcp_region.to_string()); | |||
} | |||
if let Some(mini_agent_version) = &mini_agent_metadata.version { | |||
span.meta.insert( | |||
"_dd.mini_agent_version".to_string(), |
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.
Has this tag been approved? I'm not sure if we should continue using the name mini_agent
when this is trace agent.
I mention it because this will now be added to all spans, meaning that anything using this library, like Bottlecap, will result with this tracing agent tag included.
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.
Ah, I jus read Azure Functions, Google Cloud Functions, and Azure Spring Apps.
But still, maybe we should switch to a better naming 🤔
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.
Any ideas for a better name? The packages are all named some variation of "mini agent" so at least it's consistent for now. And the tag will only be set when the environment variable DD_MINI_AGENT_VERSION
is set, which should not be the case for Bottlecap.
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.
I think we need to sort this out at a later point.
BenchmarksThis comment was omitted because it was over 65536 characters.Please check the Gitlab Job logs to see its output. |
…or Azure Functions, Google Cloud Functions, and Azure Spring Apps (#548) * add _dd.mini_agent_version to spans in all environments * apply formatting
What does this PR do?
Adds
_dd.mini_agent_version
span tag to all spans from Azure Functions, Google Cloud Functions, and Azure Spring Apps.Motivation
https://datadoghq.atlassian.net/browse/SVLS-5167
Additional Notes
Previously there was an
aas.environment.mini_agent_version
span tag added for Azure Functions. This tag is being replaced for a span tag that will be applied in all relevant environments: Azure Functions, Google Cloud Functions, and Azure Spring Apps.Set
DD_MINI_AGENT_VERSION
environment variable to the package version ofdatadog-serverless-trace-mini-agent
. Then reference this environment variable in the packages that are run fromdatadog-serverless-trace-mini-agent
.Set the version of
datadog-trace-mini-agent
to match the version of libdatadog so the Serverless Mini Agent version is only managed in a single package moving forward.How to test the change?
Azure Spring Apps
-javaagent:/persistent/dd-java-agent.jar
to the JVM optionsDD_TRACE_TRACER_METRICS_ENABLED
totrue
Azure Functions / Google Cloud Functions
DD_MINI_AGENT_PATH
/home/site/wwwroot/datadog-serverless-trace-mini-agent
/workspace/datadog-serverless-trace-mini-agent