class Skylight::Normalizers::OrientdbClient::Query

Constants

CAT
QUERY_REGEX
SUPPORTED_QUERY_TYPES

Public Instance Methods

normalize(trace, name, payload) click to toggle source
# File lib/orientdb_client/integration/skylight_normalizer.rb, line 14
def normalize(trace, name, payload)
  url = payload[:url]
  query_type = nil
  begin
    uri = URI.parse(url)
    match = uri.path.match(QUERY_REGEX)
    if match
      query_type = match[1]
    end
  rescue URI::Error
    return :skip
  end

  return :skip unless SUPPORTED_QUERY_TYPES.include?(query_type)

  [ CAT, "orientdb: #{query_type}", nil ]
end