-
Notifications
You must be signed in to change notification settings - Fork 19
feat: unify Azure tags #1553
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
feat: unify Azure tags #1553
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -555,35 +555,11 @@ pub fn enrich_span_with_azure_function_metadata(span: &mut pb::Span) { | |
| } | ||
|
|
||
| if let Some(aas_metadata) = &*azure_app_services::AAS_METADATA_FUNCTION { | ||
| let aas_tags = [ | ||
| ("aas.resource.id", aas_metadata.get_resource_id()), | ||
| ( | ||
| "aas.environment.instance_id", | ||
| aas_metadata.get_instance_id(), | ||
| ), | ||
| ( | ||
| "aas.environment.instance_name", | ||
| aas_metadata.get_instance_name(), | ||
| ), | ||
| ("aas.subscription.id", aas_metadata.get_subscription_id()), | ||
| ("aas.environment.os", aas_metadata.get_operating_system()), | ||
| ("aas.environment.runtime", aas_metadata.get_runtime()), | ||
| ( | ||
| "aas.environment.runtime_version", | ||
| aas_metadata.get_runtime_version(), | ||
| ), | ||
| ( | ||
| "aas.environment.function_runtime", | ||
| aas_metadata.get_function_runtime_version(), | ||
| ), | ||
| ("aas.resource.group", aas_metadata.get_resource_group()), | ||
| ("aas.site.name", aas_metadata.get_site_name()), | ||
| ("aas.site.kind", aas_metadata.get_site_kind()), | ||
| ("aas.site.type", aas_metadata.get_site_type()), | ||
| ]; | ||
| aas_tags.into_iter().for_each(|(name, value)| { | ||
| span.meta.insert(name.to_string(), value.to_string()); | ||
| }); | ||
| span.meta.extend( | ||
| aas_metadata | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This gives Azure Functions a span attribute It turns out I can't test dev versions of libdatadog in dd-trace-dotnet, which is what Azure App Services Windows uses for profiling 😅, but looking at the code I also don't think AAS is supposed to get those functions runtime tags. AFAIK the So these environment variables are supposed to be mutually exclusive, and this would cause tags with libdatadog is used in Azure Functions for traces, but not profiles, so this affects traces in Azure Functions cc @duncanpharvey, correct me if I'm wrong!
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Azure App Service: aas.environment.extension_version |
||
| .get_function_tags() | ||
| .map(|(name, value)| (name.to_string(), value.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.
Do we want to filter here if tags are empty ? I assume this would be filtered either way afterwards by Tag::new(name, value).ok()