Closed
Description
Component(s)
No response
What happened?
Description
Before using azureauth
, communication with Azure service failed with HTTP 401.
After using azureauth
, exporter failed with error missing \"host\" header
.
Steps to Reproduce
Add azureauth
to any exporter which supports HTTP
. The endpoint doesn't matter because the failure happens before actual handshake happens.
Expected Result
HTTP 200.
Actual Result
The invocation to client.Do
of exporter failed with missing \"host\" header
.
Collector version
0.123
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
receivers:
filelog:
include:
- /home/user/test.log
exporters:
otlphttp:
endpoint: "https://localhost:4317"
auth:
authenticator: azureauth
extensions:
azureauth:
# add your own credential
service:
extensions: [azureauth]
pipelines:
logs:
receivers: [filelog]
exporters: [otlphttp]
Log output
2025-05-14T09:29:51.008+0800 info fileconsumer/file.go:267 Started watching file {"resource": {}, "otelcol.component.id": "filelog", "otelcol.component.kind": "receiver", "otelcol.signal": "logs", "component": "fileconsumer", "path": "/home/user/test.log"}
2025-05-14T09:29:59.108+0800 info internal/retry_sender.go:133 Exporting failed. Will retry the request after interval. {"resource": {}, "otelcol.component.id": "otlphttp", "otelcol.component.kind": "exporter", "otelcol.signal": "logs", "error": "failed to make an HTTP request: Post \"https://localhost:4317/v1/logs\": missing \"host\" header", "interval": "4.895423665s"}
2025-05-14T09:30:04.004+0800 info internal/retry_sender.go:133 Exporting failed. Will retry the request after interval. {"resource": {}, "otelcol.component.id": "otlphttp", "otelcol.component.kind": "exporter", "otelcol.signal": "logs", "error": "failed to make an HTTP request: Post \"https://localhost:4317/v1/logs\": missing \"host\" header", "interval": "5.377876923s"}
Additional context
No response