Codecs defined with "options" do not show `encode` or `decode` statistics
- Dominant language
- Java
- Stars
- 14.9k
- Forks
- 3.5k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 88
Description
**Logstash information**:
`8.14.3`
**Steps to reproduce**:
Setup a pipeline, and configure a codec with options, rather than just as a "vanilla" codec:
```
input {
stdin {
codec => json { id => "json" }
}
}
```
`curl http://localhost:9601/_node/stats | jq '.pipelines.main.plugins.codecs.[0]'`
```
{
"id": "json",
"name": "json"
}
```
Defining the same config without an option
```
input {
stdin {
codec => json
}
}
```
, the stats show up as expected:
```
{
"id": "json_792305d6-0a67-4f8c-9d54-604f15c06113",
"decode": {
"duration_in_millis": 0,
"writes_in": 0,
"out": 0
},
"name": "json",
"encode": {
"duration_in_millis": 0,
"writes_in": 0
}
}
```
Contributor guide
Research direction
Start by reproducing the two codec configurations from the issue and comparing their output from the /_node/stats endpoint. Trace the codec statistics path for codecs created with options; done means both configurations expose encode and decode statistics consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100