Skip to content

Azure Logs: Expand the integration docs adding a section for Event Hub partitions - #10583

Merged
zmoog merged 8 commits into
elastic:mainfrom
zmoog:zmoog/eventhub-partitions-docs
Aug 5, 2024
Merged

Azure Logs: Expand the integration docs adding a section for Event Hub partitions#10583
zmoog merged 8 commits into
elastic:mainfrom
zmoog:zmoog/eventhub-partitions-docs

Conversation

@zmoog

@zmoog zmoog commented Jul 24, 2024

Copy link
Copy Markdown
Contributor

Proposed commit message

Extend the Azure Logs integration docs adding a section dedicated to setting up event hub partitions.

The existing docs didn't cover event hub partitions, leaving the responsibility of reading the Microsoft documentation. This PR gives guidance on the event hub partitions, linking to Microsoft docs for advanced use cases.

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.

Related issues

@zmoog zmoog added documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. Integration:azure Azure Logs Team:obs-ds-hosted-services Observability Hosted Services team [elastic/obs-ds-hosted-services] labels Jul 24, 2024
@zmoog zmoog self-assigned this Jul 24, 2024
@zmoog
zmoog force-pushed the zmoog/eventhub-partitions-docs branch from 0f9c076 to 748c725 Compare July 26, 2024 15:44
@zmoog zmoog changed the title Add 'How many partitions?' section Jul 26, 2024
@zmoog
zmoog marked this pull request as ready for review July 26, 2024 15:53
@zmoog
zmoog requested review from a team as code owners July 26, 2024 15:53
@zmoog
zmoog requested a review from alaudazzi July 26, 2024 15:53
@elasticmachine

elasticmachine commented Jul 26, 2024

Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

Comment thread packages/azure/_dev/build/docs/README.md Outdated
zmoog and others added 2 commits July 29, 2024 10:55
Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>

#### How many partitions?

The number of partitions is essential to balance Event Hub cost and performance.

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.

As we represent the Event Hub in different cases in the multiple places. Some places we do have the Event hub. To make this consistent, I would recommend to keep lower case in the descriptions and the titles as Event Hub.

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. Let me review the doc to improve consistency!

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.

After reading the following docs:

@alaudazzi @muthu-mps, I'm reviewing the _dev/docs/README.md following these rules:

  • "Event Hubs" for the service name
  • "event hub" for the actual event hub

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.

After reading https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/diagnostic-settings, I'm also updating the capitalization of diagnostic settings.

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'm not 100% sure about how to capitalize the names in the diagrams. @alaudazzi, let me know what you think!

@alaudazzi alaudazzi left a comment

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.

Left a few minor editing suggestions, other LGTM.
More generally, you might want to check if event hub is capitalized consistently.

Comment thread packages/azure/_dev/build/docs/README.md Outdated
Comment thread packages/azure/_dev/build/docs/README.md Outdated
Comment thread packages/azure/_dev/build/docs/README.md Outdated
Comment thread packages/azure/docs/README.md Outdated
Comment thread packages/azure/docs/README.md Outdated
Comment thread packages/azure/docs/README.md Outdated
zmoog and others added 3 commits July 31, 2024 18:18
@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @zmoog


With more than one Agent, setting the number of partitions is crucial. The agents share the existing partitions to scale out performance and improve availability.

The number of partitions must be at least the number of agents.

@tetianakravchenko tetianakravchenko Aug 1, 2024

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.

looking to the diagram below - is it possible that first agent when starting create workers for all partitions, so when second agent starts - there are no "free" partitions?
correctly I understand that it is not possible that workers of different agents are picking the same partition?

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.

The agents use blobs in a storage account to share two kinds of information: partition ownership 1 and checkpoint information.

For example, when the input starts:

  • it leases the blob for the partition
  • reads the checkpoint info
  • and sets the ownership.

If there's another input from another agent using the same agent policy, this input knows that another input claimed that partition and moves to the next partition.

The processor v2 (thanks to the modern event hub SDK) offers a configurable load balancing strategy for partition claiming.

From sdk/messaging/azeventhubs/processor.go;

ProcessorStrategyBalanced will attempt to claim a single partition at a time, until each active owner has an equal share of partitions.

Footnotes

  1. The implementation details differ between processors v1 and v2. Processor v1 stores the ownership information in a JSON document, while processor v2 stores it as blob metadata.

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.

Thanks for the detailed explanation!

@muthu-mps muthu-mps left a comment

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.

LGTM!

@zmoog
zmoog merged commit 8d5a1c3 into elastic:main Aug 5, 2024
@zmoog
zmoog deleted the zmoog/eventhub-partitions-docs branch August 5, 2024 08:13
@elasticmachine

Copy link
Copy Markdown

Package azure - 1.13.1 containing this change is available at https://epr.elastic.co/search?package=azure

harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
…b partitions (elastic#10583)

Extend the Azure Logs integration docs, adding a section dedicated to setting up event hub partitions.

The existing documentation didn't cover event hub partitions, leaving the responsibility of reading the Microsoft documentation. This PR gives guidance on the event hub partitions, linking to Microsoft docs for advanced use cases.

---------

Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
Co-authored-by: Arianna Laudazzi <46651782+alaudazzi@users.noreply.github.com>
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
…b partitions (elastic#10583)

Extend the Azure Logs integration docs, adding a section dedicated to setting up event hub partitions.

The existing documentation didn't cover event hub partitions, leaving the responsibility of reading the Microsoft documentation. This PR gives guidance on the event hub partitions, linking to Microsoft docs for advanced use cases.

---------

Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
Co-authored-by: Arianna Laudazzi <46651782+alaudazzi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. Integration:azure Azure Logs Team:obs-ds-hosted-services Observability Hosted Services team [elastic/obs-ds-hosted-services]

6 participants