Closed aaronlutz closed 2 years ago
I don't have sufficient repository permissions to apply the backward-incompatible
label or resource/dogstatsd
label.
Thanks for your contribution!
This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.
If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of this project.
Comment that the issue is still reproducible and include updated details requested in the issue template.
Ran into this today when we updated from 0.42.0 to 0.43.0. Changing the text
param to message
solved it, but this seems like kind of a silly backwards-incompatible change.
Our basic usage:
import os
from datadog.dogstatsd.base import DogStatsd
statsd = DogStatsd(
host=os.getenv('DATADOG_HOST', ''),
namespace='sample-service',
constant_tags=[
'application:sample-service',
'environment:{}'.format(os.getenv('ENVIRONMENT', ''))
],
)
def process() -> None:
statsd.event(title='Sample service process', text='started')
It appears this was changed in PR #670
Hey @aaronlutz / @Jltp1972,
Apologies for the delay on answering this. The reason for the change was that it did not align to service_check variable naming so text
was changed to message
and it was not flagged as backwards-incompatible
because it is/was a positional argument. Given your feedback about your use cases via named arguments for positional args, the second assumption did not seem to hold fully for all users so this will be something that we'll be more careful in statsd
package going forward. With that said and the length of time the release has been out, the impact seems relatively low to the users other than ensuring that ThreadStats API matches in the future so I will see about opening a PR for that for the next release.
@aaronlutz / @Jltp1972 Consistency fix is merged so I expect 0.43.1+ to have it. In the meantime, you should be able to remove the explicit names on the title
and text
/message
positional parameters for interchangeability between the two packages.
Describe the bug
datadog.ThreadStats.event()
anddatadog.DogStatsd.event()
had identical positional and keyword arguments.datadog.ThreadStats.event()
has the same positional and keyword arguments as it did in 0.24.0datadog.DogStatsd.event()
had it's second positional argument renamed fromtext
tomessage
datadog.DogStatsd.event()
anddatadog.ThreadStats.event()
arguments are not fully interchangeableTo Reproduce
In
alerting.py
Expected behavior
Given the same
*args
and**kwargs
,datadog.DogStatsd.event()
anddatadog.ThreadStats.event()
should be interchangeable.Environment and Versions (please complete the following information):
requirements.txt
haddatadog>=0.32.0
0.42.0
and has analerting
module similar to the example abovedatadog.DogStatsd
in gitlab-ci and in our docker-images running in Airflowdatadog.ThreadStats
locallydatadog>=0.32.0
, when0.43.0
became available it was used in a build today, and started causing failures because the positional and keyword arguments of the two.event
methods were no longer interchangeable.0.42.0