Skip to content

Commit

Permalink
[OTEL-1018] Improve host metadata resource attributes (#5248)
Browse files Browse the repository at this point in the history
* [ci] Improve attributes for host metadata

- Enable optional system detector attributes
- Enable optional hostmetrics receiver metrics
- Set datadog.host.use_as_metadata to true
- Set an optional host tag

* Remove system.memory.limit

Not released just yet

* Use transform processor
  • Loading branch information
mx-psi authored Jan 12, 2024
1 parent c633ecb commit cb43d7c
Showing 1 changed file with 45 additions and 3 deletions.
48 changes: 45 additions & 3 deletions ci/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ config:
metrics:
system.cpu.utilization:
enabled: true
system.cpu.physical.count:
enabled: true
system.cpu.logical.count:
enabled: true
system.cpu.frequency:
enabled: true
disk:
load:
memory:
Expand Down Expand Up @@ -98,6 +104,15 @@ config:
- key: service
from_attribute: service_name
action: upsert
transform:
metric_statements: &statements
- context: resource
statements:
- set(attributes["datadog.host.use_as_metadata"],true)
- set(attributes["datadog.host.tag.foo"],"bar")
trace_statements: *statements
log_statements: *statements

attributes/kafkasrc:
include:
match_type: regexp
Expand All @@ -120,6 +135,33 @@ config:
detectors: [env, gcp, ecs, ec2, azure, system]
timeout: 5s
override: false
system:
# Enable optional system attributes
resource_attributes:
os.type:
enabled: true
os.description:
enabled: true
host.ip:
enabled: true
host.mac:
enabled: true
host.arch:
enabled: true
host.cpu.vendor.id:
enabled: true
host.cpu.model.name:
enabled: true
host.cpu.family:
enabled: true
host.cpu.model.id:
enabled: true
host.cpu.stepping:
enabled: true
host.cpu.cache.l2.size:
enabled: true
host.id:
enabled: false
# adds various tags related to k8s
# adds various tags related to k8s
k8sattributes:
Expand Down Expand Up @@ -185,12 +227,12 @@ config:
pipelines:
metrics:
receivers: [otlp, hostmetrics, prometheus]
processors: [resourcedetection, k8sattributes, batch]
processors: [resourcedetection, k8sattributes, transform, batch]
exporters: [datadog]
traces:
receivers: [otlp]
processors: [resourcedetection, k8sattributes, batch]
processors: [resourcedetection, k8sattributes, transform, batch]
exporters: [datadog]
logs:
processors: [memory_limiter, resourcedetection, k8sattributes, attributes, attributes/kafkasrc, batch]
processors: [memory_limiter, resourcedetection, k8sattributes, attributes, attributes/kafkasrc, transform, batch]
exporters: [datadog]

0 comments on commit cb43d7c

Please sign in to comment.