Shawn
Shawn

Reputation: 3

Is there any unique DeviceID for each application in Dynatrace?

I'm trying to integrate Micrometer with Dynatrace in my Spring Boot application. I've tried to deploy the application to add micrometer OkHttp connection pool metrics and export it to Dynatrace using the API token and Dynatrace URI. However, I'm encountering an error when checking the logs,

***************************
APPLICATION FAILED TO START
***************************

Description:

Invalid Micrometer configuration detected:

  - dynatrace.deviceId was 'null' but it is required

Action:

Update your application to correct the invalid configuration.

I'm wondering if each application in Dynatrace is assigned a unique device ID. If so, how can I retrieve or configure this device ID for my application?

I've added the necessary Micrometer and Dynatrace dependencies to my pom.xml. My application.yml contains the following configuration:

management:
  metrics:
    export:
      dynatrace:
        apiToken: MY_API_TOKEN
        uri: https://YOUR_DYNATRACE_URI/api/v2/metrics/ingest

However, there is no mention of dynatrace.deviceId in my application.yml file.

I'm wondering if each application in Dynatrace is assigned a unique device ID. If so, how can I retrieve or configure this device ID for my application? Where should the dynatrace.deviceId be defined? Should it be in the application.yml, or is it generated/managed differently? Is there anything else I should verify to ensure the Dynatrace configuration is correct?

Dynatrace OneAgent is installed on the servers.

Upvotes: 0

Views: 89

Answers (1)

Jonatan Ivanov
Jonatan Ivanov

Reputation: 6921

Dynatrace has two APIs we support: v1 (legacy) and v2 (new). The deviceId is only needed for v1 but looking at the URL, it seems you want to use v2.

Since your question does not include the Boot version, could you please double check if you use the latest Spring Boot and Micrometer to ensure they support Dynatrace v2?

If this does not solve your issue, please look at the docs to see how to configure things:

Upvotes: 0

Related Questions