New upstream release.
Debian Janitor
1 year, 11 months ago
0 | 0 |
## Changes
|
1 | 1 |
|
2 | 2 |
[//]: # (comment: Don't forget to update statsd/telemetry.go:clientVersionTelemetryTag when releasing a new version)
|
|
3 |
|
|
4 |
# 5.1.1 / 2022-05-05
|
|
5 |
|
|
6 |
- [BUGFIX] Fix issue where tags of aggregated contexts could be modified after being sampled. See [#258][].
|
3 | 7 |
|
4 | 8 |
# 5.1.0 / 2022-03-02
|
5 | 9 |
|
|
391 | 395 |
[#253]: https://github.com/DataDog/datadog-go/pull/253
|
392 | 396 |
[#254]: https://github.com/DataDog/datadog-go/pull/254
|
393 | 397 |
[#255]: https://github.com/DataDog/datadog-go/pull/255
|
|
398 |
[#258]: https://github.com/DataDog/datadog-go/pull/258
|
394 | 399 |
[@Aceeri]: https://github.com/Aceeri
|
395 | 400 |
[@Jasrags]: https://github.com/Jasrags
|
396 | 401 |
[@KJTsanaktsidis]: https://github.com/KJTsanaktsidis
|
0 | |
golang-github-datadog-datadog-go (5.1.0-1) UNRELEASED; urgency=low
|
|
0 |
golang-github-datadog-datadog-go (5.1.1-1) UNRELEASED; urgency=low
|
1 | 1 |
|
2 | 2 |
* New upstream release.
|
|
3 |
* New upstream release.
|
3 | 4 |
|
4 | |
-- Debian Janitor <janitor@jelmer.uk> Fri, 25 Mar 2022 23:42:29 -0000
|
|
5 |
-- Debian Janitor <janitor@jelmer.uk> Sat, 28 May 2022 03:34:40 -0000
|
5 | 6 |
|
6 | 7 |
golang-github-datadog-datadog-go (2.1.0-3) unstable; urgency=medium
|
7 | 8 |
|
6 | 6 |
"testing"
|
7 | 7 |
|
8 | 8 |
"github.com/stretchr/testify/assert"
|
|
9 |
"github.com/stretchr/testify/require"
|
9 | 10 |
)
|
10 | 11 |
|
11 | 12 |
func TestAggregatorSample(t *testing.T) {
|
|
191 | 192 |
},
|
192 | 193 |
},
|
193 | 194 |
metrics)
|
194 | |
|
195 | 195 |
}
|
196 | 196 |
|
197 | 197 |
func TestAggregatorFlushConcurrency(t *testing.T) {
|
|
224 | 224 |
}
|
225 | 225 |
|
226 | 226 |
wg.Wait()
|
|
227 |
}
|
|
228 |
|
|
229 |
func TestAggregatorTagsCopy(t *testing.T) {
|
|
230 |
a := newAggregator(nil)
|
|
231 |
tags := []string{"tag1", "tag2"}
|
|
232 |
|
|
233 |
a.gauge("gauge", 21, tags)
|
|
234 |
a.count("count", 21, tags)
|
|
235 |
a.set("set", "test", tags)
|
|
236 |
|
|
237 |
tags[0] = "new_tags"
|
|
238 |
|
|
239 |
metrics := a.flushMetrics()
|
|
240 |
require.Len(t, metrics, 3)
|
|
241 |
for _, m := range metrics {
|
|
242 |
assert.Equal(t, []string{"tag1", "tag2"}, m.tags)
|
|
243 |
}
|
227 | 244 |
}
|
228 | 245 |
|
229 | 246 |
func TestGetContextAndTags(t *testing.T) {
|
22 | 22 |
return &countMetric{
|
23 | 23 |
value: value,
|
24 | 24 |
name: name,
|
25 | |
tags: tags,
|
|
25 |
tags: copySlice(tags),
|
26 | 26 |
}
|
27 | 27 |
}
|
28 | 28 |
|
|
52 | 52 |
return &gaugeMetric{
|
53 | 53 |
value: math.Float64bits(value),
|
54 | 54 |
name: name,
|
55 | |
tags: tags,
|
|
55 |
tags: copySlice(tags),
|
56 | 56 |
}
|
57 | 57 |
}
|
58 | 58 |
|
|
83 | 83 |
set := &setMetric{
|
84 | 84 |
data: map[string]struct{}{},
|
85 | 85 |
name: name,
|
86 | |
tags: tags,
|
|
86 |
tags: copySlice(tags),
|
87 | 87 |
}
|
88 | 88 |
set.data[value] = struct{}{}
|
89 | 89 |
return set
|
18 | 18 |
/*
|
19 | 19 |
clientVersionTelemetryTag is a tag identifying this specific client version.
|
20 | 20 |
*/
|
21 | |
var clientVersionTelemetryTag = "client_version:5.1.0"
|
|
21 |
var clientVersionTelemetryTag = "client_version:5.1.1"
|
22 | 22 |
|
23 | 23 |
// Telemetry represents internal metrics about the client behavior since it started.
|
24 | 24 |
type Telemetry struct {
|
18 | 18 |
}
|
19 | 19 |
lock.Unlock()
|
20 | 20 |
return true
|
|
21 |
}
|
21 | 22 |
|
|
23 |
func copySlice(src []string) []string {
|
|
24 |
if src == nil {
|
|
25 |
return nil
|
|
26 |
}
|
|
27 |
|
|
28 |
c := make([]string, len(src))
|
|
29 |
copy(c, src)
|
|
30 |
return c
|
22 | 31 |
}
|