Class: DatadogAPIClient::V2::HTTPLogItem
- Inherits:
-
Object
- Object
- DatadogAPIClient::V2::HTTPLogItem
- Defined in:
- lib/datadog_api_client/v2/models/http_log_item.rb
Overview
Logs that are sent over HTTP.
Instance Attribute Summary collapse
-
#ddsource ⇒ Object
The integration name associated with your log: the technology from which the log originated.
-
#ddtags ⇒ Object
Tags associated with your logs.
-
#hostname ⇒ Object
The name of the originating host of the log.
-
#message ⇒ Object
The message [reserved attribute](docs.datadoghq.com/logs/log_collection/#reserved-attributes) of your log.
-
#service ⇒ Object
The name of the application or service generating the log events.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ HTTPLogItem
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ HTTPLogItem
Initializes the object
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/datadog_api_client/v2/models/http_log_item.rb', line 80 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::HTTPLogItem` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::HTTPLogItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'ddsource') self.ddsource = attributes[:'ddsource'] end if attributes.key?(:'ddtags') self. = attributes[:'ddtags'] end if attributes.key?(:'hostname') self.hostname = attributes[:'hostname'] end if attributes.key?(:'message') self. = attributes[:'message'] end if attributes.key?(:'service') self.service = attributes[:'service'] end end |
Instance Attribute Details
#ddsource ⇒ Object
The integration name associated with your log: the technology from which the log originated. When it matches an integration name, Datadog automatically installs the corresponding parsers and facets. See [reserved attributes](docs.datadoghq.com/logs/log_collection/#reserved-attributes).
27 28 29 |
# File 'lib/datadog_api_client/v2/models/http_log_item.rb', line 27 def ddsource @ddsource end |
#ddtags ⇒ Object
Tags associated with your logs.
30 31 32 |
# File 'lib/datadog_api_client/v2/models/http_log_item.rb', line 30 def end |
#hostname ⇒ Object
The name of the originating host of the log.
33 34 35 |
# File 'lib/datadog_api_client/v2/models/http_log_item.rb', line 33 def hostname @hostname end |
#message ⇒ Object
The message [reserved attribute](docs.datadoghq.com/logs/log_collection/#reserved-attributes) of your log. By default, Datadog ingests the value of the message attribute as the body of the log entry. That value is then highlighted and displayed in the Logstream, where it is indexed for full text search.
36 37 38 |
# File 'lib/datadog_api_client/v2/models/http_log_item.rb', line 36 def end |
#service ⇒ Object
The name of the application or service generating the log events. It is used to switch from Logs to APM, so make sure you define the same value when you use both products. See [reserved attributes](docs.datadoghq.com/logs/log_collection/#reserved-attributes).
39 40 41 |
# File 'lib/datadog_api_client/v2/models/http_log_item.rb', line 39 def service @service end |