<commit_before>action :create do
  definitions = Sensu::Helpers.select_attributes(
    node.sensu,
    %w[rabbitmq redis api]
  )

  config = Sensu::Helpers.data_bag_item(node['sensu']["config_data_bag_key"], true, node['sensu']['data_bag_name'])

  if config
    definitions = Chef::Mixin::DeepMerge.merge(definitions, config.to_hash)
  end

  service_config = {}

  %w[
    client
    api
    server
  ].each do |service|
    next unless node.recipe?("sensu::#{service}_service")

    service_data_bag_item = Sensu::Helpers.data_bag_item(service, true, node['sensu']['data_bag_name'])

    if service_data_bag_item
      service_config = Chef::Mixin::DeepMerge.merge(service_config, service_data_bag_item.to_hash)<commit_msg>[data_bag_attribs] updated base_config provider to use new attrib structure<commit_after>action :create do
  definitions = Sensu::Helpers.select_attributes(
    node.sensu,
    %w[rabbitmq redis api]
  )

  data_bag_name = node.sensu.data_bag.name
  config_item = node.sensu.data_bag.config_item

  config = Sensu::Helpers.data_bag_item(config_item, true, data_bag_name)

  if config
    definitions = Chef::Mixin::DeepMerge.merge(definitions, config.to_hash)
  end

  service_config = {}

  %w[
    client
    api
    server
  ].each do |service|
    next unless node.recipe?("sensu::#{service}_service")

    service_data_bag_item = Sensu::Helpers.data_bag_item(service, true, data_bag_name)

    if service_data_bag_item
      service_config = Chef::Mixin::DeepMerge.merge(service_config, service_data_bag_item.to_hash)
{'fraction_non_alphanumeric': 0.11362169141381537, 'fraction_numerical': 0.0, 'mean_word_length': 4.827067669172933, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5252724', 'n_tokens_mistral': 556, 'n_tokens_neox': 537, 'n_words': 89}