Class: Aws::XRay::Types::SamplingRule

Inherits:
Struct
  • Object
show all
Includes:
Structure
Defined in:
lib/aws-sdk-xray/types.rb

Overview

Note:

When making an API call, you may pass SamplingRule data as a hash:

{
  rule_name: "RuleName",
  rule_arn: "String",
  resource_arn: "ResourceARN", # required
  priority: 1, # required
  fixed_rate: 1.0, # required
  reservoir_size: 1, # required
  service_name: "ServiceName", # required
  service_type: "ServiceType", # required
  host: "Host", # required
  http_method: "HTTPMethod", # required
  url_path: "URLPath", # required
  version: 1, # required
  attributes: {
    "AttributeKey" => "AttributeValue",
  },
}

A sampling rule that services use to decide whether to instrument a request. Rule fields can match properties of the service, or properties of a request. The service can ignore rules that don’t match its properties.

Instance Attribute Summary collapse

Instance Attribute Details

#attributesHash<String,String>

Matches attributes derived from the request.

Returns:

  • (Hash<String,String>)


1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/aws-sdk-xray/types.rb', line 1453

class SamplingRule < Struct.new(
  :rule_name,
  :rule_arn,
  :resource_arn,
  :priority,
  :fixed_rate,
  :reservoir_size,
  :service_name,
  :service_type,
  :host,
  :http_method,
  :url_path,
  :version,
  :attributes)
  include Aws::Structure
end

#fixed_rateFloat

The percentage of matching requests to instrument, after the reservoir is exhausted.

Returns:

  • (Float)


1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/aws-sdk-xray/types.rb', line 1453

class SamplingRule < Struct.new(
  :rule_name,
  :rule_arn,
  :resource_arn,
  :priority,
  :fixed_rate,
  :reservoir_size,
  :service_name,
  :service_type,
  :host,
  :http_method,
  :url_path,
  :version,
  :attributes)
  include Aws::Structure
end

#hostString

Matches the hostname from a request URL.

Returns:

  • (String)


1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/aws-sdk-xray/types.rb', line 1453

class SamplingRule < Struct.new(
  :rule_name,
  :rule_arn,
  :resource_arn,
  :priority,
  :fixed_rate,
  :reservoir_size,
  :service_name,
  :service_type,
  :host,
  :http_method,
  :url_path,
  :version,
  :attributes)
  include Aws::Structure
end

#http_methodString

Matches the HTTP method of a request.

Returns:

  • (String)


1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/aws-sdk-xray/types.rb', line 1453

class SamplingRule < Struct.new(
  :rule_name,
  :rule_arn,
  :resource_arn,
  :priority,
  :fixed_rate,
  :reservoir_size,
  :service_name,
  :service_type,
  :host,
  :http_method,
  :url_path,
  :version,
  :attributes)
  include Aws::Structure
end

#priorityInteger

The priority of the sampling rule.

Returns:

  • (Integer)


1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/aws-sdk-xray/types.rb', line 1453

class SamplingRule < Struct.new(
  :rule_name,
  :rule_arn,
  :resource_arn,
  :priority,
  :fixed_rate,
  :reservoir_size,
  :service_name,
  :service_type,
  :host,
  :http_method,
  :url_path,
  :version,
  :attributes)
  include Aws::Structure
end

#reservoir_sizeInteger

A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.

Returns:

  • (Integer)


1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/aws-sdk-xray/types.rb', line 1453

class SamplingRule < Struct.new(
  :rule_name,
  :rule_arn,
  :resource_arn,
  :priority,
  :fixed_rate,
  :reservoir_size,
  :service_name,
  :service_type,
  :host,
  :http_method,
  :url_path,
  :version,
  :attributes)
  include Aws::Structure
end

#resource_arnString

Matches the ARN of the AWS resource on which the service runs.

Returns:

  • (String)


1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/aws-sdk-xray/types.rb', line 1453

class SamplingRule < Struct.new(
  :rule_name,
  :rule_arn,
  :resource_arn,
  :priority,
  :fixed_rate,
  :reservoir_size,
  :service_name,
  :service_type,
  :host,
  :http_method,
  :url_path,
  :version,
  :attributes)
  include Aws::Structure
end

#rule_arnString

The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.

Returns:

  • (String)


1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/aws-sdk-xray/types.rb', line 1453

class SamplingRule < Struct.new(
  :rule_name,
  :rule_arn,
  :resource_arn,
  :priority,
  :fixed_rate,
  :reservoir_size,
  :service_name,
  :service_type,
  :host,
  :http_method,
  :url_path,
  :version,
  :attributes)
  include Aws::Structure
end

#rule_nameString

The name of the sampling rule. Specify a rule by either name or ARN, but not both.

Returns:

  • (String)


1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/aws-sdk-xray/types.rb', line 1453

class SamplingRule < Struct.new(
  :rule_name,
  :rule_arn,
  :resource_arn,
  :priority,
  :fixed_rate,
  :reservoir_size,
  :service_name,
  :service_type,
  :host,
  :http_method,
  :url_path,
  :version,
  :attributes)
  include Aws::Structure
end

#service_nameString

Matches the ‘name` that the service uses to identify itself in segments.

Returns:

  • (String)


1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/aws-sdk-xray/types.rb', line 1453

class SamplingRule < Struct.new(
  :rule_name,
  :rule_arn,
  :resource_arn,
  :priority,
  :fixed_rate,
  :reservoir_size,
  :service_name,
  :service_type,
  :host,
  :http_method,
  :url_path,
  :version,
  :attributes)
  include Aws::Structure
end

#service_typeString

Matches the ‘origin` that the service uses to identify its type in segments.

Returns:

  • (String)


1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/aws-sdk-xray/types.rb', line 1453

class SamplingRule < Struct.new(
  :rule_name,
  :rule_arn,
  :resource_arn,
  :priority,
  :fixed_rate,
  :reservoir_size,
  :service_name,
  :service_type,
  :host,
  :http_method,
  :url_path,
  :version,
  :attributes)
  include Aws::Structure
end

#url_pathString

Matches the path from a request URL.

Returns:

  • (String)


1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/aws-sdk-xray/types.rb', line 1453

class SamplingRule < Struct.new(
  :rule_name,
  :rule_arn,
  :resource_arn,
  :priority,
  :fixed_rate,
  :reservoir_size,
  :service_name,
  :service_type,
  :host,
  :http_method,
  :url_path,
  :version,
  :attributes)
  include Aws::Structure
end

#versionInteger

The version of the sampling rule format (‘1`).

Returns:

  • (Integer)


1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/aws-sdk-xray/types.rb', line 1453

class SamplingRule < Struct.new(
  :rule_name,
  :rule_arn,
  :resource_arn,
  :priority,
  :fixed_rate,
  :reservoir_size,
  :service_name,
  :service_type,
  :host,
  :http_method,
  :url_path,
  :version,
  :attributes)
  include Aws::Structure
end