Debian Codegraph @

config/confighttp/testdata/config.yaml

raw
1 # Comprehensive HTTP configuration example showing all available options
2 # with middleware configurations (using the new "middlewares" field)
3
4 # HTTP Client Configuration
5 client:
6 # The target URL to send data to
7 endpoint: "http://example.com:4318/v1/traces"
8
9 # Proxy URL setting for the collector
10 proxy_url: "http://proxy.example.com:8080"
11
12 # TLS configuration
13 tls:
14 insecure: false
15 cert_file: "/path/to/client.crt"
16 key_file: "/path/to/client.key"
17 ca_file: "/path/to/ca.crt"
18 server_name_override: "example.com"
19 insecure_skip_verify: false
20
21 # HTTP client buffer sizes
22 read_buffer_size: 4096
23 write_buffer_size: 4096
24
25 # Request timeout
26 timeout: 30s
27
28 # Custom headers
29 headers:
30 "User-Agent": "OpenTelemetry-Collector/1.0"
31 "X-Custom-Header": "custom-value"
32
33 # Compression setting
34 compression: "gzip"
35
36 # Disable HTTP/2
37 disable_keep_alives: false
38 http2_read_idle_timeout: 10s
39 http2_ping_timeout: 15s
40
41 # Maximum idle connections
42 max_idle_conns: 100
43 max_idle_conns_per_host: 10
44 max_conns_per_host: 50
45 idle_conn_timeout: 90s
46
47 # Authentication configuration
48 auth:
49 authenticator: "oauth2client"
50
51 # Cookies configuration
52 cookies:
53 enabled: true
54
55 # Middlewares configuration (note: plural "middlewares")
56 middlewares:
57 - id: "middleware1"
58 - id: "middleware2"
59
60 # HTTP Server Configuration
61 server:
62 # Network endpoint configuration
63 endpoint: "0.0.0.0:4318"
64
65 # TLS configuration
66 tls:
67 cert_file: "/path/to/server.crt"
68 key_file: "/path/to/server.key"
69 ca_file: "/path/to/ca.crt"
70 client_ca_file: "/path/to/client-ca.crt"
71 reload_interval: 24h
72
73 # CORS configuration
74 cors:
75 allowed_origins:
76 - "https://example.com"
77 - "https://*.test.com"
78 allowed_headers:
79 - "Content-Type"
80 - "Accept"
81 max_age: 7200
82
83 # Authentication configuration
84 auth:
85 authenticator: "basic"
86
87 # Server timeouts
88 read_timeout: 30s
89 read_header_timeout: 10s
90 write_timeout: 30s
91 idle_timeout: 120s
92
93 # HTTP keep-alives configuration
94 keep_alives_enabled: true
95
96 # Maximum request size
97 max_request_body_size: 33554432 # 32MB
98
99 # Include metadata in the context
100 include_metadata: true
101
102 # Response headers to add to every response
103 response_headers:
104 "Server": "OpenTelemetry-Collector"
105 "X-Flavor": "apple"
106
107 # Compression algorithms supported by the server
108 compression_algorithms: ["", "gzip", "zstd", "zlib", "snappy", "deflate"]
109
110 # Middlewares configuration (note: plural "middlewares")
111 middlewares:
112 - id: "server_middleware1"
113 - id: "server_middleware2"
114 - id: "server_middleware3"