Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(internal_events): take into account the first metrics counter value #21830

Closed
wants to merge 2 commits into from

Conversation

vladimir-dd
Copy link
Contributor

Summary

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

How did you test this PR?

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the "no-changelog" label to this PR.

Checklist

  • Please read our Vector contributor resources.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run dd-rust-license-tool write to regenerate the license inventory and commit the changes (if any). More details here.

References

@vladimir-dd vladimir-dd force-pushed the vladimir-dd/remove-metrics-normalisation branch 2 times, most recently from cf1aa8d to c3d58a7 Compare November 19, 2024 17:27
@datadog-vectordotdev
Copy link

datadog-vectordotdev bot commented Nov 19, 2024

Datadog Report

Branch report: vladimir-dd/remove-metrics-normalisation
Commit report: eb825d5
Test service: vector

❌ 21 Failed (0 Known Flaky), 2242 Passed, 0 Skipped, 1m 31.69s Total Time

❌ Failed Tests (21)

This report shows up to 5 failed tests.

  • sinks::appsignal::integration_tests::metrics_shape - vector - Details

    Expand for error
     Test failed, but output was not captured
    
  • sinks::appsignal::normalizer::tests::absolute_counter - vector - Details

    Expand for error
     thread 'sinks::appsignal::normalizer::tests::absolute_counter' panicked at src/test_util/metrics.rs:375:9:
     assertion \`left == right\` failed
       left: Some(Metric { series: MetricSeries { name: MetricName { name: "counter", namespace: None }, tags: None }, data: MetricData { time: MetricTime { timestamp: None, interval_ms: None }, kind: Incremental, value: Counter { value: 3.14 } }, metadata: EventMetadata(Inner { value: Object({}), secrets: {}, finalizers: EventFinalizers([]), source_id: None, source_type: None, upstream_id: None, schema_definition: Definition { event_kind: Kind { bytes: Some(()), integer: Some(()), float: Some(()), boolean: Some(()), timestamp: Some(()), regex: Some(()), null: Some(()), undefined: Some(()), array: Some(Collection { known: {}, unknown: Unknown(Infinite(Infinite { bytes: Some(()), integer: Some(()), float: Some(()), boolean: Some(()), timestamp: Some(()), regex: Some(()), null: Some(()), array: Some(()), object: Some(()) })) }), object: Some(Collection { known: {}, unknown: Unknown(Infinite(Infinite { bytes: Some(()), integer: Some(()), float: Some(()), boolean: Some(()), timestamp: Some(()), regex: Some(()), null: Some(()), array: Some(()), object: Some(()) })) }) }, metadata_kind: Kind { bytes: None, integer: None, float: None, boolean: None, timestamp: None, regex: None, null: None, undefined: None, array: None, object: Some(Collection { known: {}, unknown: Unknown(Infinite(Infinite { bytes: Some(()), integer: Some(()), float: Some(()), boolean: Some(()), timestamp: Some(()), regex: Some(()), null: Some(()), array: Some(()), object: Some(()) })) }) }, meaning: {}, log_namespaces: {Vector, Legacy} }, dropped_fields: {}, datadog_origin_metadata: None, source_event_id: Some(019345fa-2b7e-7cf3-87e5-953cfe976202) }) })
      right: None
     stack backtrace:
        0:     0x5557190958a5 - std::backtrace_rs::backtrace::libunwind::trace::h649ab3318d3445c5
                                    at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
        1:     0x5557190958a5 - std::backtrace_rs::backtrace::trace_unsynchronized::hf4bb60c3387150c3
                                    at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
        2:     0x5557190958a5 - std::sys::backtrace::_print_fmt::hd9186c800e44bd00
     ...
    
  • sinks::appsignal::normalizer::tests::mixed_counter - vector - Details

    Expand for error
     thread 'sinks::appsignal::normalizer::tests::mixed_counter' panicked at src/test_util/metrics.rs:375:9:
     assertion \`left == right\` failed
       left: Some(Metric { series: MetricSeries { name: MetricName { name: "counter", namespace: None }, tags: None }, data: MetricData { time: MetricTime { timestamp: None, interval_ms: None }, kind: Incremental, value: Counter { value: 8.675309 } }, metadata: EventMetadata(Inner { value: Object({}), secrets: {}, finalizers: EventFinalizers([]), source_id: None, source_type: None, upstream_id: None, schema_definition: Definition { event_kind: Kind { bytes: Some(()), integer: Some(()), float: Some(()), boolean: Some(()), timestamp: Some(()), regex: Some(()), null: Some(()), undefined: Some(()), array: Some(Collection { known: {}, unknown: Unknown(Infinite(Infinite { bytes: Some(()), integer: Some(()), float: Some(()), boolean: Some(()), timestamp: Some(()), regex: Some(()), null: Some(()), array: Some(()), object: Some(()) })) }), object: Some(Collection { known: {}, unknown: Unknown(Infinite(Infinite { bytes: Some(()), integer: Some(()), float: Some(()), boolean: Some(()), timestamp: Some(()), regex: Some(()), null: Some(()), array: Some(()), object: Some(()) })) }) }, metadata_kind: Kind { bytes: None, integer: None, float: None, boolean: None, timestamp: None, regex: None, null: None, undefined: None, array: None, object: Some(Collection { known: {}, unknown: Unknown(Infinite(Infinite { bytes: Some(()), integer: Some(()), float: Some(()), boolean: Some(()), timestamp: Some(()), regex: Some(()), null: Some(()), array: Some(()), object: Some(()) })) }) }, meaning: {}, log_namespaces: {Vector, Legacy} }, dropped_fields: {}, datadog_origin_metadata: None, source_event_id: Some(019345fa-2cb4-7db2-a176-d4808f4b3d8b) }) })
      right: None
     stack backtrace:
        0:     0x564310fd98a5 - std::backtrace_rs::backtrace::libunwind::trace::h649ab3318d3445c5
                                    at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
        1:     0x564310fd98a5 - std::backtrace_rs::backtrace::trace_unsynchronized::hf4bb60c3387150c3
                                    at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
        2:     0x564310fd98a5 - std::sys::backtrace::_print_fmt::hd9186c800e44bd00
     ...
    
  • sinks::datadog::metrics::normalizer::tests::absolute_aggregated_histogram - vector - Details

    Expand for error
     thread 'sinks::datadog::metrics::normalizer::tests::absolute_aggregated_histogram' panicked at src/test_util/metrics.rs:375:9:
     assertion \`left == right\` failed
       left: Some(Metric { series: MetricSeries { name: MetricName { name: "agg_histogram", namespace: None }, tags: None }, data: MetricData { time: MetricTime { timestamp: None, interval_ms: None }, kind: Incremental, value: Sketch { sketch: AgentDDSketch(AgentDDSketch { config: Config { bin_limit: 4096, gamma_v: 1.015625, gamma_ln: 0.015504186535965254, norm_min: 9.94185408912145e-10, norm_bias: 1338 }, bins: [Bin { k: 1338, n: 2 }, Bin { k: 1365, n: 1 }, Bin { k: 1383, n: 1 }, Bin { k: 1398, n: 1 }, Bin { k: 1410, n: 1 }, Bin { k: 1420, n: 1 }, Bin { k: 1427, n: 1 }, Bin { k: 1435, n: 1 }, Bin { k: 1442, n: 1 }, Bin { k: 1449, n: 1 }, Bin { k: 1455, n: 1 }, Bin { k: 1461, n: 1 }, Bin { k: 1466, n: 1 }, Bin { k: 1471, n: 1 }, Bin { k: 1472, n: 1 }, Bin { k: 1476, n: 1 }, Bin { k: 1480, n: 1 }, Bin { k: 1484, n: 1 }, Bin { k: 1488, n: 1 }, Bin { k: 1492, n: 1 }, Bin { k: 1495, n: 1 }, Bin { k: 1498, n: 2 }, Bin { k: 1501, n: 1 }, Bin { k: 1504, n: 1 }, Bin { k: 1507, n: 1 }, Bin { k: 1510, n: 2 }, Bin { k: 1513, n: 1 }, Bin { k: 1516, n: 1 }, Bin { k: 1517, n: 1 }, Bin { k: 1519, n: 1 }, Bin { k: 1521, n: 1 }, Bin { k: 1523, n: 1 }, Bin { k: 1525, n: 1 }, Bin { k: 1527, n: 1 }, Bin { k: 1529, n: 1 }, Bin { k: 1531, n: 2 }, Bin { k: 1533, n: 1 }, Bin { k: 1535, n: 1 }, Bin { k: 1537, n: 2 }, Bin { k: 1539, n: 1 }, Bin { k: 1541, n: 1 }, Bin { k: 1543, n: 2 }, Bin { k: 1545, n: 2 }, Bin { k: 1547, n: 1 }, Bin { k: 1549, n: 2 }, Bin { k: 1551, n: 1 }, Bin { k: 1553, n: 2 }, Bin { k: 1555, n: 2 }, Bin { k: 1557, n: 2 }, Bin { k: 1559, n: 2 }, Bin { k: 1561, n: 1 }, Bin { k: 1562, n: 1 }, Bin { k: 1563, n: 1 }, Bin { k: 1564, n: 1 }, Bin { k: 1565, n: 1 }, Bin { k: 1566, n: 1 }, Bin { k: 1567, n: 1 }, Bin { k: 1568, n: 1 }, Bin { k: 1569, n: 1 }, Bin { k: 1570, n: 1 }, Bin { k: 1571, n: 1 }, Bin { k: 1572, n: 1 }, Bin { k: 1573, n: 2 }, Bin { k: 1574, n: 1 }, Bin { k: 1575, n: 1 }, Bin { k: 1576, n: 1 }, Bin { k: 1577, n: 2 }, Bin { k: 1578, n: 1 }, Bin { k: 1579, n: 1 }, Bin { k: 1580, n: 2 }, Bin { k: 1581, n: 1 }, Bin { k: 1582, n: 1 }, Bin { k: 1583, n: 2 }, Bin { k: 1584, n: 1 }, Bin { k: 1585, n: 2 }, Bin { k: 1586, n: 1 }, Bin { k: 1587, n: 2 }, Bin { k: 1588, n: 1 }, Bin { k: 1589, n: 2 }, Bin { k: 1590, n: 1 }, Bin { k: 1591, n: 2 }, Bin { k: 1592, n: 1 }, Bin { k: 1593, n: 2 }, Bin { k: 1594, n: 2 }, Bin { k: 1595, n: 1 }, Bin { k: 1596, n: 2 }, Bin { k: 1597, n: 2 }, Bin { k: 1598, n: 1 }, Bin { k: 1599, n: 2 }, Bin { k: 1600, n: 2 }, Bin { k: 1601, n: 2 }, Bin { k: 1602, n: 2 }, Bin { k: 1603, n: 2 }, Bin { k: 1604, n: 2 }, Bin { k: 1605, n: 2 }, Bin { k: 1606, n: 2 }, Bin { k: 1607, n: 2 }, Bin { k: 1608, n: 1 }, Bin { k: 1609, n: 2 }, Bin { k: 1610, n: 2 }, Bin { k: 1611, n: 1 }, Bin { k: 1612, n: 2 }, Bin { k: 1613, n: 2 }, Bin { k: 1614, n: 1 }, Bin { k: 1615, n: 2 }, Bin { k: 1616, n: 2 }, Bin { k: 1617, n: 2 }, Bin { k: 1618, n: 2 }, Bin { k: 1619, n: 2 }, Bin { k: 1620, n: 2 }, Bin { k: 1621, n: 2 }, Bin { k: 1622, n: 2 }, Bin { k: 1623, n: 2 }, Bin { k: 1624, n: 2 }, Bin { k: 1625, n: 2 }, Bin { k: 1626, n: 2 }, Bin { k: 1627, n: 2 }, Bin { k: 1628, n: 2 }, Bin { k: 1629, n: 2 }, Bin { k: 1630, n: 3 }, Bin { k: 1631, n: 2 }, Bin { k: 1632, n: 2 }, Bin { k: 1633, n: 3 }, Bin { k: 1634, n: 2 }, Bin { k: 1635, n: 2 }, Bin { k: 1636, n: 3 }, Bin { k: 1637, n: 2 }, Bin { k: 1638, n: 3 }, Bin { k: 1639, n: 3 }, Bin { k: 1640, n: 2 }, Bin { k: 1641, n: 3 }, Bin { k: 1642, n: 3 }, Bin { k: 1643, n: 2 }, Bin { k: 1644, n: 3 }, Bin { k: 1645, n: 3 }, Bin { k: 1646, n: 3 }, Bin { k: 1647, n: 3 }, Bin { k: 1648, n: 3 }, Bin { k: 1649, n: 3 }, Bin { k: 1650, n: 3 }, Bin { k: 1651, n: 1 }, Bin { k: 1652, n: 2 }, Bin { k: 1653, n: 1 }, Bin { k: 1654, n: 2 }, Bin { k: 1655, n: 2 }, Bin { k: 1656, n: 1 }, Bin { k: 1657, n: 2 }, Bin { k: 1658, n: 2 }, Bin { k: 1659, n: 1 }, Bin { k: 1660, n: 2 }, Bin { k: 1661, n: 2 }, Bin { k: 1662, n: 2 }, Bin { k: 1663, n: 2 }, Bin { k: 1664, n: 2 }, Bin { k: 1665, n: 2 }, Bin { k: 1666, n: 2 }, Bin { k: 1667, n: 2 }, Bin { k: 1668, n: 2 }, Bin { k: 1669, n: 2 }, Bin { k: 1670, n: 2 }, Bin { k: 1671, n: 2 }, Bin { k: 1672, n: 2 }, Bin { k: 1673, n: 2 }, Bin { k: 1674, n: 3 }, Bin { k: 1675, n: 2 }, Bin { k: 1676, n: 2 }, Bin { k: 1677, n: 3 }, Bin { k: 1678, n: 2 }, Bin { k: 1679, n: 2 }, Bin { k: 1680, n: 3 }, Bin { k: 1681, n: 2 }, Bin { k: 1682, n: 3 }, Bin { k: 1683, n: 2 }, Bin { k: 1684, n: 3 }, Bin { k: 1685, n: 3 }, Bin { k: 1686, n: 2 }, Bin { k: 1687, n: 3 }, Bin { k: 1688, n: 3 }, Bin { k: 1689, n: 3 }, Bin { k: 1690, n: 2 }, Bin { k: 1691, n: 3 }, Bin { k: 1692, n: 3 }, Bin { k: 1693, n: 3 }, Bin { k: 1694, n: 3 }, Bin { k: 1695, n: 3 }, Bin { k: 1696, n: 1 }, Bin { k: 1697, n: 2 }, Bin { k: 1698, n: 1 }, Bin { k: 1699, n: 2 }, Bin { k: 1700, n: 2 }, Bin { k: 1701, n: 1 }, Bin { k: 1702, n: 2 }, Bin { k: 170
    
  • sinks::datadog::metrics::normalizer::tests::absolute_counter - vector - Details

    Expand for error
     thread 'sinks::datadog::metrics::normalizer::tests::absolute_counter' panicked at src/test_util/metrics.rs:375:9:
     assertion \`left == right\` failed
       left: Some(Metric { series: MetricSeries { name: MetricName { name: "counter", namespace: None }, tags: None }, data: MetricData { time: MetricTime { timestamp: None, interval_ms: None }, kind: Incremental, value: Counter { value: 3.14 } }, metadata: EventMetadata(Inner { value: Object({}), secrets: {}, finalizers: EventFinalizers([]), source_id: None, source_type: None, upstream_id: None, schema_definition: Definition { event_kind: Kind { bytes: Some(()), integer: Some(()), float: Some(()), boolean: Some(()), timestamp: Some(()), regex: Some(()), null: Some(()), undefined: Some(()), array: Some(Collection { known: {}, unknown: Unknown(Infinite(Infinite { bytes: Some(()), integer: Some(()), float: Some(()), boolean: Some(()), timestamp: Some(()), regex: Some(()), null: Some(()), array: Some(()), object: Some(()) })) }), object: Some(Collection { known: {}, unknown: Unknown(Infinite(Infinite { bytes: Some(()), integer: Some(()), float: Some(()), boolean: Some(()), timestamp: Some(()), regex: Some(()), null: Some(()), array: Some(()), object: Some(()) })) }) }, metadata_kind: Kind { bytes: None, integer: None, float: None, boolean: None, timestamp: None, regex: None, null: None, undefined: None, array: None, object: Some(Collection { known: {}, unknown: Unknown(Infinite(Infinite { bytes: Some(()), integer: Some(()), float: Some(()), boolean: Some(()), timestamp: Some(()), regex: Some(()), null: Some(()), array: Some(()), object: Some(()) })) }) }, meaning: {}, log_namespaces: {Vector, Legacy} }, dropped_fields: {}, datadog_origin_metadata: None, source_event_id: Some(019345fa-366c-7371-83f6-2f9608268876) }) })
      right: None
     stack backtrace:
        0:     0x55884c3bc8a5 - std::backtrace_rs::backtrace::libunwind::trace::h649ab3318d3445c5
                                    at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
        1:     0x55884c3bc8a5 - std::backtrace_rs::backtrace::trace_unsynchronized::hf4bb60c3387150c3
                                    at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
        2:     0x55884c3bc8a5 - std::sys::backtrace::_print_fmt::hd9186c800e44bd00
     ...
    

@vladimir-dd vladimir-dd force-pushed the vladimir-dd/remove-metrics-normalisation branch from c3d58a7 to 828a0a8 Compare November 19, 2024 19:24
@github-actions github-actions bot added the domain: sinks Anything related to the Vector's sinks label Nov 19, 2024
@vladimir-dd vladimir-dd changed the title fix(internal_events): emit 0 value for internal event counters to report the first metric value fix(internal_events): take into account the first metrics counter value Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: sinks Anything related to the Vector's sinks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant