From 4c9bd23189f799ac313efa1b42416cf45e696364 Mon Sep 17 00:00:00 2001 From: Carles Garcia Cabot <carles.garciacabot@grafana.com> Date: Mon, 9 Dec 2024 18:52:00 +0100 Subject: [PATCH] Add script to generate manifest with default config The script: - generates the manifest with default config YAML which is included in the docs as a reference. - runs in CI to check if the manifest needs to be updated as a result of new changes in the default config. --- .github/workflows/ci.yml | 5 + cmd/tempo/app/app.go | 4 +- cmd/tempo/app/config.go | 2 +- cmd/tempo/app/config_test.go | 14 +- docs/sources/tempo/configuration/manifest.md | 44 +- docs/sources/tempo/shared/default_config.yaml | 817 ++++++++++++++++++ pkg/docsgen/generate_manifest.go | 62 ++ 7 files changed, 912 insertions(+), 36 deletions(-) create mode 100644 docs/sources/tempo/shared/default_config.yaml create mode 100644 pkg/docsgen/generate_manifest.go diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9766f457004..fa39ffa54249 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,7 @@ jobs: name: Lint runs-on: ubuntu-latest steps: + - name: Check out code uses: actions/checkout@v4 with: @@ -29,6 +30,7 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: "go.mod" + - name: check-fmt run: make check-fmt @@ -38,6 +40,9 @@ jobs: - name: lint run: make lint base=origin/${{github.base_ref}} + - name: generate-manifest + run: go run pkg/docsgen/generate_manifest.go + unit-tests: name: Run Unit Tests runs-on: ubuntu-latest diff --git a/cmd/tempo/app/app.go b/cmd/tempo/app/app.go index 732ec8773368..1aa7133d706d 100644 --- a/cmd/tempo/app/app.go +++ b/cmd/tempo/app/app.go @@ -270,7 +270,7 @@ func (t *App) writeStatusConfig(w io.Writer, r *http.Request) error { mode := r.URL.Query().Get("mode") switch mode { case "diff": - defaultCfg := newDefaultConfig() + defaultCfg := NewDefaultConfig() defaultCfgYaml, err := util.YAMLMarshalUnmarshal(defaultCfg) if err != nil { @@ -287,7 +287,7 @@ func (t *App) writeStatusConfig(w io.Writer, r *http.Request) error { return err } case "defaults": - output = newDefaultConfig() + output = NewDefaultConfig() case "": output = t.cfg default: diff --git a/cmd/tempo/app/config.go b/cmd/tempo/app/config.go index 2dc26d9ebbe8..bcb483a8af63 100644 --- a/cmd/tempo/app/config.go +++ b/cmd/tempo/app/config.go @@ -56,7 +56,7 @@ type Config struct { CacheProvider cache.Config `yaml:"cache,omitempty"` } -func newDefaultConfig() *Config { +func NewDefaultConfig() *Config { defaultConfig := &Config{} defaultFS := flag.NewFlagSet("", flag.PanicOnError) defaultConfig.RegisterFlagsAndApplyDefaults("", defaultFS) diff --git a/cmd/tempo/app/config_test.go b/cmd/tempo/app/config_test.go index 1f2ccaa8c8cc..85b1a93ae1a9 100644 --- a/cmd/tempo/app/config_test.go +++ b/cmd/tempo/app/config_test.go @@ -25,7 +25,7 @@ func TestConfig_CheckConfig(t *testing.T) { }{ { name: "check default cfg and expect no warnings", - config: newDefaultConfig(), + config: NewDefaultConfig(), expect: nil, }, { @@ -76,7 +76,7 @@ func TestConfig_CheckConfig(t *testing.T) { { name: "hit local backend warnings", config: func() *Config { - cfg := newDefaultConfig() + cfg := NewDefaultConfig() cfg.StorageConfig.Trace = tempodb.Config{ Backend: backend.Local, BlocklistPollConcurrency: 1, @@ -92,7 +92,7 @@ func TestConfig_CheckConfig(t *testing.T) { { name: "warnings for v2 settings when they drift from default", config: func() *Config { - cfg := newDefaultConfig() + cfg := NewDefaultConfig() cfg.StorageConfig.Trace.Block.Version = vparquet4.VersionString cfg.StorageConfig.Trace.Block.IndexDownsampleBytes = 1 cfg.StorageConfig.Trace.Block.IndexPageSizeBytes = 1 @@ -112,7 +112,7 @@ func TestConfig_CheckConfig(t *testing.T) { { name: "no warnings for v2 settings when they drift from default and v2 is the block version", config: func() *Config { - cfg := newDefaultConfig() + cfg := NewDefaultConfig() cfg.StorageConfig.Trace.Block.Version = v2.VersionString cfg.StorageConfig.Trace.Block.IndexDownsampleBytes = 1 cfg.StorageConfig.Trace.Block.IndexPageSizeBytes = 1 @@ -126,7 +126,7 @@ func TestConfig_CheckConfig(t *testing.T) { { name: "trace storage conflicts with overrides storage - local", config: func() *Config { - cfg := newDefaultConfig() + cfg := NewDefaultConfig() cfg.StorageConfig.Trace.Backend = backend.Local cfg.StorageConfig.Trace.Local.Path = "/var/tempo" cfg.Overrides.UserConfigurableOverridesConfig.Client.Backend = backend.Local @@ -138,7 +138,7 @@ func TestConfig_CheckConfig(t *testing.T) { { name: "trace storage conflicts with overrides storage - gcs", config: func() *Config { - cfg := newDefaultConfig() + cfg := NewDefaultConfig() cfg.StorageConfig.Trace.Backend = backend.GCS cfg.StorageConfig.Trace.GCS.BucketName = "bucketname" cfg.StorageConfig.Trace.GCS.Prefix = "tempo" @@ -152,7 +152,7 @@ func TestConfig_CheckConfig(t *testing.T) { { name: "trace storage conflicts with overrides storage - different backends", config: func() *Config { - cfg := newDefaultConfig() + cfg := NewDefaultConfig() cfg.StorageConfig.Trace.Backend = backend.GCS cfg.StorageConfig.Trace.GCS.BucketName = "my-bucket" cfg.Overrides.UserConfigurableOverridesConfig.Client.Backend = backend.S3 diff --git a/docs/sources/tempo/configuration/manifest.md b/docs/sources/tempo/configuration/manifest.md index 99f82726ff6a..c1abbfa1611c 100644 --- a/docs/sources/tempo/configuration/manifest.md +++ b/docs/sources/tempo/configuration/manifest.md @@ -3,6 +3,8 @@ title: Manifest description: This manifest lists of all Tempo options and their defaults. weight: 110 --- +[//]: # THIS FILE IS GENERATED AUTOMATICALLY BY 'go run pkg/docsgen/generate_manifest.go' +[//]: # DO NOT EDIT THIS FILE DIRECTLY' # Manifest @@ -10,16 +12,7 @@ This document is a reference for all Tempo options and their defaults. If you ar started with Tempo, refer to [Tempo examples](https://github.com/grafana/tempo/tree/main/example/docker-compose) and other [configuration documentation]({{< relref "../configuration" >}}). Most installations will require only setting 10 to 20 of these options. -It was generated by running Tempo with a minimal configuration and accessing the `/status/config` endpoint: -``` -go run ./cmd/tempo --storage.trace.backend=local --storage.trace.local.path=/var/tempo/traces --storage.trace.wal.path=/var/tempo/wal -``` - -## Complete configuration - -{{< admonition type="note" >}} -This manifest was generated on 2024-11-28. -{{% /admonition %}} +## Complete configurationd ```yaml target: all @@ -177,7 +170,7 @@ distributor: mirror_timeout: 2s heartbeat_period: 5s heartbeat_timeout: 5m0s - instance_id: local-instance + instance_id: instance_id instance_interface_names: - eth0 - en0 @@ -202,7 +195,7 @@ ingester_client: grpc_client_config: max_recv_msg_size: 104857600 max_send_msg_size: 104857600 - grpc_compression: snappy + grpc_compression: "" rate_limit: 0 rate_limit_burst: 0 backoff_on_ratelimits: false @@ -233,7 +226,7 @@ metrics_generator_client: grpc_client_config: max_recv_msg_size: 104857600 max_send_msg_size: 104857600 - grpc_compression: snappy + grpc_compression: "" rate_limit: 0 rate_limit_burst: 0 backoff_on_ratelimits: false @@ -270,7 +263,7 @@ querier: time_overlap_cutoff: 0.2 max_concurrent_queries: 20 frontend_worker: - frontend_address: 127.0.0.1:9095 + frontend_address: "" dns_lookup_duration: 10s parallelism: 2 match_max_concurrent: true @@ -278,7 +271,7 @@ querier: grpc_client_config: max_recv_msg_size: 104857600 max_send_msg_size: 16777216 - grpc_compression: gzip + grpc_compression: "" rate_limit: 0 rate_limit_burst: 0 backoff_on_ratelimits: false @@ -370,7 +363,7 @@ compactor: heartbeat_timeout: 1m0s wait_stability_min_duration: 1m0s wait_stability_max_duration: 5m0s - instance_id: local-instance + instance_id: instance_id instance_interface_names: - eth0 - en0 @@ -395,7 +388,7 @@ ingester: lifecycler: ring: kvstore: - store: inmemory + store: memberlist prefix: collectors/ consul: host: localhost:8500 @@ -435,16 +428,16 @@ ingester: join_after: 0s min_ready_duration: 15s interface_names: - - en0 + - eth0 enable_inet6: false final_sleep: 0s tokens_file_path: "" availability_zone: "" unregister_on_shutdown: true readiness_check_ring_health: true - address: 127.0.0.1 + address: "" port: 0 - id: local-instance + id: instance_id concurrent_flushes: 4 flush_check_period: 10s flush_op_timeout: 5m0s @@ -457,7 +450,7 @@ ingester: metrics_generator: ring: kvstore: - store: inmemory + store: memberlist prefix: collectors/ consul: host: localhost:8500 @@ -488,11 +481,11 @@ metrics_generator: mirror_timeout: 2s heartbeat_period: 5s heartbeat_timeout: 1m0s - instance_id: local-instance + instance_id: instance_id instance_interface_names: - eth0 - en0 - instance_addr: 127.0.0.1 + instance_addr: "" instance_port: 0 enable_inet6: false processor: @@ -616,7 +609,6 @@ storage: v2_encoding: snappy search_encoding: none ingestion_time_range_slack: 2m0s - version: vParquet4 block: bloom_filter_false_positive: 0.01 bloom_filter_shard_size_bytes: 102400 @@ -648,9 +640,9 @@ storage: blocklist_poll_tolerate_tenant_failures: 1 empty_tenant_deletion_enabled: false empty_tenant_deletion_age: 0s - backend: local + backend: "" local: - path: /var/tempo/traces + path: "" gcs: bucket_name: "" prefix: "" diff --git a/docs/sources/tempo/shared/default_config.yaml b/docs/sources/tempo/shared/default_config.yaml new file mode 100644 index 000000000000..923f7f098a3d --- /dev/null +++ b/docs/sources/tempo/shared/default_config.yaml @@ -0,0 +1,817 @@ +target: all +http_api_prefix: "" +server: + http_listen_network: tcp + http_listen_address: "" + http_listen_port: 80 + http_listen_conn_limit: 0 + grpc_listen_network: tcp + grpc_listen_address: "" + grpc_listen_port: 9095 + grpc_listen_conn_limit: 0 + proxy_protocol_enabled: false + tls_cipher_suites: "" + tls_min_version: "" + http_tls_config: + cert: "" + key: null + client_ca: "" + cert_file: "" + key_file: "" + client_auth_type: "" + client_ca_file: "" + grpc_tls_config: + cert: "" + key: null + client_ca: "" + cert_file: "" + key_file: "" + client_auth_type: "" + client_ca_file: "" + register_instrumentation: true + report_grpc_codes_in_instrumentation_label_enabled: false + graceful_shutdown_timeout: 30s + http_server_read_timeout: 30s + http_server_read_header_timeout: 0s + http_server_write_timeout: 30s + http_server_idle_timeout: 2m0s + http_log_closed_connections_without_response_enabled: false + grpc_server_max_recv_msg_size: 16777216 + grpc_server_max_send_msg_size: 16777216 + grpc_server_max_concurrent_streams: 100 + grpc_server_max_connection_idle: 2562047h47m16.854775807s + grpc_server_max_connection_age: 2562047h47m16.854775807s + grpc_server_max_connection_age_grace: 2562047h47m16.854775807s + grpc_server_keepalive_time: 2h0m0s + grpc_server_keepalive_timeout: 20s + grpc_server_min_time_between_pings: 10s + grpc_server_ping_without_stream_allowed: true + grpc_server_num_workers: 0 + grpc_server_stats_tracking_enabled: true + grpc_server_recv_buffer_pools_enabled: false + log_format: logfmt + log_level: info + log_source_ips_enabled: false + log_source_ips_full: false + log_source_ips_header: "" + log_source_ips_regex: "" + log_request_headers: false + log_request_at_info_level_enabled: false + log_request_exclude_headers_list: "" + http_path_prefix: "" +internal_server: + http_listen_network: tcp + http_listen_address: "" + http_listen_port: 3101 + http_listen_conn_limit: 0 + grpc_listen_network: "" + grpc_listen_address: "" + grpc_listen_port: 0 + grpc_listen_conn_limit: 0 + proxy_protocol_enabled: false + tls_cipher_suites: "" + tls_min_version: "" + http_tls_config: + cert: "" + key: null + client_ca: "" + cert_file: "" + key_file: "" + client_auth_type: "" + client_ca_file: "" + grpc_tls_config: + cert: "" + key: null + client_ca: "" + cert_file: "" + key_file: "" + client_auth_type: "" + client_ca_file: "" + register_instrumentation: false + report_grpc_codes_in_instrumentation_label_enabled: false + graceful_shutdown_timeout: 30s + http_server_read_timeout: 30s + http_server_read_header_timeout: 0s + http_server_write_timeout: 30s + http_server_idle_timeout: 2m0s + http_log_closed_connections_without_response_enabled: false + grpc_server_max_recv_msg_size: 0 + grpc_server_max_send_msg_size: 0 + grpc_server_max_concurrent_streams: 0 + grpc_server_max_connection_idle: 0s + grpc_server_max_connection_age: 0s + grpc_server_max_connection_age_grace: 0s + grpc_server_keepalive_time: 0s + grpc_server_keepalive_timeout: 0s + grpc_server_min_time_between_pings: 0s + grpc_server_ping_without_stream_allowed: false + grpc_server_num_workers: 0 + grpc_server_stats_tracking_enabled: false + grpc_server_recv_buffer_pools_enabled: false + log_format: logfmt + log_level: info + log_source_ips_enabled: false + log_source_ips_full: false + log_source_ips_header: "" + log_source_ips_regex: "" + log_request_headers: false + log_request_at_info_level_enabled: false + log_request_exclude_headers_list: "" + http_path_prefix: "" + enable: false +distributor: + ring: + kvstore: + store: memberlist + prefix: collectors/ + consul: + host: localhost:8500 + acl_token: "" + http_client_timeout: 20s + consistent_reads: false + watch_rate_limit: 1 + watch_burst_size: 1 + cas_retry_delay: 1s + etcd: + endpoints: [] + dial_timeout: 10s + max_retries: 10 + tls_enabled: false + tls_cert_path: "" + tls_key_path: "" + tls_ca_path: "" + tls_server_name: "" + tls_insecure_skip_verify: false + tls_cipher_suites: "" + tls_min_version: "" + username: "" + password: "" + multi: + primary: "" + secondary: "" + mirror_enabled: false + mirror_timeout: 2s + heartbeat_period: 5s + heartbeat_timeout: 5m0s + instance_id: Mac + instance_interface_names: + - eth0 + - en0 + instance_port: 0 + instance_addr: "" + receivers: {} + override_ring_key: distributor + forwarders: [] + usage: + cost_attribution: + max_cardinality: 10000 + stale_duration: 15m0s + extend_writes: true + retry_after_on_resource_exhausted: 0s +ingester_client: + pool_config: + checkinterval: 15s + healthcheckenabled: true + healthchecktimeout: 1s + maxconcurrenthealthchecks: 0 + remote_timeout: 5s + grpc_client_config: + max_recv_msg_size: 104857600 + max_send_msg_size: 104857600 + grpc_compression: snappy + rate_limit: 0 + rate_limit_burst: 0 + backoff_on_ratelimits: false + backoff_config: + min_period: 100ms + max_period: 10s + max_retries: 10 + initial_stream_window_size: 63KiB1023B + initial_connection_window_size: 63KiB1023B + tls_enabled: false + tls_cert_path: "" + tls_key_path: "" + tls_ca_path: "" + tls_server_name: "" + tls_insecure_skip_verify: false + tls_cipher_suites: "" + tls_min_version: "" + connect_timeout: 5s + connect_backoff_base_delay: 1s + connect_backoff_max_delay: 5s +metrics_generator_client: + pool_config: + checkinterval: 15s + healthcheckenabled: true + healthchecktimeout: 1s + maxconcurrenthealthchecks: 0 + remote_timeout: 5s + grpc_client_config: + max_recv_msg_size: 104857600 + max_send_msg_size: 104857600 + grpc_compression: snappy + rate_limit: 0 + rate_limit_burst: 0 + backoff_on_ratelimits: false + backoff_config: + min_period: 100ms + max_period: 10s + max_retries: 10 + initial_stream_window_size: 63KiB1023B + initial_connection_window_size: 63KiB1023B + tls_enabled: false + tls_cert_path: "" + tls_key_path: "" + tls_ca_path: "" + tls_server_name: "" + tls_insecure_skip_verify: false + tls_cipher_suites: "" + tls_min_version: "" + connect_timeout: 5s + connect_backoff_base_delay: 1s + connect_backoff_max_delay: 5s +querier: + search: + query_timeout: 30s + prefer_self: 10 + external_hedge_requests_at: 8s + external_hedge_requests_up_to: 2 + external_backend: "" + google_cloud_run: null + external_endpoints: [] + trace_by_id: + query_timeout: 10s + metrics: + concurrent_blocks: 2 + time_overlap_cutoff: 0.2 + max_concurrent_queries: 20 + frontend_worker: + frontend_address: "" + dns_lookup_duration: 10s + parallelism: 2 + match_max_concurrent: true + id: "" + grpc_client_config: + max_recv_msg_size: 104857600 + max_send_msg_size: 16777216 + grpc_compression: gzip + rate_limit: 0 + rate_limit_burst: 0 + backoff_on_ratelimits: false + backoff_config: + min_period: 100ms + max_period: 1s + max_retries: 5 + initial_stream_window_size: 0B + initial_connection_window_size: 0B + tls_enabled: false + tls_cert_path: "" + tls_key_path: "" + tls_ca_path: "" + tls_server_name: "" + tls_insecure_skip_verify: false + tls_cipher_suites: "" + tls_min_version: "" + connect_timeout: 0s + connect_backoff_base_delay: 0s + connect_backoff_max_delay: 0s + shuffle_sharding_ingesters_enabled: false + shuffle_sharding_ingesters_lookback_period: 1h0m0s + query_relevant_ingesters: false +query_frontend: + max_outstanding_per_tenant: 2000 + max_batch_size: 5 + log_query_request_headers: "" + max_retries: 2 + search: + concurrent_jobs: 1000 + target_bytes_per_job: 104857600 + default_result_limit: 20 + max_result_limit: 0 + max_duration: 168h0m0s + query_backend_after: 15m0s + query_ingesters_until: 30m0s + ingester_shards: 3 + max_spans_per_span_set: 100 + trace_by_id: + query_shards: 50 + metrics: + concurrent_jobs: 1000 + target_bytes_per_job: 104857600 + max_duration: 3h0m0s + query_backend_after: 30m0s + interval: 5m0s + max_exemplars: 100 + multi_tenant_queries_enabled: true + response_consumers: 10 + weights: + request_with_weights: true + retry_with_weights: true + max_traceql_conditions: 4 + max_regex_conditions: 1 + max_query_expression_size_bytes: 131072 +compactor: + ring: + kvstore: + store: "" + prefix: collectors/ + consul: + host: localhost:8500 + acl_token: "" + http_client_timeout: 20s + consistent_reads: false + watch_rate_limit: 1 + watch_burst_size: 1 + cas_retry_delay: 1s + etcd: + endpoints: [] + dial_timeout: 10s + max_retries: 10 + tls_enabled: false + tls_cert_path: "" + tls_key_path: "" + tls_ca_path: "" + tls_server_name: "" + tls_insecure_skip_verify: false + tls_cipher_suites: "" + tls_min_version: "" + username: "" + password: "" + multi: + primary: "" + secondary: "" + mirror_enabled: false + mirror_timeout: 2s + heartbeat_period: 5s + heartbeat_timeout: 1m0s + wait_stability_min_duration: 1m0s + wait_stability_max_duration: 5m0s + instance_id: Mac + instance_interface_names: + - eth0 + - en0 + instance_port: 0 + instance_addr: "" + enable_inet6: false + wait_active_instance_timeout: 10m0s + compaction: + v2_in_buffer_bytes: 5242880 + v2_out_buffer_bytes: 20971520 + v2_prefetch_traces_count: 1000 + compaction_window: 1h0m0s + max_compaction_objects: 6000000 + max_block_bytes: 107374182400 + block_retention: 336h0m0s + compacted_block_retention: 1h0m0s + retention_concurrency: 10 + max_time_per_tenant: 5m0s + compaction_cycle: 30s + override_ring_key: compactor +ingester: + lifecycler: + ring: + kvstore: + store: memberlist + prefix: collectors/ + consul: + host: localhost:8500 + acl_token: "" + http_client_timeout: 20s + consistent_reads: false + watch_rate_limit: 1 + watch_burst_size: 1 + cas_retry_delay: 1s + etcd: + endpoints: [] + dial_timeout: 10s + max_retries: 10 + tls_enabled: false + tls_cert_path: "" + tls_key_path: "" + tls_ca_path: "" + tls_server_name: "" + tls_insecure_skip_verify: false + tls_cipher_suites: "" + tls_min_version: "" + username: "" + password: "" + multi: + primary: "" + secondary: "" + mirror_enabled: false + mirror_timeout: 2s + heartbeat_timeout: 5m0s + replication_factor: 1 + zone_awareness_enabled: false + excluded_zones: "" + num_tokens: 128 + heartbeat_period: 5s + heartbeat_timeout: 1m0s + observe_period: 0s + join_after: 0s + min_ready_duration: 15s + interface_names: + - en0 + enable_inet6: false + final_sleep: 0s + tokens_file_path: "" + availability_zone: "" + unregister_on_shutdown: true + readiness_check_ring_health: true + address: "" + port: 0 + id: Mac + concurrent_flushes: 4 + flush_check_period: 10s + flush_op_timeout: 5m0s + trace_idle_period: 10s + max_block_duration: 30m0s + max_block_bytes: 524288000 + complete_block_timeout: 15m0s + override_ring_key: ring + flush_all_on_shutdown: false +metrics_generator: + ring: + kvstore: + store: memberlist + prefix: collectors/ + consul: + host: localhost:8500 + acl_token: "" + http_client_timeout: 20s + consistent_reads: false + watch_rate_limit: 1 + watch_burst_size: 1 + cas_retry_delay: 1s + etcd: + endpoints: [] + dial_timeout: 10s + max_retries: 10 + tls_enabled: false + tls_cert_path: "" + tls_key_path: "" + tls_ca_path: "" + tls_server_name: "" + tls_insecure_skip_verify: false + tls_cipher_suites: "" + tls_min_version: "" + username: "" + password: "" + multi: + primary: "" + secondary: "" + mirror_enabled: false + mirror_timeout: 2s + heartbeat_period: 5s + heartbeat_timeout: 1m0s + instance_id: Mac + instance_interface_names: + - eth0 + - en0 + instance_addr: "" + instance_port: 0 + enable_inet6: false + processor: + service_graphs: + wait: 10s + max_items: 10000 + workers: 10 + histogram_buckets: + - 0.1 + - 0.2 + - 0.4 + - 0.8 + - 1.6 + - 3.2 + - 6.4 + - 12.8 + dimensions: [] + enable_client_server_prefix: false + enable_messaging_system_latency_histogram: false + peer_attributes: + - peer.service + - db.name + - db.system + span_multiplier_key: "" + enable_virtual_node_label: false + span_metrics: + histogram_buckets: + - 0.002 + - 0.004 + - 0.008 + - 0.016 + - 0.032 + - 0.064 + - 0.128 + - 0.256 + - 0.512 + - 1.024 + - 2.048 + - 4.096 + - 8.192 + - 16.384 + intrinsic_dimensions: + service: true + span_name: true + span_kind: true + status_code: true + dimensions: [] + dimension_mappings: [] + enable_target_info: false + span_multiplier_key: "" + subprocessors: + 0: true + 1: true + 2: true + filter_policies: [] + target_info_excluded_dimensions: [] + local_blocks: + block: + bloom_filter_false_positive: 0.01 + bloom_filter_shard_size_bytes: 102400 + version: vParquet4 + search_encoding: snappy + search_page_size_bytes: 1048576 + v2_index_downsample_bytes: 1048576 + v2_index_page_size_bytes: 256000 + v2_encoding: zstd + parquet_row_group_size_bytes: 100000000 + parquet_dedicated_columns: [] + search: + chunk_size_bytes: 1000000 + prefetch_trace_count: 1000 + read_buffer_count: 32 + read_buffer_size_bytes: 1048576 + cache_control: + footer: false + column_index: false + offset_index: false + flush_check_period: 10s + trace_idle_period: 10s + max_block_duration: 1m0s + max_block_bytes: 500000000 + complete_block_timeout: 1h0m0s + max_live_traces: 0 + filter_server_spans: true + flush_to_storage: false + concurrent_blocks: 10 + time_overlap_cutoff: 0.2 + registry: + collection_interval: 15s + stale_duration: 15m0s + max_label_name_length: 1024 + max_label_value_length: 2048 + storage: + path: "" + wal: + wal_segment_size: 134217728 + wal_compression: none + stripe_size: 16384 + truncate_frequency: 2h0m0s + min_wal_time: 300000 + max_wal_time: 14400000 + no_lockfile: false + remote_write_flush_deadline: 1m0s + remote_write_add_org_id_header: true + traces_storage: + path: "" + v2_encoding: none + search_encoding: none + ingestion_time_range_slack: 2m0s + version: vParquet4 + metrics_ingestion_time_range_slack: 30s + query_timeout: 30s + override_ring_key: metrics-generator +storage: + trace: + pool: + max_workers: 400 + queue_depth: 20000 + wal: + path: /var/tempo/wal + v2_encoding: snappy + search_encoding: none + ingestion_time_range_slack: 2m0s + block: + bloom_filter_false_positive: 0.01 + bloom_filter_shard_size_bytes: 102400 + version: vParquet4 + search_encoding: snappy + search_page_size_bytes: 1048576 + v2_index_downsample_bytes: 1048576 + v2_index_page_size_bytes: 256000 + v2_encoding: zstd + parquet_row_group_size_bytes: 100000000 + parquet_dedicated_columns: [] + search: + chunk_size_bytes: 1000000 + prefetch_trace_count: 1000 + read_buffer_count: 32 + read_buffer_size_bytes: 1048576 + cache_control: + footer: false + column_index: false + offset_index: false + blocklist_poll: 5m0s + blocklist_poll_concurrency: 50 + blocklist_poll_tenant_concurrency: 0 + blocklist_poll_fallback: true + blocklist_poll_tenant_index_builders: 2 + blocklist_poll_stale_tenant_index: 0s + blocklist_poll_jitter_ms: 0 + blocklist_poll_tolerate_consecutive_errors: 1 + blocklist_poll_tolerate_tenant_failures: 1 + empty_tenant_deletion_enabled: false + empty_tenant_deletion_age: 0s + backend: "" + local: + path: "" + gcs: + bucket_name: "" + prefix: "" + chunk_buffer_size: 10485760 + endpoint: "" + hedge_requests_at: 0s + hedge_requests_up_to: 2 + insecure: false + object_cache_control: "" + object_metadata: {} + list_blocks_concurrency: 3 + s3: + tls_cert_path: "" + tls_key_path: "" + tls_ca_path: "" + tls_server_name: "" + tls_insecure_skip_verify: false + tls_cipher_suites: "" + tls_min_version: VersionTLS12 + bucket: "" + prefix: "" + endpoint: "" + region: "" + access_key: "" + secret_key: "" + session_token: "" + insecure: false + part_size: 0 + hedge_requests_at: 0s + hedge_requests_up_to: 2 + signature_v2: false + forcepathstyle: false + enable_dual_stack: false + bucket_lookup_type: 0 + tags: {} + storage_class: "" + metadata: {} + native_aws_auth_enabled: false + list_blocks_concurrency: 3 + azure: + storage_account_name: "" + storage_account_key: "" + use_managed_identity: false + use_federated_token: false + user_assigned_id: "" + container_name: "" + prefix: "" + endpoint_suffix: blob.core.windows.net + max_buffers: 4 + buffer_size: 3145728 + hedge_requests_at: 0s + hedge_requests_up_to: 2 + cache: "" + background_cache: + writeback_goroutines: 10 + writeback_buffer: 10000 + memcached: null + redis: null + cache_min_compaction_level: 0 + cache_max_block_age: 0s +overrides: + defaults: + ingestion: + rate_strategy: local + rate_limit_bytes: 15000000 + burst_size_bytes: 20000000 + max_traces_per_user: 10000 + read: + max_bytes_per_tag_values_query: 1000000 + metrics_generator: + generate_native_histograms: classic + ingestion_time_range_slack: 0s + global: + max_bytes_per_trace: 5000000 + per_tenant_override_config: "" + per_tenant_override_period: 10s + user_configurable_overrides: + enabled: false + poll_interval: 1m0s + client: + backend: "" + confirm_versioning: true + local: + path: "" + gcs: + bucket_name: "" + prefix: "" + chunk_buffer_size: 10485760 + endpoint: "" + hedge_requests_at: 0s + hedge_requests_up_to: 2 + insecure: false + object_cache_control: "" + object_metadata: {} + list_blocks_concurrency: 3 + s3: + tls_cert_path: "" + tls_key_path: "" + tls_ca_path: "" + tls_server_name: "" + tls_insecure_skip_verify: false + tls_cipher_suites: "" + tls_min_version: VersionTLS12 + bucket: "" + prefix: "" + endpoint: "" + region: "" + access_key: "" + secret_key: "" + session_token: "" + insecure: false + part_size: 0 + hedge_requests_at: 0s + hedge_requests_up_to: 2 + signature_v2: false + forcepathstyle: false + enable_dual_stack: false + bucket_lookup_type: 0 + tags: {} + storage_class: "" + metadata: {} + native_aws_auth_enabled: false + list_blocks_concurrency: 3 + azure: + storage_account_name: "" + storage_account_key: "" + use_managed_identity: false + use_federated_token: false + user_assigned_id: "" + container_name: "" + prefix: "" + endpoint_suffix: blob.core.windows.net + max_buffers: 4 + buffer_size: 3145728 + hedge_requests_at: 0s + hedge_requests_up_to: 2 + api: + check_for_conflicting_runtime_overrides: false +memberlist: + node_name: "" + randomize_node_name: true + stream_timeout: 2s + retransmit_factor: 2 + pull_push_interval: 30s + gossip_interval: 1s + gossip_nodes: 2 + gossip_to_dead_nodes_time: 30s + dead_node_reclaim_time: 0s + compression_enabled: false + notify_interval: 0s + advertise_addr: "" + advertise_port: 7946 + cluster_label: "" + cluster_label_verification_disabled: false + join_members: [] + min_join_backoff: 1s + max_join_backoff: 1m0s + max_join_retries: 10 + abort_if_cluster_join_fails: false + rejoin_interval: 0s + left_ingesters_timeout: 5m0s + leave_timeout: 20s + broadcast_timeout_for_local_updates_on_shutdown: 10s + message_history_buffer_bytes: 0 + bind_addr: [] + bind_port: 7946 + packet_dial_timeout: 2s + packet_write_timeout: 5s + max_concurrent_writes: 3 + acquire_writer_timeout: 250ms + tls_enabled: false + tls_cert_path: "" + tls_key_path: "" + tls_ca_path: "" + tls_server_name: "" + tls_insecure_skip_verify: false + tls_cipher_suites: "" + tls_min_version: "" +usage_report: + reporting_enabled: true + backoff: + min_period: 100ms + max_period: 10s + max_retries: 0 +cache: + background: + writeback_goroutines: 10 + writeback_buffer: 10000 + caches: [] diff --git a/pkg/docsgen/generate_manifest.go b/pkg/docsgen/generate_manifest.go new file mode 100644 index 000000000000..b10faf29bc22 --- /dev/null +++ b/pkg/docsgen/generate_manifest.go @@ -0,0 +1,62 @@ +package main + +import ( + "fmt" + "log" + "os" + "os/exec" + + "github.com/grafana/tempo/cmd/tempo/app" + "gopkg.in/yaml.v3" +) + +const ManifestPath = "docs/sources/tempo/configuration/manifest.md" + +const Cmd = "go run pkg/docsgen/generate_manifest.go" + +var Manifest = fmt.Sprintf(`--- +title: Manifest +description: This manifest lists of all Tempo options and their defaults. +weight: 110 +--- +[//]: # THIS FILE IS GENERATED AUTOMATICALLY BY '%s' +[//]: # DO NOT EDIT THIS FILE DIRECTLY' + +# Manifest + +This document is a reference for all Tempo options and their defaults. If you are just getting +started with Tempo, refer to [Tempo examples](https://github.com/grafana/tempo/tree/main/example/docker-compose) +and other [configuration documentation]({{< relref "../configuration" >}}). Most installations will require only setting 10 to 20 of these options. + +## Complete configurationd + +`, Cmd) + +func main() { + newConfig := app.NewDefaultConfig() + // Override values that depend on the host specifics + newConfig.Distributor.DistributorRing.InstanceID = "instance_id" + newConfig.Compactor.ShardingRing.InstanceID = "instance_id" + newConfig.Ingester.LifecyclerConfig.ID = "instance_id" + newConfig.Ingester.LifecyclerConfig.InfNames = []string{"eth0"} + newConfig.Generator.Ring.InstanceID = "instance_id" + + newConfigBytes, err := yaml.Marshal(newConfig) + if err != nil { + panic(err) + } + newManifest := Manifest + "```yaml\n" + string(newConfigBytes) + "```\n" + + err = os.WriteFile(ManifestPath, []byte(newManifest), 0o644) + if err != nil { + panic(err) + } + + cmd := exec.Command("git", "diff", "--exit-code", ManifestPath) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + err = cmd.Run() + if err != nil { + log.Fatalf("The manifest with the default Tempo configuration has changed. Please run '%s' and commit the changes.", Cmd) + } +}