[SA HW3] OTLP with TLS 問題

26 views
Skip to first unread message

張庭嫣

unread,
Dec 30, 2025, 12:55:45 AM (9 days ago) 12/30/25
to NYCU NASA 課程討論區
助教不好意思打擾:

目前這個task我是使用fluentbit來實作,但多次卡在attributes不吻合

2025-12-30 13:20:17 [INFO] Checking if OTLP mTLS logs contain all required attributes... 2025-12-30 13:20:17 [FAIL] Could not find OTLP mTLS log with all required attributes (sa.uri, sa.host, sa.method, sa.user_agent, sa.status).

經過一些檢查,我應該有遵循spec的格式(這是fluent-bit  log):
fluent-bit  | {"date":1767072013.214322,"sa.host":"hello.313832007.cs.nycu","log_message":"caddy access log","sa.method":"GET","sa.status":200,"sa.uri":"/otlp-mtls-test-XSePwwnf","sa.user_agent":"sa-probe/PXhiJWB2"}
fluent-bit  | {"date":1767072015.426744,"sa.host":"hello.313832007.cs.nycu","log_message":"caddy access log","sa.method":"GET","sa.status":200,"sa.uri":"/otlp-mtls-test-XSePwwnf","sa.user_agent":"sa-probe/PXhiJWB2"}
fluent-bit  | {"date":1767072017.601342,"sa.host":"hello.313832007.cs.nycu","log_message":"caddy access log","sa.method":"GET","sa.status":200,"sa.uri":"/otlp-mtls-test-XSePwwnf","sa.user_agent":"sa-probe/PXhiJWB2"}

我也有試著自架otlp collector 去接收:
otel-collector-1  | 2025-12-30T04:51:08.007Z info ResourceLog #0
otel-collector-1  | Resource SchemaURL:
otel-collector-1  | ScopeLogs #0
otel-collector-1  | ScopeLogs SchemaURL:
otel-collector-1  | InstrumentationScope
otel-collector-1  | LogRecord #0
otel-collector-1  | ObservedTimestamp: 1970-01-01 00:00:00 +0000 UTC
otel-collector-1  | Timestamp: 2025-12-30 04:51:07.144634171 +0000 UTC
otel-collector-1  | SeverityText:
otel-collector-1  | SeverityNumber: Unspecified(0)
otel-collector-1  | Body: Str(uurl access log)
otel-collector-1  | Attributes:
otel-collector-1  |      -> sa.method: Str(GET)
otel-collector-1  |      -> sa.uri: Str(/test-lua-pure)
otel-collector-1  |      -> sa.host: Str(127.0.0.1:8000)
otel-collector-1  |      -> sa.user_agent: Str(curl/8.7.1)
otel-collector-1  |      -> sa.status: Int(404)
otel-collector-1  | Trace ID:
otel-collector-1  | Span ID:
otel-collector-1  | Flags: 0
otel-collector-1  |  {"resource": {"service.instance.id": "d9387c8e-b8e0-454e-ace5-bde268749c5f", "service.name": "otelcol-contrib", "service.version": "0.142.0"}, "otelcol.component.id": "debug", "otelcol.component.kind": "exporter", "otelcol.signal": "logs"}


看起來Attributes:的地方也有吃到 sa. 這些東西,想請問有其他可能忽略的地方或是檢查的機制嗎?謝謝!

張庭嫣

unread,
Dec 30, 2025, 1:08:56 AM (9 days ago) 12/30/25
to NYCU NASA 課程討論區
更新:已解決,config沒設好,感謝,抱歉打擾。

張庭嫣 在 2025年12月30日 星期二下午1:55:45 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages