Skip to content

Commit

Permalink
[etcd]: add etcd distributed tracing flags (kubernetes-sigs#10666)
Browse files Browse the repository at this point in the history
* [etcd]: add etcd distributed tracing flags

Signed-off-by: Ugur Ozturk <[email protected]>

* [etcd]: add etcd distributed tracing flags - fix

Signed-off-by: Ugur Ozturk <[email protected]>

* [etcd]: add etcd distributed tracing flags - fix

Signed-off-by: Ugur Ozturk <[email protected]>

---------

Signed-off-by: Ugur Ozturk <[email protected]>
  • Loading branch information
ugur99 authored Dec 19, 2023
1 parent 471326f commit ae780e6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions inventory/sample/group_vars/etcd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,12 @@
### ETCD: disable peer client cert authentication.
# This affects ETCD_PEER_CLIENT_CERT_AUTH variable
# etcd_peer_client_auth: true

## Enable distributed tracing
## To enable this experimental feature, set the etcd_experimental_enable_distributed_tracing: true, along with the
## etcd_experimental_distributed_tracing_sample_rate to choose how many samples to collect per million spans,
## the default sampling rate is 0 https://etcd.io/docs/v3.5/op-guide/monitoring/#distributed-tracing
# etcd_experimental_enable_distributed_tracing: false
# etcd_experimental_distributed_tracing_sample_rate: 100
# etcd_experimental_distributed_tracing_address: "localhost:4317"
# etcd_experimental_distributed_tracing_service_name: etcd
7 changes: 7 additions & 0 deletions roles/etcd/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,10 @@ etcd_experimental_initial_corrupt_check: true
# may contain some private data, so it is recommended to set it to false
# in the production environment.
unsafe_show_logs: false

# Enable distributed tracing
# https://etcd.io/docs/v3.5/op-guide/monitoring/#distributed-tracing
etcd_experimental_enable_distributed_tracing: false
etcd_experimental_distributed_tracing_sample_rate: 100
etcd_experimental_distributed_tracing_address: "localhost:4317"
etcd_experimental_distributed_tracing_service_name: etcd
8 changes: 8 additions & 0 deletions roles/etcd/templates/etcd.env.j2
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,11 @@ ETCDCTL_CERT={{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem
# ETCD 3.5.x issue
# https://groups.google.com/a/kubernetes.io/g/dev/c/B7gJs88XtQc/m/rSgNOzV2BwAJ?utm_medium=email&utm_source=footer
ETCD_EXPERIMENTAL_INITIAL_CORRUPT_CHECK={{ etcd_experimental_initial_corrupt_check }}

{% if etcd_experimental_enable_distributed_tracing %}
ETCD_EXPERIMENTAL_ENABLE_DISTRIBUTED_TRACING=true
ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_SAMPLE_RATE={{ etcd_experimental_distributed_tracing_sample_rate }}
ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_ADDRESS={{ etcd_experimental_distributed_tracing_address }}
ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_SERVICE_NAME={{ etcd_experimental_distributed_tracing_service_name }}
ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_INSTANCE_ID={{ etcd_member_name }}
{% endif %}

0 comments on commit ae780e6

Please sign in to comment.