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

beta feature for extended event window #16440

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlab/tagger/build-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euxo pipefail
IFS=$'\n\t'

curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master \
--form variables[ORIG_CI_BUILD_REF]=$CI_BUILD_REF \
--form variables[ORIG_CI_BUILD_REF]=$CI_COMMIT_SHA \
--form variables[ROOT_LAYOUT_TYPE]=core \
--form variables[REPO_NAME]=integrations-core \
https://gitlab.ddbuild.io/api/v4/projects/138/trigger/pipeline
Expand Down
2 changes: 1 addition & 1 deletion .in-toto/tag.ec45eb9d.link
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"signatures":[{"keyid":"ec45eb9dac9d6ba1bcd131314583c67851bebf0d","other_headers":"04000108001d162104ec45eb9dac9d6ba1bcd131314583c67851bebf0d0502644292d0","signature":"341f54ec59bb1e9eb9887a4010a92021f5f3116434bfef4cbf073e57b0b1639d55550cfe3490c3b5e5b298be060379fac590a53e15817b940a7aa1ed7f9c198bc5152a0f222cda4efe70ff957847f55e8cbf963132175efd885e4af2233199ce33b66f7c822dfdaeec3a9fd78ca318d3317b95ea68f2dee081a3cd7161e4eef82f2b6be007f98eb5e87685e42dce592387df399a8997bc623258e37633674ec32bf126b804ac9251a00ba2eb5c26c3e175e073162659a15563444e42faefc88597438f70da788ecf9d591466d62b56263bf4c741caa3794cbc9945c05776146cba078894e2dfb7512b44ce9426587b072003996087d30ef4994141353a8802a29ddc2e1333376481c832f9436acb5dd2c729fae99847fe6031172a6d3eeb455dc8edad6e27199826192fcae7cdeff037d1391afc97be3e82119f78c8b70e60711d9fee2c387e03a21430b87af32860c7667511a4f4dd37dcd93518f1983a745b26998880c5e30380c0410ac371ce27b29d97dd0601b30feb8d3be3c75d3c275c77e99cb8209d4f4665717123a9cc8d1deffc4a2d009cce2df94bf87fe25c46f123f0863f2e462a2e2c70d6aa5f664fa255dae69316579c37a737cca6fc1121b76ad648999f1b3b9859b252b8e8adb5f9093d8db5ddbe2140fa7135645a8f347be71a5dd9cc46619a9109d4067e1d8083d59a7dbbf124c119d10596a52b92fed2"}],"signed":{"_type":"link","byproducts":{},"command":[],"environment":{},"materials":{},"name":"tag","products":{"gitlab/datadog_checks/__init__.py":{"sha256":"9a3c64b8b00c94da4b4f34618d803d3255808caf21b8afa9195c84b61da66b6a"},"gitlab/datadog_checks/gitlab/__about__.py":{"sha256":"99de42e506b6a61ac5b54cd1f7979537ca135c85018ba62a99ba0fa5237e39d0"},"gitlab/datadog_checks/gitlab/__init__.py":{"sha256":"7e2ca759129ff547ba34900d2cba739046888edd36fc5716f3dbb01d0a00372d"},"gitlab/datadog_checks/gitlab/common.py":{"sha256":"e4709efcdeda37972873ccf50a24154b5232c945e416f3957e0843ecf9403aad"},"gitlab/datadog_checks/gitlab/config_models/__init__.py":{"sha256":"c9cf5c66894430e7edbb00d00613b58ccfd38360f2fe490a23c17cf71ed294dc"},"gitlab/datadog_checks/gitlab/config_models/defaults.py":{"sha256":"90fcf6a403f6d4f9b1c8658227028744f70af24a8a4e41f21e2f0c9f8cc4de0f"},"gitlab/datadog_checks/gitlab/config_models/instance.py":{"sha256":"08a30efae0cb19cff9eeb5dcfb9d89848dd5f20564ab645a6914dcb7f61e2571"},"gitlab/datadog_checks/gitlab/config_models/shared.py":{"sha256":"ff48a3fd24b23705bb1558f4df0e03ed77d565fc9a0cde059113e3c6f2d8f18c"},"gitlab/datadog_checks/gitlab/config_models/validators.py":{"sha256":"0424fe17778b76e1b589b9564d0d543d1b71dba1edd6e5d71a7c528dddf68e0b"},"gitlab/datadog_checks/gitlab/data/conf.yaml.example":{"sha256":"85a1ab3e094a0eeb21d7bb752aad681d43d614603ee716ee3b70e2409880b609"},"gitlab/datadog_checks/gitlab/gitlab.py":{"sha256":"625f7c8b491dbbfe6a647f7d1b5891b359ce69a50a112d73fc30edd9cd309104"},"gitlab/datadog_checks/gitlab/gitlab_v2.py":{"sha256":"f604b04f9a0e72266c2d8546e31ed1f279ac39bd53b5f383bf4c9ee3cdebbd32"},"gitlab/datadog_checks/gitlab/metrics.py":{"sha256":"ddd4b0306cf08936bc19ad600dce017002f8dce337043908cf20d8473ecdede8"},"gitlab/pyproject.toml":{"sha256":"57be80dbe7cc4e43cfeba240440868f13873232b3dac21a5f5bfdf4508501c16"},"gitlab/setup.py":{"sha256":"6072000497f9fbae9689583aa4294996c368c5a25c4fc5d6e7c1ce3cad16f856"},"kafka_consumer/datadog_checks/__init__.py":{"sha256":"9a3c64b8b00c94da4b4f34618d803d3255808caf21b8afa9195c84b61da66b6a"},"kafka_consumer/datadog_checks/kafka_consumer/__about__.py":{"sha256":"c0d0d4f1cf6c1cb6d33cb4d8b4ff01414154a62c76dca52cc6cac692a979fde2"},"kafka_consumer/datadog_checks/kafka_consumer/__init__.py":{"sha256":"5d5a2f991c64a95c96c8713f3179f9d0944682b6bed037b8c34d9f85463ca57c"},"kafka_consumer/datadog_checks/kafka_consumer/client.py":{"sha256":"9bf9561f7ce4e892074d552b2521a212a569b7cbba994dbc6411e3c83454344c"},"kafka_consumer/datadog_checks/kafka_consumer/config.py":{"sha256":"dd5e960e2d498a61877fcc9989501577c975c8947a4db5f325d881fb3beaa72f"},"kafka_consumer/datadog_checks/kafka_consumer/config_models/__init__.py":{"sha256":"c9cf5c66894430e7edbb00d00613b58ccfd38360f2fe490a23c17cf71ed294dc"},"kafka_consumer/datadog_checks/kafka_consumer/config_models/defaults.py":{"sha256":"5c46e0f757deee89e8ffb54fb9c06fb21ddb7fdbf253dcf80f42ae63e0c516fa"},"kafka_consumer/datadog_checks/kafka_consumer/config_models/instance.py":{"sha256":"10ad3f00ae389d32c47d79d2be6de4e85f6d33d616afda64b4220be45ced9be1"},"kafka_consumer/datadog_checks/kafka_consumer/config_models/shared.py":{"sha256":"aaac974b2272d540203aa9822a55bf3601c3d824e03e6ea9bb0ffa3bc316e76a"},"kafka_consumer/datadog_checks/kafka_consumer/config_models/validators.py":{"sha256":"0424fe17778b76e1b589b9564d0d543d1b71dba1edd6e5d71a7c528dddf68e0b"},"kafka_consumer/datadog_checks/kafka_consumer/constants.py":{"sha256":"b57d98ed87808dafe5b26be9d5896e3915eb8db21498e401bcf1e3774e5091c0"},"kafka_consumer/datadog_checks/kafka_consumer/data/conf.yaml.example":{"sha256":"3ae4bb0653c82faa90e2d883a59c559cef1a8f95c3b440f52d4c23505f9c98ce"},"kafka_consumer/datadog_checks/kafka_consumer/kafka_consumer.py":{"sha256":"63c95a463986cb85695b4e65e25f721d2ab71e99c018817e1b00383dfb297047"},"kafka_consumer/pyproject.toml":{"sha256":"dde2f1b102b7bdcd30eaed60d532f13ac67165a26bbc2cd728d8516a47a8d74f"},"mysql/datadog_checks/__init__.py":{"sha256":"9a3c64b8b00c94da4b4f34618d803d3255808caf21b8afa9195c84b61da66b6a"},"mysql/datadog_checks/mysql/__about__.py":{"sha256":"16da6883c8781a8f4ac4b0a3992a669d52b31acd4ba5ce2a031f12f5bb145006"},"mysql/datadog_checks/mysql/__init__.py":{"sha256":"4c8b91ad58403cc613a89e3e3aff174eabc45c5c3341eed2097b92140e14c5b9"},"mysql/datadog_checks/mysql/activity.py":{"sha256":"0209a4253163800b8d4c2505090dc35dc3cf56b67a8808d493be7f26cdb9ef84"},"mysql/datadog_checks/mysql/collection_utils.py":{"sha256":"271fb527672016e0edc77d14bcfe71b4a0b242b9c639d343b12bbb1ce10b7cf7"},"mysql/datadog_checks/mysql/config.py":{"sha256":"ae89a54d85a71dd8e046ab00257d2dc23063b96ffee6910e6ac1a3de430fb53c"},"mysql/datadog_checks/mysql/config_models/__init__.py":{"sha256":"c9cf5c66894430e7edbb00d00613b58ccfd38360f2fe490a23c17cf71ed294dc"},"mysql/datadog_checks/mysql/config_models/defaults.py":{"sha256":"a6085c7683d52b784c07cfcffea03af8d7c4b009a0393e8b88fcbf57b3120fed"},"mysql/datadog_checks/mysql/config_models/instance.py":{"sha256":"c8995178d718fcd5b0275e0907cfda95a469001d78d0af76e818dec4fa67500e"},"mysql/datadog_checks/mysql/config_models/shared.py":{"sha256":"50e1bd92923890c0bf0689416fdb1f5192e49202c10f6798ab5e0e613fe6ede8"},"mysql/datadog_checks/mysql/config_models/validators.py":{"sha256":"9beccee4f007680175106485383200d3b84d198897f0af516b91097f5794586e"},"mysql/datadog_checks/mysql/const.py":{"sha256":"78e1aa8e85be4b8ba1f44bc96f67dc80b8acda2871ae1ba512bc2e66ad1ceba8"},"mysql/datadog_checks/mysql/data/conf.yaml.example":{"sha256":"6dfbbb9423d4dd6758bd77d8ced62c3cf8cfa88c85004801fd65d6d02f027956"},"mysql/datadog_checks/mysql/innodb_metrics.py":{"sha256":"bfd88e338995a7f4ad31d7da0ee8459cc4646842244c29fafa392e2d4cf9a9cc"},"mysql/datadog_checks/mysql/mysql.py":{"sha256":"81d7c3a364b99027308be571850f99146c1ff1c7db00f63cd7a6fc0ef4cc58a7"},"mysql/datadog_checks/mysql/queries.py":{"sha256":"a0dd214a5699c4122ed681dd5f789bb5f979e3afceb2bbc7daea0b5dd5644590"},"mysql/datadog_checks/mysql/statement_samples.py":{"sha256":"c5a0f6befd5141eaceef1f3e0c7211127fa793fa04842995cc7ac1c2f194201b"},"mysql/datadog_checks/mysql/statements.py":{"sha256":"0a2a6c857cf3fadcc321465029f61c93328d92ad6d88afbbf43726c3d6d70dd1"},"mysql/datadog_checks/mysql/util.py":{"sha256":"f79d39b5d7420119d0b3247d45dfae9e287a71426d4c35df9f1cef1bc796b8bb"},"mysql/datadog_checks/mysql/version_utils.py":{"sha256":"393097b6536264021b4421ed8adccbfece01202671cd371409b7a7656b8570c4"},"mysql/pyproject.toml":{"sha256":"5775c7a52ee5f05a0a85ed75df17f339016ae936ba686160f0516ea68b7a080a"},"mysql/setup.py":{"sha256":"50c0c6130948f1edcbddb6e1a984dc0e59fbd14024bb0dff479c8faef180dac3"}}}}
{"signatures":[{"keyid":"ec45eb9dac9d6ba1bcd131314583c67851bebf0d","other_headers":"04000108001d162104ec45eb9dac9d6ba1bcd131314583c67851bebf0d05026581d8f5","signature":"6cedf7126f4040cd80b4286982192cd03cfc9a16fa17bdefd46252d220de841425ee1cd1a31c002c664e74b9ff9212c1f9c28904942bb21013fd68f0ce7fafd48741a1aaeab479a4bb25c3dea7a316efb44edb09ad520a34833f72fcf8b32fdac726c0dccf6b83276c50cc84cfd8d13f7caa8a3488dfbabd2cf1dd0b1586209fab58ba8749d1528a90e4a3d6c07e6d9eb912884742a824852dc63a62e39c151a65f6c02da7e54e4fcf8da64c37943960fb6e4f2412cf3ebb874fd7d5052205fe14a732beec9d1226df55629aabc3a2a460bc7cdafbada80427852599133746fda77fa235eaeee0060525ae56b7da568f4bfffc4d64181fdb7e67c8a27671db2c744e605ed1846748c32e9fa97651d7f063678e64a406a83b7c1568aa1d7fb0872eb5b690521ab06885ac757f0105a726641e5f40fe4f29e1f6cba75c1e9f9d8578519a79bddae538c62122f134fc98a6c379428e47ebca96444f7e3cf02968930d9d606d4ce7bb038b3893c8de345a9836a9c92269596503b9d3946424e8c5b3e1b99a2d8fa089567dc211153225a2898591098573a94e7ec8b4e5263621fce053b8ef2895ba50a518b41b0bdcf4e0021d8d29d8d2fab11b06427e2f0e0d700c84a3a64feeb6fd40090c6bab1ccae9c4e662f190b912dff709be47a8c6d448db7d4ac9e9e53153d54c384b1301a43676a16ff363be78643b30d9c165d95e1c93"}],"signed":{"_type":"link","byproducts":{},"command":[],"environment":{},"materials":{},"name":"tag","products":{"silk/datadog_checks/__init__.py":{"sha256":"9bf116cc5e14139f58802ece354b270c165226e0cd229e867e2cb291b6855643"},"silk/datadog_checks/silk/__about__.py":{"sha256":"f6d78005f0feece137ea6b2537b0cefb2854311530f2e2e5f28881534349e4bf"},"silk/datadog_checks/silk/__init__.py":{"sha256":"d2a12d0771d2a633dc18914ef285ed03686b5c1f917d039a0706a2296081420b"},"silk/datadog_checks/silk/check.py":{"sha256":"8289e16421fa6cdb29f3828a66aac1ed65de9366c8cbee4375212a314f3beae2"},"silk/datadog_checks/silk/config_models/__init__.py":{"sha256":"c9cf5c66894430e7edbb00d00613b58ccfd38360f2fe490a23c17cf71ed294dc"},"silk/datadog_checks/silk/config_models/defaults.py":{"sha256":"1f20d07d53c608977016c4d0c611ebc23f83d273afb1961018842588654ccd6d"},"silk/datadog_checks/silk/config_models/instance.py":{"sha256":"2f42d7615570628b6bcea64fa0cfec904b244d68548a0d0c0678ecc6ed6fee26"},"silk/datadog_checks/silk/config_models/shared.py":{"sha256":"ff48a3fd24b23705bb1558f4df0e03ed77d565fc9a0cde059113e3c6f2d8f18c"},"silk/datadog_checks/silk/config_models/validators.py":{"sha256":"eadaef467b48130997d3dbd2d0b9ac825f61f9b633a35365faa981784faca56e"},"silk/datadog_checks/silk/constants.py":{"sha256":"b02c32310c21e7afbe1e2e5bee5495172ecf4cc5691ec20bf39bec20a6b3f88a"},"silk/datadog_checks/silk/data/conf.yaml.example":{"sha256":"941eda3d2b3349a0de097aa21c4d2b8e1a63478cbaf8110c915a73c08c211544"},"silk/datadog_checks/silk/events.py":{"sha256":"4bda932ebd8af66b2c73e409dd15c415bb9eee76c68f731f6426efdb892031e1"},"silk/datadog_checks/silk/metrics.py":{"sha256":"24940638752a5a9aabbbc47b60725d26da28e022c3888e9f8b7e84894b2d79fb"},"silk/pyproject.toml":{"sha256":"997971481cdfedd6c67dc70fd0c294907f16f2af041ebfaf8d8c20684e8574e5"},"silk/setup.py":{"sha256":"477fc150abb9eeff2fd38c7825ac0c5bbf1dc23f8861316c794432bbf5ca4610"}}}}
16 changes: 16 additions & 0 deletions ddev/src/ddev/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# file generated by setuptools_scm
# don't change, don't track in version control
TYPE_CHECKING = False
if TYPE_CHECKING:
from typing import Tuple, Union
VERSION_TUPLE = Tuple[Union[int, str], ...]
else:
VERSION_TUPLE = object

version: str
__version__: str
__version_tuple__: VERSION_TUPLE
version_tuple: VERSION_TUPLE

__version__ = version = '6.1.1.dev12'
__version_tuple__ = version_tuple = (6, 1, 1, 'dev12')
2 changes: 1 addition & 1 deletion requirements-agent-release.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ datadog-riakcs==2.9.0
datadog-sap-hana==2.2.1
datadog-scylla==2.3.0
datadog-sidekiq==1.3.0
datadog-silk==1.2.2
datadog-silk==1.2.3-rc.2
datadog-singlestore==1.3.1
datadog-snmp==5.11.0
datadog-snowflake==4.5.2
Expand Down
2 changes: 2 additions & 0 deletions silk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## 1.2.2 / 2023-04-14

## 1.2.3-rc.2 / 2023-12-19

* [Fixed] Fix duplicate events bug. See [#14020](https://github.com/DataDog/integrations-core/pull/14020).

## 1.2.1 / 2023-03-03
Expand Down
2 changes: 1 addition & 1 deletion silk/datadog_checks/silk/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
__version__ = '1.2.2'
__version__ = '1.2.3-rc.2'
25 changes: 24 additions & 1 deletion silk/datadog_checks/silk/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from copy import deepcopy
from math import ceil

from six.moves.urllib.parse import urljoin, urlparse

Expand All @@ -26,6 +27,7 @@ def __init__(self, name, init_config, instances):
self.metrics_to_collect = dict(METRICS)

server = self.instance.get("host_address")
self.extend_events_window = self.instance.get("extend_events_window", False)

if server is None:
raise ConfigurationError("host_address is a required parameter.")
Expand Down Expand Up @@ -228,4 +230,25 @@ def collect_events(self, system_tags):
self.log.error("Unable to fetch events: %s", str(e))

# Update latest event query to last event time
self.latest_event_query = collect_events_timestamp
# The logic here is purposely verbose in logging for troubleshooting purposes
if self.extend_events_window:
if len(raw_events) > 0:
last_event_ts = raw_events[-1].get('timestamp')
self.log.debug("Update next event query start timestamp to %s", last_event_ts)
if last_event_ts > self.latest_event_query:
self.latest_event_query = ceil(last_event_ts)
else:
self.log.debug(
"Last event timestamp %s is less than current query window start %s. Keeping the same query window.",
last_event_ts,
self.latest_event_query,
)
self.latest_event_query = collect_events_timestamp
else:
self.log.debug(
"No events found in this query window. Keeping the same query window. Start: %s, end: %s",
self.latest_event_query,
collect_events_timestamp,
)
else:
self.latest_event_query = collect_events_timestamp
Loading