Skip to content

Commit

Permalink
Add autodiscovery example
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
  • Loading branch information
ChrsMark committed Nov 28, 2023
1 parent 9de76d7 commit a4c8007
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions kubernetes/elastic-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,30 @@ opentelemetry-collector:
name: elastic-secret
key: elastic_apm_secret_token
config:
# k8s_observer section enables the k8s autodiscovery observer
# With this enabled we can automatically enable service specific receivers
# based on conditions
# extensions:
# k8s_observer:
# auth_type: serviceAccount
# node: ${env:K8S_NODE_NAME}
# observe_pods: true
exporters:
otlp/elastic:
endpoint: ${ELASTIC_APM_ENDPOINT}
compression: none
headers:
Authorization: Bearer ${ELASTIC_APM_SECRET_TOKEN}
receivers:
# receiver_creator enables service specific receivers
# based on conditions
# receiver_creator:
# watch_observers: [ k8s_observer ]
# receivers:
# redis:
# rule: type == "port" && pod.name matches "redis"
# config:
# collection_interval: 2s
otlp:
protocols:
grpc:
Expand All @@ -53,13 +70,17 @@ opentelemetry-collector:
- https://*
endpoint: ${MY_POD_IP}:4318
service:
# Enable extensions
# extensions: [k8s_observer]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlp/elastic]
metrics:
receivers: [otlp]
# Add the receiver_creator
# receivers: [otlp, receiver_creator]
processors: [batch]
exporters: [otlp/elastic]
logs:
Expand Down

0 comments on commit a4c8007

Please sign in to comment.