Skip to content

[azure logs] enable event hub processor v2#12802

Merged
zmoog merged 15 commits intoelastic:mainfrom
zmoog:zmoog/azure-logs-inputv2
Mar 10, 2025
Merged

[azure logs] enable event hub processor v2#12802
zmoog merged 15 commits intoelastic:mainfrom
zmoog:zmoog/azure-logs-inputv2

Conversation

@zmoog
Copy link
Copy Markdown
Contributor

@zmoog zmoog commented Feb 17, 2025

Proposed commit message

The PR adds the new processor_version configuration option (an related ones) to enable the azure-eventhub processor v2 in the Azure Logs integration v2 preview.

  • We increase the min stack version to 8.15.1.
  • processor v2 is only available to for integration v2 preview (no integration v1 support)
  • Add storage_account_connection_string config option (required for processor v2); the policy template builds a default value using the storage_account_key but also offers an override option.

The processor v2 uses the modern Event Hub SDK.

Notes for reviewers

In this PR, I am adding the processor v2 settings to the advanced section of the integration v2 only (events data stream).

The goal is to enable only processor v2 for the data stream that can avoid contention among event hub partition consumers.

However, nothing can stop users from enabling v2 AND one or more v1 integrations. So, adding the processor v2 settings to the global scope is better for simplicity.

I would love to hear your thoughts about placing the processor v2 settings: data stream vs. global level.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • Update the integration docs

How to test this PR locally

  • Bootstrap a local stack using elastic-package (min stack version 8.15.1)
  • Build the Azure Logs package
  • Install the Azure Logs integration v2 preview
  • In the integration settings > advanced > set processor_version to v2

Related issues

Screenshots

CleanShot 2025-03-10 at 22 15 01@2x

CleanShot 2025-03-10 at 22 18 54@2x

CleanShot 2025-03-10 at 22 21 10@2x

@zmoog zmoog added enhancement New feature or request Integration:azure Azure Logs Team:obs-ds-hosted-services Observability Hosted Services team [elastic/obs-ds-hosted-services] labels Feb 17, 2025
@zmoog zmoog self-assigned this Feb 17, 2025
@zmoog zmoog linked an issue Feb 17, 2025 that may be closed by this pull request
@zmoog zmoog changed the title [azure logs] Enable azure-eventhub input v2 configuration options [azure logs] enable azure-eventhub input v2 Feb 17, 2025
@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

elastic-vault-github-plugin-prod bot commented Feb 17, 2025

🚀 Benchmarks report

Package azure 👍(8) 💚(2) 💔(1)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
activitylogs 1626.02 1254.71 -371.31 (-22.84%) 💔

To see the full report comment with /test benchmark fullreport

@zmoog zmoog marked this pull request as ready for review February 18, 2025 22:24
@zmoog zmoog requested review from a team as code owners February 18, 2025 22:25
@zmoog zmoog requested review from alaudazzi and muthu-mps February 18, 2025 22:25
@MichaelKatsoulis MichaelKatsoulis self-requested a review February 19, 2025 12:45
@zmoog zmoog added the Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] label Feb 20, 2025
@elasticmachine
Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

storage_account_key: {{storage_account_key}}
{{/if}}
{{#if storage_account_connection_string}}
: {{storage_account_connection_string}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we not processing the storage_account_connection_string through user input?
If this values doesn't come as input from the user, Then we could remove the IF condition. WDYT?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Make sense.

We can change the UI elements once when we'll add the Entra ID authentication options for the processor v2.


The input v2 is in preview. Input v1 is still the default and is recommended for typical use cases.

See the "Settings" section for more details about enabling the input v2.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There are two different settings section, one which covers the details Event hub config and the other has Input v2 settings (advanced). Shouldn't this be input V2 setting?

Screenshot 2025-02-21 at 11 52 28 AM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I should remove the "(advanced)" from the title, and only leave "input/processor v2" only settings.

_boolean_
(v2 only) Flag to control if the input should perform the checkpoint information migration from v1 to v2 at startup. The checkpoint migration converts the checkpoint information from the v1 format to the v2 format.

Default is `false`, which means the input will not perform the checkpoint migration.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The Default can also go as bullet point. In the document it looks as a separate section.

Please see below.

Screenshot 2025-02-21 at 11 49 38 AM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point!

@zmoog zmoog changed the title [azure logs] enable azure-eventhub input v2 [azure logs] enable azure-eventhub processor v2 Feb 24, 2025
@zmoog
Copy link
Copy Markdown
Contributor Author

zmoog commented Feb 24, 2025

I'm also replacing "input" with "processor" in the PR description to simplify.

Copy link
Copy Markdown
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.

LGTM

@zmoog
Copy link
Copy Markdown
Contributor Author

zmoog commented Feb 27, 2025

@muthu-mps @efd6, I pushed a few changes to address the review comments. Could you take a new look at this PR, when you have time? 🙇

Copy link
Copy Markdown
Contributor

@muthu-mps muthu-mps left a comment

Choose a reason for hiding this comment

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

LGTM!

@zmoog
Copy link
Copy Markdown
Contributor Author

zmoog commented Mar 4, 2025

@efd6, could you take another look at the updates in this PR, when you have time? 🙇

Copy link
Copy Markdown
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

LGTM

Made suggestions that I think improve clarity (except the <blink>), but the decision is obviously up to you.

The integration will automatically detect the log category and forward the logs to the appropriate data stream. When the integration v2 preview cannot find a matching data stream for a log category, it forwards the logs to the platform logs data stream.

IMPORTANT: To use the v2 preview, you must turn off all the existing v1 integrations and turn on only the v2 preview integration.
IMPORTANT: **To use the integration v2 preview, you must turn off all the existing v1 integrations and turn on only the v2 preview integration.**
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
IMPORTANT: **To use the integration v2 preview, you must turn off all the existing v1 integrations and turn on only the v2 preview integration.**
IMPORTANT: **<blink>To use the integration v2 preview, you must turn off all the existing v1 integrations and turn on only the v2 preview integration.</blink>**

🤣

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe it's a little too whimsical, but I appreciate it! 😄

zmoog and others added 9 commits March 6, 2025 19:45
Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
We offer no storage_account_connection_string setting option in the
UI yet. We'll revise the UI once for the upcoming Entra ID auth
settings.
Introduces the concept of processor as a configurable option available
starting from stack 8.15.1 and integration 1.23.0.

I removed 'input' because technically, we have one input, with a
a configurable internal component called 'processor.'

Both legacy and modern SDKs identify the 'processor' as the internal
component responsible for processing messages fetched by event hub
partition consumers.
I want to simplify the mental model for the user. From their
perspective, there's the integration. Then the integration now has an
optional 'processor' option with v1 and v2 variants.
Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
@zmoog zmoog force-pushed the zmoog/azure-logs-inputv2 branch from 99d821c to e99283f Compare March 6, 2025 18:45
@zmoog
Copy link
Copy Markdown
Contributor Author

zmoog commented Mar 6, 2025

@efd6, it's ready for another lap!

@zmoog zmoog changed the title [azure logs] enable azure-eventhub processor v2 [azure logs] enable event hub processor v2 Mar 6, 2025
@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

cc @zmoog

@elastic-sonarqube
Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
Image 0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@zmoog zmoog merged commit bbdc042 into elastic:main Mar 10, 2025
6 of 7 checks passed
@zmoog zmoog deleted the zmoog/azure-logs-inputv2 branch March 10, 2025 21:41
@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

Package azure - 1.23.0 containing this change is available at https://epr.elastic.co/package/azure/1.23.0/

flexitrev pushed a commit that referenced this pull request Mar 20, 2025
* Add input v2 configuration options

* Improve config option descriptions

* Update docs and UI elements description

* Clarify + simplify docs & UI descriptions

* Apply suggestions from code review

Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>

* Apply suggestions from code review

Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>

* Remove storage_account_connection_string

We offer no storage_account_connection_string setting option in the
UI yet. We'll revise the UI once for the upcoming Entra ID auth
settings.

* Clarify input v2 only settings

* Update rendered docs

* Replace input with processor in the docs

Introduces the concept of processor as a configurable option available
starting from stack 8.15.1 and integration 1.23.0.

I removed 'input' because technically, we have one input, with a
a configurable internal component called 'processor.'

Both legacy and modern SDKs identify the 'processor' as the internal
component responsible for processing messages fetched by event hub
partition consumers.

* Minor alignment to UI descriptions

* Replace all references to 'input' with 'processor'

I want to simplify the mental model for the user. From their
perspective, there's the integration. Then the integration now has an
optional 'processor' option with v1 and v2 variants.

* Apply suggestions from code review

Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>

* Apply suggestions from code review

Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>

* Updated rendered docs

---------

Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Integration:azure Azure Logs Team:obs-ds-hosted-services Observability Hosted Services team [elastic/obs-ds-hosted-services] Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Azure Logs] Enable azure-eventhub processor v2

5 participants