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

Azure App Service Tags #646

Merged
merged 13 commits into from
Feb 27, 2020
Merged

Azure App Service Tags #646

merged 13 commits into from
Feb 27, 2020

Conversation

colin-higgins
Copy link
Member

Parse out the azure app services resource id.

@DataDog/apm-dotnet

@colin-higgins colin-higgins added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) status:work-in-progress Actively worked on. If this is a PR, no review needed yet. WIP. labels Feb 18, 2020
@colin-higgins colin-higgins self-assigned this Feb 18, 2020
/// <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";
Copy link
Member Author

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?

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.

Copy link
Member Author

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.

Copy link

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).

Copy link
Member Author

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

@colin-higgins colin-higgins marked this pull request as ready for review February 24, 2020 20:53
@colin-higgins colin-higgins requested a review from a team as a code owner February 24, 2020 20:53
@colin-higgins colin-higgins changed the title collect resource id for azure app services Azure App Service Tags Feb 25, 2020
Copy link
Contributor

@zacharycmontoya zacharycmontoya left a 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 👍

@colin-higgins colin-higgins removed the status:work-in-progress Actively worked on. If this is a PR, no review needed yet. WIP. label Feb 25, 2020
@colin-higgins colin-higgins merged commit 8260cc7 into master Feb 27, 2020
@lucaspimentel lucaspimentel added this to the 1.14.0 milestone Mar 6, 2020
@lucaspimentel lucaspimentel added area:azure-site-extension Changes for AAS support type:new-feature and removed area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) labels Mar 9, 2020
MikeGoldsmith pushed a commit to lightstep/ls-trace-dotnet that referenced this pull request Mar 20, 2020
* collect resource id for azure app services
@lucaspimentel lucaspimentel deleted the colin/aas/billing-tags branch August 16, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants