-
Notifications
You must be signed in to change notification settings - Fork 147
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
Azure App Service Tags #646
Conversation
1c32ee8
to
219cd76
Compare
/// <summary> | ||
/// The resource id of the site instance in azure app services where the traced application is running. | ||
/// </summary> | ||
public const string AzureAppServicesResourceId = "aas.resource.id"; |
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.
@vlad-mh
Is this tag key okay?
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.
Hi @colin-higgins. Just for a reference. This is what we have in a trace from Fargate. As you see, we put all necessary infos under _dd.tags.container
. And, task_arn
is task id of Fargate task.
"meta": {
"status.code": "OK",
"thread.id": "42",
"language": "jvm",
"runtime-id": "af1dd301-a46d-4f1e-b449-7c8a66b576a5",
"component": "grpc-server",
"_dd.tags.container": "image_tag:4.11.1-5c1f6f42e6f0620c5ca7944690595818d1cba905,cluster_name:backend-fargate-core,env:prod,ecs:true,ecs_container_name:fargate-rpc-core-server,short_image:rpc-core-server,service_name:rpc-core,task_version:18,image_name:631381176113.dkr.ecr.us-east-1.amazonaws.com/rpc-core-server,region:us-east-1,task_family:rpc-core-server,docker_image:631381176113.dkr.ecr.us-east-1.amazonaws.com/rpc-core-server:4.11.1-5c1f6f42e6f0620c5ca7944690595818d1cba905,task_arn:arn:aws:ecs:us-east-1:631381176113:task/2b8da2ee-d401-4a98-a4be-288531f059bd,container_id:8cea6f628a0581864edc1be5cf10904745dda2fc3d63b621dddaac8c3a87b914,container_name:ecs-rpc-core-server-18-fargate-rpc-core-server-d08e99a1eaebc6bcb001",
"thread.name": "pool-24-thread-7",
"env": "prod",
"span.kind": "server"
},
I'll let @vlad-mh answer your question.
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.
@Barbayar For container Ids, we actually send them as a header on the http requests to the agent with the trace payload. Those are sent with a key of Datadog-Container-ID
and then are added to the traces with _dd.tags.container
at some point later than the tracer.
I was originally thinking that would be the case here, and am happy to do the same thing.
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.
Unless the resource-id is something we want to reveal in our UI (which it seems as we don't), then this tags should be prefixed with _dd
(used for internal tags).
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.
They are tags that would be useful for users to see per conversations with @garnermccloud
0247746
to
baee707
Compare
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.
Besides figuring out the correct tag names, the overall structure of this approach looks good to me 👍
817117a
to
22d9bd8
Compare
test/Datadog.Trace.Tests/PlatformHelpers/AzureAppServicesMetadataTests.cs
Outdated
Show resolved
Hide resolved
* collect resource id for azure app services
Parse out the azure app services resource id.
@DataDog/apm-dotnet