Class: Datadog::Tracing::Contrib::GraphQL::Configuration::ErrorExtensionEnvParser

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/tracing/contrib/graphql/configuration/error_extension_env_parser.rb

Overview

Parses the environment variable ‘DD_TRACE_GRAPHQL_ERROR_EXTENSIONS` for error extension names declaration.

Class Method Summary collapse

Class Method Details

.call(values) ⇒ Object

Parses the environment variable ‘DD_TRACE_GRAPHQL_ERROR_EXTENSIONS` into an array of error extension names.



11
12
13
14
15
# File 'lib/datadog/tracing/contrib/graphql/configuration/error_extension_env_parser.rb', line 11

def self.call(values)
  # Split by comma, remove leading and trailing whitespaces,
  # remove empty values, and remove repeated values.
  values.split(',').each(&:strip!).reject(&:empty?).uniq
end