-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Azure Monitor: fix metric timespan to restore Storage Account PT1H metrics #40367
Azure Monitor: fix metric timespan to restore Storage Account PT1H metrics #40367
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
f86e730
to
cda2f82
Compare
Add one test for each expected use case.
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…trics (#40367) Move the timespan logic into a dedicated `buildTimespan()` function with a test for each supported use case. Some Azure services have longer latency between service usage and metric availability. For example, the Storage Account capacity metrics (Blob capacity, etc.) have a PT1H time grain and become available after one hour. Service X also has PT1H metrics, however become available after a few minutes. This PR restores the core of the [older timespan logic](https://github.com/elastic/beats/blob/d3facc808d2ba293a42b2ad3fc8e21b66c5f2a7f/x-pack/metricbeat/module/azure/client.go#L110-L116) the Azure Monitor metricset was using before the regression introduced by the PR #36823. However, the `buildTimespan()` does not restore the `interval * (-2)` part because doubling the interval causes duplicates. (cherry picked from commit 5fccb0d)
…trics (#40367) Move the timespan logic into a dedicated `buildTimespan()` function with a test for each supported use case. Some Azure services have longer latency between service usage and metric availability. For example, the Storage Account capacity metrics (Blob capacity, etc.) have a PT1H time grain and become available after one hour. Service X also has PT1H metrics, however become available after a few minutes. This PR restores the core of the [older timespan logic](https://github.com/elastic/beats/blob/d3facc808d2ba293a42b2ad3fc8e21b66c5f2a7f/x-pack/metricbeat/module/azure/client.go#L110-L116) the Azure Monitor metricset was using before the regression introduced by the PR #36823. However, the `buildTimespan()` does not restore the `interval * (-2)` part because doubling the interval causes duplicates. (cherry picked from commit 5fccb0d)
…trics (#40367) (#40414) Move the timespan logic into a dedicated `buildTimespan()` function with a test for each supported use case. Some Azure services have longer latency between service usage and metric availability. For example, the Storage Account capacity metrics (Blob capacity, etc.) have a PT1H time grain and become available after one hour. Service X also has PT1H metrics, however become available after a few minutes. This PR restores the core of the [older timespan logic](https://github.com/elastic/beats/blob/d3facc808d2ba293a42b2ad3fc8e21b66c5f2a7f/x-pack/metricbeat/module/azure/client.go#L110-L116) the Azure Monitor metricset was using before the regression introduced by the PR #36823. However, the `buildTimespan()` does not restore the `interval * (-2)` part because doubling the interval causes duplicates. (cherry picked from commit 5fccb0d) Co-authored-by: Maurizio Branca <maurizio.branca@elastic.co>
…trics (#40367) (#40413) Move the timespan logic into a dedicated `buildTimespan()` function with a test for each supported use case. Some Azure services have longer latency between service usage and metric availability. For example, the Storage Account capacity metrics (Blob capacity, etc.) have a PT1H time grain and become available after one hour. Service X also has PT1H metrics, however become available after a few minutes. This PR restores the core of the [older timespan logic](https://github.com/elastic/beats/blob/d3facc808d2ba293a42b2ad3fc8e21b66c5f2a7f/x-pack/metricbeat/module/azure/client.go#L110-L116) the Azure Monitor metricset was using before the regression introduced by the PR #36823. However, the `buildTimespan()` does not restore the `interval * (-2)` part because doubling the interval causes duplicates. (cherry picked from commit 5fccb0d) Co-authored-by: Maurizio Branca <maurizio.branca@elastic.co>
Proposed commit message
Move the timespan logic into a dedicated
buildTimespan()
function with a test for each supported use case.Some Azure services have longer latency between service usage and metric availability. For example, the Storage Account capacity metrics (Blob capacity, etc.) have a PT1H time grain and become available after one hour. Service X also has PT1H metrics, however become available after a few minutes.
This PR restores the core of the older timespan logic the Azure Monitor metricset was using before the regression introduced by the PR #36823.
However, the
buildTimespan()
does not restore theinterval * (-2)
part because doubling the interval causes duplicates.Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
Microsoft.ContainerRegistry/registries
metrics (PT1M and PT1H)Microsoft.ContainerInstance/containerGroups
metrics (PT5M)Microsoft.KeyVault/vaults
metrics (PT1M)Related issues