DataDog / datadogpy

The Datadog Python library
https://datadoghq.com/
Other
609 stars 302 forks source link

The example in the readme doesn't work #721

Closed richstokes closed 2 years ago

richstokes commented 2 years ago
from datadog import initialize, api

options = {
    "api_key": "<YOUR_API_KEY>",
    "app_key": "<YOUR_APP_KEY>",
}

initialize(**options)

title = "Something big happened!"
text = "And let me tell you all about it here!"
tags = ["version:1", "application:web"]

api.Event.create(title=title, text=text, tags=tags)

Results in: No agent or invalid configuration file found

therve commented 2 years ago

Hi,

AFAIU it's just a log info that you can ignore. You can pass hostname_from_config=False to initialize to remove it. Thanks.