forked from open-telemetry/opentelemetry-go-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: fix panic on nil value in headers name/value pair
Found a bug during testing of v0.3.0 support with the Collector where the value passed in to the headers name/value pair list could be nil, causing a dereferencing error. This fixes that bug. Signed-off-by: Alex Boten <[email protected]>
- Loading branch information
Showing
5 changed files
with
98 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"file_format": "0.3", | ||
"disabled": false, | ||
"logger_provider": { | ||
"processors": [ | ||
{ | ||
"batch": { | ||
"schedule_delay": 5000, | ||
"export_timeout": 30000, | ||
"max_queue_size": 2048, | ||
"max_export_batch_size": 512, | ||
"exporter": { | ||
"otlp": { | ||
"protocol": "http/protobuf", | ||
"endpoint": "http://localhost:4318/v1/logs", | ||
"certificate": "/app/cert.pem", | ||
"client_key": "/app/cert.pem", | ||
"client_certificate": "/app/cert.pem", | ||
"headers": [ | ||
{ | ||
"name": "api-key", | ||
"value": "1234" | ||
}, | ||
{ | ||
"name": "nil-value" | ||
} | ||
], | ||
"headers_list": "api-key=1234", | ||
"compression": "gzip", | ||
"timeout": 10000, | ||
"insecure": false | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"simple": { | ||
"exporter": { | ||
"console": {} | ||
} | ||
} | ||
} | ||
], | ||
"limits": { | ||
"attribute_value_length_limit": 4096, | ||
"attribute_count_limit": 128 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
file_format: "0.3" | ||
disabled: false | ||
logger_provider: | ||
processors: | ||
- batch: | ||
exporter: | ||
otlp: | ||
protocol: http/protobuf | ||
endpoint: http://localhost:4318/v1/logs | ||
headers: | ||
- name: api-key | ||
value: "1234" | ||
- name: nil-value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters