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

[Event Hubs] Tracing: Periodic calls to getEventHubProperties reported on unrelated operation #32549

Open
2 of 6 tasks
yoshigev opened this issue Jan 14, 2025 · 1 comment
Open
2 of 6 tasks
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Event Hubs question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@yoshigev
Copy link

yoshigev commented Jan 14, 2025

  • Package Name: @azure/event-hubs
  • Package Version: 5.12.2
  • Operating system: Linux
  • nodejs
    • version: 22.10.1
  • browser
    • name/version: N/A
  • typescript
    • version: 5.7.2
  • Is the bug related to documentation in

Describe the bug
We have a NodeJS service that sends events to an event hub as part of handling an incoming HTTP request.

We use Application Insights, and when looking at transaction of the first HTTP request that the service has handled, we see that there are many unrelated logs that are reported on this HTTP request.

The logs are of a periodic tasks that starts with "EnvironmentCredential.getToken" and ends with "ManagementClient.getEventHubProperties", as seen in the screenshot below.

To Reproduce
Send events as part of an HTTP transaction.

Expected behavior
I expect that those periodic tasks will use their own operation without a parent.

Screenshots
Image

Additional context
I have several questions regarding this behavior:

  1. Is the periodic task really needed if we're just the producer and not the consumer?
  2. Just came to my mind that we are actively calling the method client.getPartitionIds() as an health check. Can it be the trigger to my problem?
  3. Looking for a workaround - Is there anything besides sending an actual event that can trigger the periodic job, so I could start it outside any context?

Thanks,

Yehoshua

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 14, 2025
@jeremymeng jeremymeng added Event Hubs Client This issue points to a problem in the data-plane of the library. labels Jan 14, 2025
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jan 14, 2025
@deyaaeldeen
Copy link
Member

deyaaeldeen commented Jan 21, 2025

Hi @yoshigev, thank you for opening this report.

Is the periodic task really needed if we're just the producer and not the consumer?

The client is built on the AMQP protocol, where the connection is established once and persists. To ensure proper client authentication and authorization, the periodic task is essential.

Just came to my mind that we are actively calling the method client.getPartitionIds() as a health check. Can it be the trigger to my problem?

The getPartitionIds method internally invokes getEventHubProperties, so it’s expected to see traces of the latter in your insights.

Looking for a workaround - Is there anything besides sending an actual event that can trigger the periodic job, so I could start it outside any context?

The getPartitionIds method accepts a tracingOptions option, which might provide a way to adjust the tracing behavior. @mpodwysocki, do you have any suggestions on how we might assign the getPartitionIds trace to a distinct parent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Event Hubs question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants