Description Usage Arguments Details Value See Also Examples
send_json()
is an easy to use function to send logs in json format via the Datadog-API.
1 | send_json(message_body)
|
message_body |
the message in plain text format. |
Sending logs in json format to the Datadog-API url set with set_api_top_level_domains
. If no top level
domain is specified .eu
will be used.
response of the Datadog-API call.
send_plain_text
, set_api_top_level_domains
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ## Not run:
# simple example with some attributes
mock_data <- c(http_status = 200,
hostname = "https://github.com/holzben",
env = "prod")
# create json
vec_as_json <- jsonlite::toJSON(mock_data)
# send the stuff
send_json(vec_as_json)
# creating some mock data
df <- data.frame(
http_status = c(200, 400, 500),
hostname = c("https://github.com/holzben",
"https://github.com/holzben_not",
"https://github.com/holzben_not"),
env = c("prod", "prod", "prod"),
message = c("All Good: https://github.com/holzben_not",
"Ok: https://github.com/holzben_not",
"Not Good: https://github.com/holzben_not"))
send_json(jsonlite::toJSON(df))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.