Repository: open-telemetry/opentelemetry-collector (Go)

Issue:
event_name field skipped when unmarshalling LogRecord from Json
### Component(s)

pdata

### What happened?

**Describe the bug**
event_name field skipped when unmarshalling LogRecord from Json

**Steps to reproduce**
`event.json`:

```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

```yaml
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

```shell

```

### Additional context

_No response_


Discussion:
Pinging code owners:
- pdata: @BogdanDrutu @dmitryax

 See [Adding Labels via Comments](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md#adding-labels-via-comments) if you do not have permissions to add labels yourself.




Patch:
diff --git a/.chloggen/ip_fix-event-name-unmarshal-json.yaml b/.chloggen/ip_fix-event-name-unmarshal-json.yaml
new file mode 100644
index 00000000000..e163cbced2c
--- /dev/null
+++ b/.chloggen/ip_fix-event-name-unmarshal-json.yaml
@@ -0,0 +1,25 @@
+# Use this changelog template to create an entry for release notes.
+
+# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
+change_type: bug_fix
+
+# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
+component: pdata
+
+# A brief description of the change.  Surround your text with quotes ("") if it needs to start with a backtick (`).
+note: Fix event_name skipped when unmarshalling LogRecord from JSON
+
+# One or more tracking issues or pull requests related to the change
+issues: [13127]
+
+# (Optional) One or more lines of additional information to render under the primary note.
+# These lines will be padded with 2 spaces and then inserted directly into the document.
+# Use pipe (|) for multiline entries.
+subtext:
+
+# Optional: The change log or logs in which this entry should be included.
+# e.g. '[user]' or '[user, api]'
+# Include 'user' if the change is relevant to end users.
+# Include 'api' if there is a change to a library API.
+# Default: '[user]'
+change_logs: [user]
diff --git a/pdata/plog/json.go b/pdata/plog/json.go
index 373985e7090..5e1cdd70d5b 100644
--- a/pdata/plog/json.go
+++ b/pdata/plog/json.go
@@ -108,6 +108,8 @@ func (ms LogRecord) unmarshalJsoniter(iter *jsoniter.Iterator) {
 			ms.orig.SeverityNumber = otlplogs.SeverityNumber(json.ReadEnumValue(iter, otlplogs.SeverityNumber_value))
 		case "severity_text", "severityText":
 			ms.orig.SeverityText = iter.ReadString()
+		case "event_name", "eventName":
+			ms.orig.EventName = iter.ReadString()
 		case "body":
 			json.ReadValue(iter, &ms.orig.Body)
 		case "attributes":


Test patch:
diff --git a/pdata/plog/json_test.go b/pdata/plog/json_test.go
index b5da86f08e9..ab24642efdf 100644
--- a/pdata/plog/json_test.go
+++ b/pdata/plog/json_test.go
@@ -44,6 +44,7 @@ var logsOTLP = func() Logs {
 	lg.SetObservedTimestamp(pcommon.Timestamp(1684623646539558000))
 	lg.Attributes().PutStr("sdkVersion", "1.0.1")
 	lg.SetFlags(DefaultLogRecordFlags.WithIsSampled(true))
+	lg.SetEventName("someEvent")
 	return ld
 }()
 
@@ -57,7 +58,7 @@ func TestLogsJSON(t *testing.T) {
 	assert.Equal(t, logsOTLP, got)
 }
 
-var logsJSON = `{"resourceLogs":[{"resource":{"attributes":[{"key":"host.name","value":{"stringValue":"testHost"}}],"droppedAttributesCount":1},"scopeLogs":[{"scope":{"name":"name","version":"version","droppedAttributesCount":1},"logRecords":[{"timeUnixNano":"1684617382541971000","observedTimeUnixNano":"1684623646539558000","severityNumber":17,"severityText":"Error","body":{"stringValue":"hello world"},"attributes":[{"key":"sdkVersion","value":{"stringValue":"1.0.1"}}],"droppedAttributesCount":1,"flags":1,"traceId":"0102030405060708090a0b0c0d0e0f10","spanId":"1112131415161718"}],"schemaUrl":"scope_schema"}],"schemaUrl":"resource_schema"}]}`
+var logsJSON = `{"resourceLogs":[{"resource":{"attributes":[{"key":"host.name","value":{"stringValue":"testHost"}}],"droppedAttributesCount":1},"scopeLogs":[{"scope":{"name":"name","version":"version","droppedAttributesCount":1},"logRecords":[{"eventName":"someEvent","timeUnixNano":"1684617382541971000","observedTimeUnixNano":"1684623646539558000","severityNumber":17,"severityText":"Error","body":{"stringValue":"hello world"},"attributes":[{"key":"sdkVersion","value":{"stringValue":"1.0.1"}}],"droppedAttributesCount":1,"flags":1,"traceId":"0102030405060708090a0b0c0d0e0f10","spanId":"1112131415161718"}],"schemaUrl":"scope_schema"}],"schemaUrl":"resource_schema"}]}`
 
 func TestJSONUnmarshal(t *testing.T) {
 	decoder := &JSONUnmarshaler{}