Skip to content

Conversation

yaauie
Copy link
Contributor

@yaauie yaauie commented Apr 11, 2022

This solves the issue where a pipeline is started with pipeline.ecs_compatibility set to a value other than the global value for that setting, and the additional_codecs instantiated by this plugin do not respect the pipeline setting.

It does so by reaching into Logstash internals IFF the necessary ::LogStash::Plugins::Contextualizer is present.

In the long-run, I would prefer to provide a plugin factory from Logstash core (see: logstash-plugins/logstash-mixin-plugin_factory_support#1), but this solves the immediate need for this particular plugin.

Copy link
Member

@jsvd jsvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good catch! LGTM, with a very tiny cosmetic suggestion.

too complex to be a guard clause.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
@yaauie yaauie merged commit 0e37a1c into logstash-plugins:main Apr 12, 2022
yaauie added a commit to yaauie/logstash-input-http that referenced this pull request Apr 12, 2022
…ogstash-plugins#152)

* ensure execution_context is propagated to additional_codecs

* more closely specify the desired behaviour for pipeline.ecs_compatibility

* version bump

* restructure conditional

too complex to be a guard clause.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
@yaauie yaauie deleted the codec-context branch April 12, 2022 15:37
@yaauie yaauie mentioned this pull request Apr 12, 2022
edefaria pushed a commit to edefaria/logstash-input-http that referenced this pull request Sep 15, 2025
Merge in THOT/logstash-input-http from dev-edefaria to prod

* commit '476e106429ff76ad4fa6a55a1fba15c182d815cf':
  Doc: Update deprecation notices to standard (logstash-plugins#154)
  Feat: review and deprecate ssl protocol/cipher settings (logstash-plugins#151)
  Codec pipeline context (logstash-plugins#153)
  ensure execution_context is propagated to additional_codecs (logstash-plugins#152)
  Doc: Clarify description and make minor grammar fixes (logstash-plugins#150)
  Feat: TLSv1.3 support (logstash-plugins#146)
  Build: do not package log4j-api dependency (logstash-plugins#149)
  Update log4j version to 2.17.0 (logstash-plugins#148)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants