Skip to content

Commit

Permalink
[Addon] Fix for datadog trait logging source setup when serviceName d…
Browse files Browse the repository at this point in the history
…iffers from component name
  • Loading branch information
Kolossi committed Sep 5, 2024
1 parent 9364a49 commit 27adf4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions experimental/addons/datadog/definitions/datadog.cue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ template: {
let sourceAnnotation = {
if parameter.source != _|_ {
metadata: annotations: {
("ad.datadoghq.com/"+parameter.serviceName+".logs"): "[{\"source\": \""+parameter.source+"\"}]"
("ad.datadoghq.com/"+context.name+".logs"): "[{\"source\": \""+parameter.source+"\"}]"
}
}
}
Expand Down Expand Up @@ -135,7 +135,7 @@ template: {
// +usage=name of host mount volume (default datadog)
volumeName: *"datadog" | string

// +usage=source for logging - added as an annotation 'ad.datadoghq.com/<serviceName>.logs: [{"source":"<this value>"}]', and if logDirectSubmissionIntegrations is given, also assigned to DD_LOGS_DIRECT_SUBMISSION_SOURCE env var.
// +usage=source for logging - added as an annotation 'ad.datadoghq.com/<component name>.logs: [{"source":"<this value>"}]', and if logDirectSubmissionIntegrations is given, also assigned to DD_LOGS_DIRECT_SUBMISSION_SOURCE env var.
source?: string

// +usage=auto-map standard dependencies to <serviceName>-dependency by setting DD_TRACE_SERVICE_MAPPING env var (default false)
Expand Down
2 changes: 1 addition & 1 deletion experimental/addons/datadog/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: datadog
version: 0.0.4
version: 0.0.5
system:
vela: ">=v1.9.0"
description: Sets up the annotations and environment variables to assist a webservice or cron-task component to have correct collection of logs and apm stats by a datadog agent installed on the host nodes.
Expand Down

0 comments on commit 27adf4c

Please sign in to comment.