@@ -25,7 +25,7 @@ static_resources:
25
25
envoy_grpc :
26
26
cluster_name : opentelemetry_collector_grpc
27
27
timeout : 0.250s
28
- service_name : frontend-proxy
28
+ service_name : ${OTEL_SERVICE_NAME}
29
29
resource_detectors :
30
30
- name : envoy.tracers.opentelemetry.resource_detectors.environment
31
31
typed_config :
@@ -65,6 +65,98 @@ static_resources:
65
65
- name : envoy.filters.http.router
66
66
typed_config :
67
67
" @type " : type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
68
+ access_log :
69
+ - name : envoy.access_loggers.open_telemetry
70
+ typed_config :
71
+ " @type " : " type.googleapis.com/envoy.extensions.access_loggers.open_telemetry.v3.OpenTelemetryAccessLogConfig"
72
+ common_config :
73
+ log_name : " otel_envoy_access_log"
74
+ grpc_service :
75
+ envoy_grpc :
76
+ cluster_name : opentelemetry_collector_grpc
77
+ transport_api_version : " V3"
78
+ body :
79
+ # yamllint disable-line rule:line-length
80
+ string_value : " [%START_TIME%] \" %REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%\" %RESPONSE_CODE% %RESPONSE_FLAGS% %RESPONSE_CODE_DETAILS% %CONNECTION_TERMINATION_DETAILS% \" %UPSTREAM_TRANSPORT_FAILURE_REASON%\" %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% \" %REQ(X-FORWARDED-FOR)%\" \" %REQ(USER-AGENT)%\" \" %REQ(X-REQUEST-ID)%\" \" %REQ(:AUTHORITY)%\" \" %UPSTREAM_HOST%\" %UPSTREAM_CLUSTER% %UPSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_REMOTE_ADDRESS% %REQUESTED_SERVER_NAME% %ROUTE_NAME%\n "
81
+ resource_attributes :
82
+ values :
83
+ - key : " service.name"
84
+ value :
85
+ string_value : ${OTEL_SERVICE_NAME}
86
+ attributes :
87
+ values :
88
+ - key : " destination.address"
89
+ value :
90
+ string_value : " %UPSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%"
91
+ - key : " event.name"
92
+ value :
93
+ string_value : " proxy.access"
94
+ - key : " http.connection.id"
95
+ value :
96
+ string_value : " %CONNECTION_ID%"
97
+ - key : " http.protocol"
98
+ value :
99
+ string_value : " %PROTOCOL%"
100
+ - key : " http.request.body.size"
101
+ value :
102
+ string_value : " %BYTES_RECEIVED%"
103
+ - key : " http.request.header.x-forwarded-for"
104
+ value :
105
+ string_value : " %REQ(X-FORWARDED-FOR)%"
106
+ - key : " http.request.header.x-request-id"
107
+ value :
108
+ string_value : " %REQ(X-REQUEST-ID)%"
109
+ - key : " http.request.headers.size"
110
+ value :
111
+ string_value : " %REQUEST_HEADERS_BYTES%"
112
+ - key : " http.request.id"
113
+ value :
114
+ string_value : " %STREAM_ID%"
115
+ - key : " http.request.method"
116
+ value :
117
+ string_value : " %REQ(:METHOD)%"
118
+ - key : " http.request.start_time"
119
+ value :
120
+ string_value : " %START_TIME%"
121
+ - key : " http.response.body.size"
122
+ value :
123
+ string_value : " %BYTES_SENT%"
124
+ - key : " http.response.headers.size"
125
+ value :
126
+ string_value : " %RESPONSE_HEADERS_BYTES%"
127
+ - key : " http.response.status_code"
128
+ value :
129
+ string_value : " %RESPONSE_CODE%"
130
+ - key : " http.total_duration_ms"
131
+ value :
132
+ string_value : " %DURATION%"
133
+ - key : " server.address"
134
+ value :
135
+ string_value : " %DOWNSTREAM_LOCAL_ADDRESS%"
136
+ - key : " source.address"
137
+ value :
138
+ string_value : " %DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%"
139
+ - key : " upstream.cluster"
140
+ value :
141
+ string_value : " %UPSTREAM_CLUSTER%"
142
+ - key : " upstream.host"
143
+ value :
144
+ string_value : " %UPSTREAM_HOST%"
145
+ - key : " user_agent.original"
146
+ value :
147
+ string_value : " %REQ(USER-AGENT)%"
148
+ - key : " url.full"
149
+ value :
150
+ string_value : " %REQ(:SCHEME)%://%REQ(:AUTHORITY)%%REQ(:PATH)%"
151
+ - key : " url.path"
152
+ value :
153
+ string_value : " %REQ(:PATH)%"
154
+ - key : " url.query"
155
+ value :
156
+ string_value : " %REQ(:QUERY)%"
157
+ - key : " url.template"
158
+ value :
159
+ string_value : " %ROUTE_NAME%"
68
160
69
161
clusters :
70
162
- name : opentelemetry_collector_grpc
0 commit comments