Skip to content

[azure monitor] Add latency config option#44366

Merged
zmoog merged 11 commits intomainfrom
zmoog/feat/azure-monitor-latency
May 20, 2025
Merged

[azure monitor] Add latency config option#44366
zmoog merged 11 commits intomainfrom
zmoog/feat/azure-monitor-latency

Conversation

@zmoog
Copy link
Contributor

@zmoog zmoog commented May 19, 2025

Proposed commit message

Add a new latency configuration option to the Azure Monitor metricset.

Latency is the time it takes for the Azure service to publish the metric
values to Azure Monitor. The metricset uses the latency value to
compensate for the delay in metric value publishing.

Default value is 0. Typical values are 30s or 1m.

  |                                                        |
  |                                                        |             Now
  |                                                        │              |
  |                                            time grain  │              |
  │                                          │◀──(PT1M)──▶ │              |
  │                                                        │              |
  ├──────────────────────────────────────────┼─────────────┼──────────────|
  │                                                        │              |
  │                       timespan           │             │              |
  |◀───────────────────────(5min)─────────────────────────▶│              |
  │                                          │             │              |
  |                        period                          │              |
  │◀───────────────────────(5min)─────────────────────────▶|              │
  │                                                        │              |
  │                                                        │              |
  |                                                        │   latency    |
  |                                                        | ◀──(1min)──▶ |
  │                                                        │              |
  │                                                        │              |
Start                                                     End             |
  │                                                        │              |

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

How to test this PR locally

Related issues

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 19, 2025
@github-actions
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify mergify bot assigned zmoog May 19, 2025
@mergify
Copy link
Contributor

mergify bot commented May 19, 2025

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @zmoog? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@zmoog zmoog changed the title Add latency config option [azure monitor] Add latency config option May 19, 2025
@zmoog zmoog marked this pull request as ready for review May 19, 2025 10:46
@zmoog zmoog requested a review from a team as a code owner May 19, 2025 10:46
@zmoog zmoog added Team:obs-ds-hosted-services Label for the Observability Hosted Services team input:azure-monitor labels May 19, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label May 19, 2025
zmoog added 2 commits May 19, 2025 13:21
Eliminates the code duplication to calculate start/end of the metric
values timespan in batch and non-batch versions of getting metric
values.
Copy link
Contributor

@MichaelKatsoulis MichaelKatsoulis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect!

@mergify
Copy link
Contributor

mergify bot commented May 19, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b zmoog/feat/azure-monitor-latency upstream/zmoog/feat/azure-monitor-latency
git merge upstream/main
git push upstream zmoog/feat/azure-monitor-latency

zmoog and others added 2 commits May 19, 2025 19:05
This makes file the build, I'm not sure if/how we beed to update docs
using asciidoc format, or if we should use markdown instead.
@zmoog zmoog added the backport-active-all Automated backport with mergify to all the active branches label May 19, 2025
@zmoog zmoog merged commit 2921bbe into main May 20, 2025
32 checks passed
@zmoog zmoog deleted the zmoog/feat/azure-monitor-latency branch May 20, 2025 08:32
@github-actions
Copy link
Contributor

@Mergifyio backport 8.17 8.18 8.19 9.0

@mergify
Copy link
Contributor

mergify bot commented May 20, 2025

backport 8.17 8.18 8.19 9.0

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request May 20, 2025
Add a new `latency` configuration option to the Azure Monitor metricset.

Latency is the time it takes for the Azure service to publish the metric
values to Azure Monitor. The metricset uses the `latency` value to
compensate for the delay in metric value publishing.

Default value is `0`. Typical values are `30s` or `1m`.

```text
	  |                                                        |
	  |                                                        |             Now
	  |                                                        │              |
	  |                                            time grain  │              |
	  │                                          │◀──(PT1M)──▶ │              |
	  │                                                        │              |
	  ├──────────────────────────────────────────┼─────────────┼──────────────|
	  │                                                        │              |
	  │                       timespan           │             │              |
	  |◀───────────────────────(5min)─────────────────────────▶│              |
	  │                                          │             │              |
	  |                        period                          │              |
	  │◀───────────────────────(5min)─────────────────────────▶|              │
	  │                                                        │              |
	  │                                                        │              |
	  |                                                        │   latency    |
	  |                                                        | ◀──(1min)──▶ |
	  │                                                        │              |
	  │                                                        │              |
	Start                                                     End             |
	  │                                                        │              |
```

(cherry picked from commit 2921bbe)
mergify bot pushed a commit that referenced this pull request May 20, 2025
Add a new `latency` configuration option to the Azure Monitor metricset.

Latency is the time it takes for the Azure service to publish the metric
values to Azure Monitor. The metricset uses the `latency` value to
compensate for the delay in metric value publishing.

Default value is `0`. Typical values are `30s` or `1m`.

```text
	  |                                                        |
	  |                                                        |             Now
	  |                                                        │              |
	  |                                            time grain  │              |
	  │                                          │◀──(PT1M)──▶ │              |
	  │                                                        │              |
	  ├──────────────────────────────────────────┼─────────────┼──────────────|
	  │                                                        │              |
	  │                       timespan           │             │              |
	  |◀───────────────────────(5min)─────────────────────────▶│              |
	  │                                          │             │              |
	  |                        period                          │              |
	  │◀───────────────────────(5min)─────────────────────────▶|              │
	  │                                                        │              |
	  │                                                        │              |
	  |                                                        │   latency    |
	  |                                                        | ◀──(1min)──▶ |
	  │                                                        │              |
	  │                                                        │              |
	Start                                                     End             |
	  │                                                        │              |
```

(cherry picked from commit 2921bbe)
mergify bot pushed a commit that referenced this pull request May 20, 2025
Add a new `latency` configuration option to the Azure Monitor metricset.

Latency is the time it takes for the Azure service to publish the metric
values to Azure Monitor. The metricset uses the `latency` value to
compensate for the delay in metric value publishing.

Default value is `0`. Typical values are `30s` or `1m`.

```text
	  |                                                        |
	  |                                                        |             Now
	  |                                                        │              |
	  |                                            time grain  │              |
	  │                                          │◀──(PT1M)──▶ │              |
	  │                                                        │              |
	  ├──────────────────────────────────────────┼─────────────┼──────────────|
	  │                                                        │              |
	  │                       timespan           │             │              |
	  |◀───────────────────────(5min)─────────────────────────▶│              |
	  │                                          │             │              |
	  |                        period                          │              |
	  │◀───────────────────────(5min)─────────────────────────▶|              │
	  │                                                        │              |
	  │                                                        │              |
	  |                                                        │   latency    |
	  |                                                        | ◀──(1min)──▶ |
	  │                                                        │              |
	  │                                                        │              |
	Start                                                     End             |
	  │                                                        │              |
```

(cherry picked from commit 2921bbe)
mergify bot pushed a commit that referenced this pull request May 20, 2025
Add a new `latency` configuration option to the Azure Monitor metricset.

Latency is the time it takes for the Azure service to publish the metric
values to Azure Monitor. The metricset uses the `latency` value to
compensate for the delay in metric value publishing.

Default value is `0`. Typical values are `30s` or `1m`.

```text
	  |                                                        |
	  |                                                        |             Now
	  |                                                        │              |
	  |                                            time grain  │              |
	  │                                          │◀──(PT1M)──▶ │              |
	  │                                                        │              |
	  ├──────────────────────────────────────────┼─────────────┼──────────────|
	  │                                                        │              |
	  │                       timespan           │             │              |
	  |◀───────────────────────(5min)─────────────────────────▶│              |
	  │                                          │             │              |
	  |                        period                          │              |
	  │◀───────────────────────(5min)─────────────────────────▶|              │
	  │                                                        │              |
	  │                                                        │              |
	  |                                                        │   latency    |
	  |                                                        | ◀──(1min)──▶ |
	  │                                                        │              |
	  │                                                        │              |
	Start                                                     End             |
	  │                                                        │              |
```

(cherry picked from commit 2921bbe)
zmoog added a commit that referenced this pull request May 20, 2025
Add a new `latency` configuration option to the Azure Monitor metricset.

Latency is the time it takes for the Azure service to publish the metric
values to Azure Monitor. The metricset uses the `latency` value to
compensate for the delay in metric value publishing.

Default value is `0`. Typical values are `30s` or `1m`.

```text
	  |                                                        |
	  |                                                        |             Now
	  |                                                        │              |
	  |                                            time grain  │              |
	  │                                          │◀──(PT1M)──▶ │              |
	  │                                                        │              |
	  ├──────────────────────────────────────────┼─────────────┼──────────────|
	  │                                                        │              |
	  │                       timespan           │             │              |
	  |◀───────────────────────(5min)─────────────────────────▶│              |
	  │                                          │             │              |
	  |                        period                          │              |
	  │◀───────────────────────(5min)─────────────────────────▶|              │
	  │                                                        │              |
	  │                                                        │              |
	  |                                                        │   latency    |
	  |                                                        | ◀──(1min)──▶ |
	  │                                                        │              |
	  │                                                        │              |
	Start                                                     End             |
	  │                                                        │              |
```

(cherry picked from commit 2921bbe)

Co-authored-by: Maurizio Branca <maurizio.branca@elastic.co>
zmoog added a commit that referenced this pull request May 20, 2025
Add a new `latency` configuration option to the Azure Monitor metricset.

Latency is the time it takes for the Azure service to publish the metric
values to Azure Monitor. The metricset uses the `latency` value to
compensate for the delay in metric value publishing.

Default value is `0`. Typical values are `30s` or `1m`.

```text
	  |                                                        |
	  |                                                        |             Now
	  |                                                        │              |
	  |                                            time grain  │              |
	  │                                          │◀──(PT1M)──▶ │              |
	  │                                                        │              |
	  ├──────────────────────────────────────────┼─────────────┼──────────────|
	  │                                                        │              |
	  │                       timespan           │             │              |
	  |◀───────────────────────(5min)─────────────────────────▶│              |
	  │                                          │             │              |
	  |                        period                          │              |
	  │◀───────────────────────(5min)─────────────────────────▶|              │
	  │                                                        │              |
	  │                                                        │              |
	  |                                                        │   latency    |
	  |                                                        | ◀──(1min)──▶ |
	  │                                                        │              |
	  │                                                        │              |
	Start                                                     End             |
	  │                                                        │              |
```

(cherry picked from commit 2921bbe)

Co-authored-by: Maurizio Branca <maurizio.branca@elastic.co>
zmoog added a commit that referenced this pull request May 20, 2025
Add a new `latency` configuration option to the Azure Monitor metricset.

Latency is the time it takes for the Azure service to publish the metric
values to Azure Monitor. The metricset uses the `latency` value to
compensate for the delay in metric value publishing.

Default value is `0`. Typical values are `30s` or `1m`.

```text
	  |                                                        |
	  |                                                        |             Now
	  |                                                        │              |
	  |                                            time grain  │              |
	  │                                          │◀──(PT1M)──▶ │              |
	  │                                                        │              |
	  ├──────────────────────────────────────────┼─────────────┼──────────────|
	  │                                                        │              |
	  │                       timespan           │             │              |
	  |◀───────────────────────(5min)─────────────────────────▶│              |
	  │                                          │             │              |
	  |                        period                          │              |
	  │◀───────────────────────(5min)─────────────────────────▶|              │
	  │                                                        │              |
	  │                                                        │              |
	  |                                                        │   latency    |
	  |                                                        | ◀──(1min)──▶ |
	  │                                                        │              |
	  │                                                        │              |
	Start                                                     End             |
	  │                                                        │              |
```

(cherry picked from commit 2921bbe)

Co-authored-by: Maurizio Branca <maurizio.branca@elastic.co>
zmoog added a commit that referenced this pull request May 20, 2025
Add a new `latency` configuration option to the Azure Monitor metricset.

Latency is the time it takes for the Azure service to publish the metric
values to Azure Monitor. The metricset uses the `latency` value to
compensate for the delay in metric value publishing.

Default value is `0`. Typical values are `30s` or `1m`.

```text
	  |                                                        |
	  |                                                        |             Now
	  |                                                        │              |
	  |                                            time grain  │              |
	  │                                          │◀──(PT1M)──▶ │              |
	  │                                                        │              |
	  ├──────────────────────────────────────────┼─────────────┼──────────────|
	  │                                                        │              |
	  │                       timespan           │             │              |
	  |◀───────────────────────(5min)─────────────────────────▶│              |
	  │                                          │             │              |
	  |                        period                          │              |
	  │◀───────────────────────(5min)─────────────────────────▶|              │
	  │                                                        │              |
	  │                                                        │              |
	  |                                                        │   latency    |
	  |                                                        | ◀──(1min)──▶ |
	  │                                                        │              |
	  │                                                        │              |
	Start                                                     End             |
	  │                                                        │              |
```

(cherry picked from commit 2921bbe)

Co-authored-by: Maurizio Branca <maurizio.branca@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches input:azure-monitor Team:obs-ds-hosted-services Label for the Observability Hosted Services team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add latency in Azure resource metrics integrations

4 participants