ARTIFACTORY: Setup Datadog's APM dashboard with Artifactory running on Kubernetes

AuthorFullName__c
Ashraf Kherbawy
articleNumber
000005842
FirstPublishedDate
2023-08-08T18:34:35Z
lastModifiedDate
2025-07-20

ARTIFACTORY: Setup Datadog's APM dashboard with Artifactory running on Kubernetes

In this article, we will be going over setting up Datadog’s APM dashboard, to be integrated with Artifactory that is running on a Kubernetes environment. Essentially tracing Artifactory’s JVM machine . Note that this is not the same as tracing Artifactory’s logs or OpenMetrics, as we have a separate documentation for that setup.

This will be the same as setting it up with non-kubernetes environments, however in those scenarios you have complete control over your VM’s, and will only need to follow Datadog’s documentation, rather than working with our Chart’s values.

Prerequisites:

The only prerequisite is to have Datadog’s agent installed on the same Kubernetes cluster as Artifactory.

Enable Datadog’s Admission controller 

Reference:

This step is important in order to allow Datadog’s agent to inject the Java library inside Artifactory’s pod. To enable the Admission controller, we will need to assign the following label to Artifactory’s statefulset:

admission.datadoghq.com/enabled: "true"

To do so, add the following in your artifactory values.yaml:

artifactory:
  labels:
    admission.datadoghq.com/enabled: "true"
Add Pod annotation to Inject the Java library

Reference:

Now we will need to add the following annotation, so that Datadog’s agent can Inject the Java library. I am choosing version 1.16.2, as it’s the latest stable library that is compatible with JDK 17 (As of the time of writing this article):

artifactory:
  annotations:
    admission.datadoghq.com/java-lib.version: v1.16.2
Add Unified Service Tags to the pods

Reference:

To add the Unified Service Tags , we will simply need to pass them as labels:

artifactory:
  labels:
    tags.datadoghq.com/env: "dev"
    tags.datadoghq.com/service: "artifactory"
    tags.datadoghq.com/version: "1"
Adding additional Java tracing properties:

To add any of the Java tracing libraries properties , we can either pass them as Java options to the JVM, or as an environment variable inside the container. For example, to add trace.health.metrics.enabled as a Java option, we can utilize the artifactory.javaOpts.other key:

artifactory:
  javaOpts:
    other: -Ddd.trace.health.metrics.enabled

Or as an environment variable:

artifactory:
  extraEnvironmentVariables:
    - name: DD_TRACE_HEALTH_METRICS_ENABLED
      value: true
Final full example:
artifactory:
  labels:
    admission.datadoghq.com/enabled: "true"
    tags.datadoghq.com/env: "dev"
    tags.datadoghq.com/service: "artifactory"
    tags.datadoghq.com/version: "7.55.14"
  annotations:
    admission.datadoghq.com/java-lib.version: v1.16.2
  javaOpts:
    other: -Ddd.trace.health.metrics.enabled


Once deployed, you will have the trace enabled in your APM section to start reporting:
User-added image