Class: ElasticAPM::Span::Context::Destination Private
- Inherits:
-
Object
- Object
- ElasticAPM::Span::Context::Destination
- Includes:
- Fields
- Defined in:
- lib/elastic_apm/span/context/destination.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(service: nil, cloud: nil, **attrs) ⇒ Destination
constructor
private
A new instance of Destination.
Methods included from Fields
Constructor Details
#initialize(service: nil, cloud: nil, **attrs) ⇒ Destination
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Destination.
48 49 50 51 52 53 |
# File 'lib/elastic_apm/span/context/destination.rb', line 48 def initialize(service: nil, cloud: nil, **attrs) super(**attrs) self.service = build_service(service) self.cloud = build_cloud(cloud) end |
Class Method Details
.from_uri(uri_or_str, type: nil, **attrs) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/elastic_apm/span/context/destination.rb', line 55 def self.from_uri(uri_or_str, type: nil, **attrs) uri = normalize(uri_or_str) service = case type when 'http' then http_service(uri) else nil end new( address: uri.hostname, port: uri.port, service: service, **attrs ) end |