Closed
Description
Component(s)
pdata
What happened?
Describe the bug
event_name field skipped when unmarshalling LogRecord from Json
Steps to reproduce
event.json
:
{
"resourceLogs": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": {
"stringValue": "my.service"
}
}
]
},
"scopeLogs": [
{
"scope": {
"name": "my.library",
"version": "1.0.0",
"attributes": [
{
"key": "my.scope.attribute",
"value": {
"stringValue": "some scope attribute"
}
}
]
},
"logRecords": [
{
"eventName": "browser.page_view",
"timeUnixNano": "1544712660300000000",
"observedTimeUnixNano": "1544712660300000000",
"severityNumber": 9,
"severityText": "test severity text",
"attributes": [
{
"key": "event.attribute",
"value": {
"stringValue": "some event attribute"
}
}
],
"body": {
"kvlistValue": {
"values": [
{
"key": "type",
"value": {
"intValue": "0"
}
},
{
"key": "url",
"value": {
"stringValue": "https://www.guidgenerator.com/online-guid-generator.aspx"
}
},
{
"key": "referrer",
"value": {
"stringValue": "https://wwww.google.com"
}
},
{
"key": "title",
"value": {
"stringValue": "Free Online GUID Generator"
}
}
]
}
}
}
]
}
]
}
]
}
finally run:
$ curl -X POST -H "Content-Type: application/json" -d @events.json -i localhost:4318/v1/logs
What did you expect to see?
Event name included in the debug output
What did you see instead?
Event name is missing
Collector version
v0.127.0
Environment information
Environment
OS: macOS 14.0
Compiler(if manually compiled): go1.24.3 darwin/arm64
OpenTelemetry Collector configuration
extensions:
zpages:
endpoint: localhost:55679
receivers:
otlp:
protocols:
grpc:
endpoint: localhost:4317
http:
endpoint: localhost:4318
processors:
batch:
memory_limiter:
# 75% of maximum memory up to 2G
limit_mib: 1536
# 25% of limit up to 2G
spike_limit_mib: 512
check_interval: 5s
exporters:
debug:
verbosity: detailed
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [debug]
metrics:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [debug]
logs:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [debug]
extensions: [zpages]
Log output
Additional context
No response