Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codecs defined with "options" do not show encode or decode statistics #16410

Open
robbavey opened this issue Aug 29, 2024 · 0 comments
Open

Codecs defined with "options" do not show encode or decode statistics #16410

robbavey opened this issue Aug 29, 2024 · 0 comments

Comments

@robbavey
Copy link
Member

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
  }
}
robbavey added a commit to robbavey/integrations that referenced this issue Aug 29, 2024
Due to a bug in Logstash (elastic/logstash#16410),
when configuring a codec with optional settings, the stats do not get generated,
causing the data collection for codecs, and thus plugins to fail.

This commit adds a guard to the retrieval of `encode` and `decode` to ensure
that the CEL input does not fail when encountering this issue
robbavey added a commit to robbavey/integrations that referenced this issue Aug 29, 2024
Due to a bug in Logstash (elastic/logstash#16410),
when configuring a codec with optional settings, the stats do not get generated,
causing the data collection for codecs, and thus plugins to fail.

This commit adds a guard to the retrieval of `encode` and `decode` to ensure
that the CEL input does not fail when encountering this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant