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

exporter/datadogexporter: use pkg/trace #9693

Merged
merged 1 commit into from
Jun 29, 2022
Merged

Conversation

gbbr
Copy link
Member

@gbbr gbbr commented May 3, 2022

Description:

This change make use of the exact same code that the Datadog Agent uses for processing traces. A module was created in the Datadog Agent repository that is now imported here: github.com/DataDog/datadog-agent/pkg/trace.

This change should allow for more consistent and stable behaviour.

Testing:

All unit tests were kept. Removed functionality was moved to the pkg/trace module as part of DataDog/datadog-agent#11548.

Documentation:

Attributes are mapped to Datadog container tags internally as follows (considering the left side OTLP attributes are set in the SDKs):

             container.id -> container_id
           container.name -> container_name
     container.image.name -> image_name
      container.image.tag -> image_tag
       k8s.container.name -> kube_container_name
         k8s.cluster.name -> kube_cluster_name
      k8s.deployment.name -> kube_deployment
      k8s.replicaset.name -> kube_replica_set
     k8s.statefulset.name -> kube_stateful_set
       k8s.daemonset.name -> kube_daemon_set
             k8s.job.name -> kube_job
         k8s.cronjob.name -> kube_cronjob
       k8s.namespace.name -> kube_namespace
             k8s.pod.name -> pod_name
           cloud.provider -> cloud_provider
             cloud.region -> region
  cloud.availability_zone -> zone
      aws.ecs.task.family -> task_family
         aws.ecs.task.arn -> task_arn
      aws.ecs.cluster.arn -> ecs_cluster_name
    aws.ecs.task.revision -> task_version
    aws.ecs.container.arn -> ecs_container_name

@gbbr gbbr force-pushed the pkg/trace branch 2 times, most recently from f312a7a to 33e23ee Compare May 6, 2022 06:21
Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

I did a first pass on this and left a lot of comments, some of them because I don't understand the logic of the APM side as well as I would like 😅

This is a huge PR and I would prefer to the extent that it is possible to focus it exclusively only on changes that relate to swapping the current logic by pkg/trace and leave everything else out; the other changes make sense but we can leave them for a different PR

I think it is also very important to document the changes in behavior from the current logic to the one that we are adding. I would suggest adding this as a 'breaking change' in the changelog and list down important details in the logic that will change after the swap is complete.

exporter/datadogexporter/go.mod Outdated Show resolved Hide resolved
exporter/datadogexporter/metrics_exporter.go Outdated Show resolved Hide resolved
exporter/datadogexporter/factory.go Outdated Show resolved Hide resolved
exporter/datadogexporter/factory.go Show resolved Hide resolved
exporter/datadogexporter/go.mod Outdated Show resolved Hide resolved
exporter/datadogexporter/translate_traces.go Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
exporter/datadogexporter/traces_exporter.go Outdated Show resolved Hide resolved
exporter/datadogexporter/traces_exporter.go Outdated Show resolved Hide resolved
@gbbr gbbr marked this pull request as ready for review May 6, 2022 09:34
@gbbr gbbr requested review from a team and dmitryax May 6, 2022 09:34
@gbbr gbbr force-pushed the pkg/trace branch 10 times, most recently from f288438 to 6a99a4a Compare May 9, 2022 08:06
exporter/datadogexporter/traces_exporter.go Outdated Show resolved Hide resolved
exporter/datadogexporter/traces_exporter.go Outdated Show resolved Hide resolved
exporter/datadogexporter/translate_traces.go Show resolved Hide resolved
exporter/datadogexporter/traces_exporter.go Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label May 28, 2022
@mx-psi mx-psi removed the Stale label May 30, 2022
CHANGELOG.md Outdated Show resolved Hide resolved
exporter/datadogexporter/go.mod Outdated Show resolved Hide resolved
exporter/datadogexporter/go.mod Show resolved Hide resolved
@gbbr gbbr requested a review from mx-psi June 29, 2022 06:49
@gbbr gbbr force-pushed the pkg/trace branch 5 times, most recently from b57a506 to 7882db9 Compare June 29, 2022 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants