Skip to content

Commit

Permalink
fix: EntityID could be provided from config, but for now only env sup…
Browse files Browse the repository at this point in the history
…ported
  • Loading branch information
juancarrey committed May 10, 2024
1 parent 14fb59a commit fcf8a3e
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,8 @@ class DatadogAgentReporter private[datadog] (@volatile private var config: Datad

}

private def updateTagsWithEntityID(tags: TagSet, entityID: String): TagSet = {
if (entityID == null || entityID.trim().isEmpty()) {
entityId = System.getenv("DD_ENTITY_ID")
}
private def updateTagsWithEntityID(tags: TagSet): TagSet = {
val entityId = System.getenv("DD_ENTITY_ID")
if (entityId != null && !entityId.trim().isEmpty()) {
return tags.withTag(ENTITY_ID_TAG_NAME, entityId);
}
Expand Down

0 comments on commit fcf8a3e

Please sign in to comment.