class LogStash::Outputs::Application_insights


Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.



Logstash Output Application Insights

Copyright © Microsoft Corporation

All rights reserved.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.


Constants

AZURE_STORAGE_BLOB_LOGSTASH_PREFIX
AZURE_STORAGE_CONTAINER_LOGSTASH_PREFIX
AZURE_STORAGE_NOTIFIED_BLOBS_TABLE_NAME
AZURE_STORAGE_ORPHAN_BLOBS_CONTAINER_NAME
AZURE_STORAGE_TABLE_LOGSTASH_PREFIX
BASE_DATA_REQUIRED_VERSION
BLOB_BLOCK_MAX_BYTESIZE
BLOB_MAX_BLOCKS
BOOLEAN_PROPERTIES
CHANNEL_THRESHOLD_TO_ADD_UPLOAD_PIPE
COLUMN_PROPERTY_DEFAULT
COLUMN_PROPERTY_NAME
COLUMN_PROPERTY_TYPE
DATA_BASE_TYPE
DEFAULT_APPLICATION_INSIGHTS_ENDPOINT
DEFAULT_AZURE_STORAGE_BLOB_PREFIX
DEFAULT_AZURE_STORAGE_CONTAINER_PREFIX
DEFAULT_AZURE_STORAGE_HOST_SUFFIX
DEFAULT_AZURE_STORAGE_TABLE_PREFIX
DEFAULT_BLOB_ACCESS_EXPIRY_TIME
DEFAULT_BLOB_MAX_BYTESIZE
DEFAULT_BLOB_MAX_DELAY
DEFAULT_BLOB_MAX_EVENTS
DEFAULT_BLOB_RETENTION_TIME
DEFAULT_BLOB_SERIALIZATION
DEFAULT_CASE_INSENSITIVE
DEFAULT_CSV_DEFAULT_VALUE
DEFAULT_CSV_SEPARATOR
DEFAULT_DELETE_NOT_NOTIFIED_BLOBS
DEFAULT_DISABLE_BLOB_UPLOAD
DEFAULT_DISABLE_CLEANUP
DEFAULT_DISABLE_COMPRESSION
DEFAULT_DISABLE_NOTIFICATION
DEFAULT_DISABLE_TRUNCATION
DEFAULT_ENABLE_TELEMETRY_TO_MICROSOFT
DEFAULT_EVENT_SEPARATOR
DEFAULT_FLOW_CONTROL_DELAY
DEFAULT_FLOW_CONTROL_RESUME_BYTES
DEFAULT_FLOW_CONTROL_SUSPEND_BYTES
DEFAULT_INSTRUMENTATION_KEY
DEFAULT_IO_MAX_RETRIES
DEFAULT_IO_RETRY_DELAY
DEFAULT_LOGGER_FILES
DEFAULT_LOGGER_PROGNAME
DEFAULT_LOGGER_SHIFT_AGE
DEFAULT_LOGGER_SHIFT_SIZE
DEFAULT_LOG_LEVEL
DEFAULT_NOTIFICATION_VERSION
DEFAULT_SAVE_NOTIFIED_BLOBS_RECORDS
DEFAULT_STOP_ON_UNKNOWN_IO_ERRORS
DEFAULT_STORAGE_RESURRECT_DELAY
DEFAULT_TABLE_ID
DEFAULT_VALIDATE_NOTIFICATION
DEFAULT_VALIDATE_STORAGE
EXT_EVENT_FORMAT_CSV
EXT_EVENT_FORMAT_JSON
FIELD_INSTRUMENTATION_KEY
FIELD_TABLE_ID
GUID_NULL
INSTRUMENTATION_KEY_TEMPLATE
LOCAL_FS_FILE_PREFIX
LOGGER_LEVEL_MAP

logger constants

MAX_BLOB_ACCESS_EXPIRY_TIME
MAX_BLOB_MAX_BYTESIZE
MAX_BLOB_MAX_DELAY
MAX_BLOB_MAX_EVENTS
MAX_BLOB_RETENTION_TIME
MAX_CHANNEL_UPLOAD_PIPES
MAX_FIELD_BYTES
MAX_FLOW_CONTROL_DELAY
MAX_FLOW_CONTROL_RESUME_BYTES
MAX_FLOW_CONTROL_SUSPEND_BYTES
MAX_IO_MAX_RETRIES
MAX_IO_RETRY_DELAY
MAX_LOGGER_SHIFT_AGE
MAX_LOGGER_SHIFT_SIZE
MAX_STORAGE_RESURRECT_DELAY
METADATA_FIELD_INSTRUMENTATION_KEY
METADATA_FIELD_TABLE_ID
MIN_BLOB_ACCESS_EXPIRY_TIME
MIN_BLOB_MAX_BYTESIZE
MIN_BLOB_MAX_DELAY
MIN_BLOB_MAX_EVENTS
MIN_BLOB_RETENTION_TIME
MIN_FLOW_CONTROL_DELAY
MIN_FLOW_CONTROL_RESUME_BYTES
MIN_FLOW_CONTROL_SUSPEND_BYTES
MIN_IO_MAX_RETRIES
MIN_IO_RETRY_DELAY
MIN_LOGGER_SHIFT_AGE
MIN_LOGGER_SHIFT_SIZE
MIN_STORAGE_RESURRECT_DELAY
REQUEST_NAME

notification payload constants

STATE_TABLE_NAME
STORAGE_TEST_CONTAINER_NAME
STORAGE_TEST_TABLE_NAME
TABLE_ID_TEMPLATE
VALID_EXT_EVENT_FORMAT
VALID_FIELDS_MAP_TYPES
VALID_LOGGER_SHIFT_AGES

Public Instance Methods

close() click to toggle source
# File lib/logstash/outputs/application_insights.rb, line 384
def close
  @telemetry.track_event { { :name => "close" } }
  @telemetry.flush
  @shutdown_recovery.close
  @storage_recovery.close
  @notification_recovery.close
  @shutdown.submit
end
default_configuration() click to toggle source
# File lib/logstash/outputs/application_insights/constants.rb, line 24
def default_configuration
  {
    :notification_version => @notification_version || DEFAULT_NOTIFICATION_VERSION,
    :event_separator => @event_separator || DEFAULT_EVENT_SEPARATOR,

    :azure_storage_host_suffix => @azure_storage_host_suffix || DEFAULT_AZURE_STORAGE_HOST_SUFFIX, 
    :application_insights_endpoint => @application_insights_endpoint || DEFAULT_APPLICATION_INSIGHTS_ENDPOINT,
    :azure_storage_blob_prefix => @azure_storage_blob_prefix || DEFAULT_AZURE_STORAGE_BLOB_PREFIX || Utils.to_storage_name( Socket.gethostname.strip ) || "",
    :azure_storage_container_prefix => @azure_storage_container_prefix || DEFAULT_AZURE_STORAGE_CONTAINER_PREFIX || Utils.to_storage_name( Socket.gethostname.strip ) || "",
    :azure_storage_table_prefix => @azure_storage_table_prefix || DEFAULT_AZURE_STORAGE_TABLE_PREFIX || Utils.to_storage_name( Socket.gethostname.strip ) || "",
    :storage_account_name_key => @storage_account_name_key || [  ],
    :disable_notification => @disable_notification || DEFAULT_DISABLE_NOTIFICATION,
    :disable_blob_upload => @disable_blob_upload || DEFAULT_DISABLE_BLOB_UPLOAD,
    :stop_on_unknown_io_errors => @stop_on_unknown_io_errors || DEFAULT_STOP_ON_UNKNOWN_IO_ERRORS,
    :delete_not_notified_blobs => @delete_not_notified_blobs || DEFAULT_DELETE_NOT_NOTIFIED_BLOBS,
    :save_notified_blobs_records => @save_notified_blobs_records || DEFAULT_SAVE_NOTIFIED_BLOBS_RECORDS,
    :enable_telemetry_to_microsoft => @enable_telemetry_to_microsoft || DEFAULT_ENABLE_TELEMETRY_TO_MICROSOFT,
    :disable_cleanup => @disable_cleanup || DEFAULT_DISABLE_CLEANUP,
    :blob_max_bytesize => @blob_max_bytesize || DEFAULT_BLOB_MAX_BYTESIZE,
    :blob_max_events => @blob_max_events || DEFAULT_BLOB_MAX_EVENTS,
    :blob_retention_time => @blob_retention_time || DEFAULT_BLOB_RETENTION_TIME,
    :blob_access_expiry_time => @blob_access_expiry_time || DEFAULT_BLOB_ACCESS_EXPIRY_TIME,

    :validate_notification => @validate_notification || DEFAULT_VALIDATE_NOTIFICATION,
    :validate_storage => @validate_storage || DEFAULT_VALIDATE_STORAGE,

    :resurrect_delay => @resurrect_delay || DEFAULT_STORAGE_RESURRECT_DELAY,
    :io_retry_delay => @io_retry_delay || DEFAULT_IO_RETRY_DELAY,
    :io_max_retries => @io_max_retries || DEFAULT_IO_MAX_RETRIES,

    :logger_level => @logger_level || DEFAULT_LOG_LEVEL,
    :logger_files => @logger_files || DEFAULT_LOGGER_FILES,
    :logger_progname => @logger_progname || DEFAULT_LOGGER_PROGNAME,
    :logger_shift_size => @logger_shift_size || DEFAULT_LOGGER_SHIFT_SIZE,
    :logger_shift_age => @logger_shift_age || DEFAULT_LOGGER_SHIFT_AGE,

    :flow_control_suspend_bytes => @flow_control_suspend_bytes || DEFAULT_FLOW_CONTROL_SUSPEND_BYTES,
    :flow_control_resume_bytes => @flow_control_resume_bytes || DEFAULT_FLOW_CONTROL_RESUME_BYTES,
    :flow_control_delay => @flow_control_delay || DEFAULT_FLOW_CONTROL_DELAY,

    :ca_file => @ca_file || "",

    :tables => @tables || {  },
    :table_id => @table_id || DEFAULT_TABLE_ID,
    :instrumentation_key => @instrumentation_key || DEFAULT_INSTRUMENTATION_KEY,
    :table_columns => @table_columns,
    :case_insensitive_columns => @case_insensitive_columns || DEFAULT_CASE_INSENSITIVE,
    :serialized_event_field => @serialized_event_field,
    :blob_max_delay => @blob_max_delay || DEFAULT_BLOB_MAX_DELAY,
    :blob_serialization => @blob_serialization || DEFAULT_BLOB_SERIALIZATION,
    :csv_separator => @csv_separator || DEFAULT_CSV_SEPARATOR,
    :csv_default_value => @csv_default_value || DEFAULT_CSV_DEFAULT_VALUE,
    :disable_compression => @disable_compression || DEFAULT_DISABLE_COMPRESSION,
    :disable_truncation => @disable_truncation || DEFAULT_DISABLE_TRUNCATION,

  }
end
receive( event ) click to toggle source
# File lib/logstash/outputs/application_insights.rb, line 378
def receive ( event )
  # @codec.encode( event )
  @channels.receive( event, nil )
  return "ok\n"
end
register() click to toggle source
# File lib/logstash/outputs/application_insights.rb, line 313
def register

  # puts "++ SETTINGS: #{LogStash::SETTINGS.to_hash}"
  # @logger.info("test test", :xx => "xx", :yy => 1)
  # puts "++ LOGSTASH_HOME: #{LogStash::Environment::LOGSTASH_HOME}"

  # logstash define: @original_params = original_params
  # logstash define: @config = params

  # set configuration
  Config.validate_and_adjust_configuration( default_configuration )
  configuration = Config.current
  masked_configuration = Config.masked_current

  Multi_io_logger.config( configuration )

  # be careful don't use here @logger, as it will override Logstash @logger, and may create starnge behaviour
  @private_logger = configuration[:logger]
  @private_logger.info { "configuration: #{masked_configuration}" }

  @telemetry = Telemetry.instance
  configuration[:telemetry_channel] = @telemetry.telemetry_channel

  Timer.config( configuration )

  @notification_recovery = Notification_recovery.instance
  @storage_recovery = Storage_recovery.instance
  @shutdown_recovery = Shutdown_recovery.instance

  if @validate_notification
    result = Validate_notification.new.validate
    raise ConfigurationError, "Failed to access application insights at #{configuration[:application_insights_endpoint]}, due to error #{result[:error].inspect}" unless result[:success]
  end

  if @validate_storage
    results = Validate_storage.new.validate
    results.each do |result|
      raise ConfigurationError, "Failed to #{result[:test]} in azure storage account #{result[:storage_account_name]}, due to error #{result[:error].inspect}" unless result[:success]
    end
  end

  @notification_recovery.start
  @storage_recovery.start
  @shutdown_recovery.start

  @shutdown = Shutdown.instance
  @channels = Channels.instance

  @shutdown.start
  @channels.start

  @storage_cleanup = Storage_cleanup.start

  @private_logger.info { "plugin registered" }

  # @codec.on_event do |event, encoded_event|
  #   @channels.receive( event, encoded_event )
  # end

  @telemetry.track_event { { :name => "register", :properties => masked_configuration } }

  return "ok\n"
end