Skip to content

Commit f2adb1c

Browse files
Update documentation of fields
1 parent ea1e31a commit f2adb1c

File tree

5 files changed

+116
-92
lines changed

5 files changed

+116
-92
lines changed

extension/encoding/awslogsencodingextension/README.md

Lines changed: 78 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -233,54 +233,89 @@ ELB access log record fields are mapped this way in the resulting OpenTelemetry
233233

234234
##### Application Load Balancer (ALB)
235235

236-
237-
| **AWS Field** | **OpenTelemetry Field** |
238-
|-----------------------|---------------------------------------------------------------------------------------------|
239-
| Provider | `cloud.provider` |
240-
| Resource | `cloud.resource_id` |
241-
| Protocol | `network.protocol.name`<br> `network.protocol.version` |
242-
| Client IP | `client.address` |
243-
| Request Method | `http.request.method` |
244-
| Request URL | `url.full` |
245-
| Client Port | `client.port` |
246-
| Request Size | `http.request.size` |
247-
| Response Size | `http.response.size` |
248-
| ELB Status | `aws.elb.status.code` |
249-
| TLS Version | `tls.protocol.version` |
250-
| Cipher Suite | `tls.cipher` |
236+
> AWS Fields are according to [documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html).
237+
238+
239+
| **AWS Field** | **OpenTelemetry Field(s)** |
240+
|------------------------------|-----------------------------------------------------------------------|
241+
| type | `network.protocol.name` |
242+
| time | Log timestamp |
243+
| elb | `cloud.resource_id` |
244+
| client:port | `client.address`, `client.port` |
245+
| received_bytes | `http.request.size` |
246+
| sent_bytes | `http.response.size` |
247+
| "request" | `url.full`, `http.request.method`, `network.protocol.version` |
248+
| ssl_cipher | `tls.cipher` |
249+
| ssl_protocol | `tls.protocol.version` |
250+
| elb_status_code | `aws.elb.status.code` |
251+
| target:port | _Currently not supported_ |
252+
| request_processing_time | _Currently not supported_ |
253+
| target_processing_time | _Currently not supported_ |
254+
| response_processing_time | _Currently not supported_ |
255+
| target_status_code | _Currently not supported_ |
256+
| "user_agent" | _Currently not supported_ |
257+
| target_group_arn | _Currently not supported_ |
258+
| "trace_id" | _Currently not supported_ |
259+
| "domain_name" | _Currently not supported_ |
260+
| "chosen_cert_arn" | _Currently not supported_ |
261+
| matched_rule_priority | _Currently not supported_ |
262+
| request_creation_time | _Currently not supported_ |
263+
| "actions_executed" | _Currently not supported_ |
264+
| "redirect_url" | _Currently not supported_ |
265+
| "error_reason" | _Currently not supported_ |
266+
| "target:port_list" | _Currently not supported_ |
267+
| "target_status_code_list" | _Currently not supported_ |
268+
| "classification" | _Currently not supported_ |
269+
| "classification_reason" | _Currently not supported_ |
270+
| conn_trace_id | _Currently not supported_ |
251271

252272
##### Network Load Balancer (NLB)
253273

254-
255-
| **AWS Field** | **OpenTelemetry Field(s)** |
256-
|-----------------------|---------------------------------------------------------------------------------------------|
257-
| Provider | `cloud.provider` |
258-
| Resource | `cloud.resource_id` |
259-
| Protocol | `network.protocol.name`<br>`network.protocol.version` |
260-
| Client IP | `client.address` |
261-
| Client Port | `client.port` |
262-
| Request Size | `http.request.size` |
263-
| Response Size | `http.response.size` |
264-
| Listener ARN | `tls.listener.resource_id` |
265-
| TLS Version | `tls.protocol.version` |
266-
| Cipher Suite | `tls.cipher` |
267-
274+
> AWS Fields are according to [documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest//network/load-balancer-access-logs.html#access-log-entry-format).
275+
276+
| **AWS Field** | **OpenTelemetry Field(s)** |
277+
|------------------------------|-------------------------------------------------------------|
278+
| type | `network.protocol.name` |
279+
| version | `network.protocol.version` |
280+
| time | Log timestamp |
281+
| elb | `cloud.resource_id` |
282+
| listener | `aws.elb.tls.listener.resource_id` |
283+
| client:port | `client.address`, `client.port` |
284+
| received_bytes | `http.request.size` |
285+
| sent_bytes | `http.response.size` |
286+
| tls_cipher | `tls.cipher` |
287+
| tls_protocol_version | `tls.protocol.version` |
288+
| destination:port | _Currently not supported_ |
289+
| connection_time | _Currently not supported_ |
290+
| tls_handshake_time | _Currently not supported_ |
291+
| incoming_tls_alert | _Currently not supported_ |
292+
| chosen_cert_arn | _Currently not supported_ |
293+
| chosen_cert_serial | _Currently not supported_ |
294+
| tls_named_group | _Currently not supported_ |
295+
| domain_name | _Currently not supported_ |
296+
| alpn_fe_protocol | _Currently not supported_ |
297+
| alpn_be_protocol | _Currently not supported_ |
298+
| alpn_client_preference_list | _Currently not supported_ |
299+
| tls_connection_creation_time | _Currently not supported_ |
268300

269301
##### Classic Load Balancer (CLB)
270302

303+
> AWS Fields are according to [documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/access-log-collection.html)
271304

272305
| **AWS Field** | **OpenTelemetry Field(s)** |
273-
|-----------------------|---------------------------------------------------------------------------------------------|
274-
| Provider | `cloud.provider` |
275-
| Resource | `cloud.resource_id` |
276-
| Client IP | `client.address` |
277-
| Request Method | `http.request.method` |
278-
| Request URL | `url.full` |
279-
| Protocol | `network.protocol.name`<br> `network.protocol.version` |
280-
| Client Port | `client.port` |
281-
| Request Size | `http.request.size` |
282-
| Response Size | `http.response.size` |
283-
| TLS Version | `tls.protocol.version` |
284-
| Cipher Suite | `tls.cipher` |
285-
| ELB Status | `aws.elb.status.code` |
286-
| Backend Status | `aws.elb.backend.status.code` |
306+
|-----------------------|--------------------------------------------------------------------------------------------|
307+
| time | Log timestamp |
308+
| elb | `cloud.resource_id` |
309+
| client:port | `client.address`, `client.port` |
310+
| elb_status_code | `aws.elb.status.code` |
311+
| backend_status_code | `aws.elb.backend.status.code` |
312+
| received_bytes | `http.request.size` |
313+
| sent_bytes | `http.response.size` |
314+
| "request" | `url.full`, `http.request.method`, `network.protocol.name`, `network.protocol.version` |
315+
| ssl_cipher | `tls.cipher` |
316+
| ssl_protocol | `tls.protocol.version` |
317+
| backend:port | _Currently not supported_ |
318+
| request_processing_time | _Currently not supported_ |
319+
| backend_processing_time | _Currently not supported_ |
320+
| response_processing_time | _Currently not supported_ |
321+
| user_agent | _Currently not supported_ |

extension/encoding/awslogsencodingextension/internal/unmarshaler/elb-access-log/fields.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
package elbaccesslogs
55

66
const (
7-
AttributeELBStatusCode = "aws.elb.status.code" // int
8-
AttributeELBBackendStatusCode = "aws.elb.backend.status.code" // int
9-
AttributeTlsListenerResourceID = "tls.listener.resource_id" // string
7+
AttributeELBStatusCode = "aws.elb.status.code" // int
8+
AttributeELBBackendStatusCode = "aws.elb.backend.status.code" // int
9+
AttributeTlsListenerResourceID = "aws.elb.tls.listener.resource_id" // string
1010
)
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https 2018-07-02T22:23:00.186641Z app/my-loadbalancer/50dc6c495c0c9188 192.168.131.39:2817 10.0.0.1:80 0.086 0.048 0.037 200 200 0 57 "GET https://www.example.com:443/ HTTP/1.1" "curl/7.46.0" ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067"Root=1-58337281-1d84f3d73c47ec4e58577259" "www.example.com" "arn:aws:acm:us-east-2:123456789012:certificate/12345678-1234-1234-1234-123456789012"1 2018-07-02T22:22:48.364000Z "authenticate,forward" "-" "-" "10.0.0.1:80" "200" "-" "-" TID_1234abcd5678ef90
1+
https 2018-07-02T22:23:00.186641Z app/my-loadbalancer/50dc6c495c0c9188 192.168.131.39:2817 10.0.0.1:80 0.086 0.048 0.037 200 200 0 57 "GET https://www.example.com:443/ HTTP/1.1" "curl/7.46.0" ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067 "Root=1-58337281-1d84f3d73c47ec4e58577259" "www.example.com" "arn:aws:acm:us-east-2:123456789012:certificate/12345678-1234-1234-1234-123456789012" 1 2018-07-02T22:22:48.364000Z "authenticate,forward" "-" "-" "10.0.0.1:80" "200" "-" "-" TID_1234abcd5678ef90

extension/encoding/awslogsencodingextension/internal/unmarshaler/elb-access-log/testdata/nlb_al_valid_logs_expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ resourceLogs:
2828
- key: http.response.size
2929
value:
3030
intValue: "246"
31-
- key: tls.listener.resource_id
31+
- key: aws.elb.tls.listener.resource_id
3232
value:
3333
stringValue: g3d4b5e8bb8464cd
3434
- key: tls.protocol.version

0 commit comments

Comments
 (0)