Sha256: 7f4273df7a78fb650809c6d8dc0dbf9a741a772b6d6c2ce634176225949a66f4
Contents?: true
Size: 696 Bytes
Versions: 2
Compression:
Stored size: 696 Bytes
Contents
require "datadog_api_client" api_instance = DatadogAPIClient::V1::LogsAPI.new body = [DatadogAPIClient::V1::HTTPLogItem.new({ message: "2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World" })] # Array<HTTPLogItem> | Log to send (JSON format). opts = { content_encoding: DatadogAPIClient::V1::ContentEncoding::GZIP, # ContentEncoding | HTTP header used to compress the media-type. ddtags: "env:prod,user:my-user", # String | Log tags can be passed as query parameters with `text/plain` content type. } begin # Send logs result = api_instance.submit_log(body, opts) p result rescue DatadogAPIClient::V1::APIError => e puts "Error when calling LogsAPI->submit_log: #{e}" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
datadog_api_client-1.8.0 | examples/generated/v1/logs/SubmitLog.rb |
datadog_api_client-1.7.0 | examples/generated/v1/logs/SubmitLog.rb |