MOON
Server: Apache
System: Linux vps.erhabenn.com.br 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User: sonne (1011)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //opt/microsoft/omsagent/plugin/filter_operation.rb
# Copyright (c) Microsoft Corporation.  All rights reserved.
module Fluent
  class OperationFilter < Filter

    Plugin.register_filter('filter_operation', self)

    require_relative 'operation_lib'

    def start
      super
      @operation_lib = OperationModule::Operation.new(OperationModule::RuntimeError.new)
    end
			
    def filter(tag, time, record)
      records = @operation_lib.filter_and_wrap(tag, record, time)
      # only return non empty records
      if !records.empty?
        return records
      end
    end

  end
end