-
Notifications
You must be signed in to change notification settings - Fork 45
Add WithHttpClient option support to azkustoingest package #312
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
Conversation
Co-authored-by: AsafMah <[email protected]>
Co-authored-by: AsafMah <[email protected]>
|
Can you update the changelog file? |
Co-authored-by: AsafMah <[email protected]>
Updated the CHANGELOG.md file with the new WithHttpClient feature in commit 450b317. |
|
Fix the tests |
Subject: [PATCH] RenameIndex: azkustodata/example_iterative_query_test.go
|
Co-authored-by: AsafMah <[email protected]>
Fixed the example function names to follow Go naming conventions in commit d7b4d66. The functions are now properly named:
All tests now pass without build errors. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
CHANGELOG.md
Outdated
|
|
||
| ### Added | ||
| - `WithHttpClient` option support for all ingest client types (`New`, `NewStreaming`, `NewManaged`) to enable custom HTTP client configuration and instrumentation such as OpenTelemetry | ||
| - `HttpClient()` method for `Ingestion` and `Streaming` clients to access the underlying HTTP client |
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.
Why are those needed though?
Who needs to deconstruct the composed object in that way?
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.
The HttpClient() getter methods provide access to the underlying HTTP client for instrumentation and monitoring purposes. Users may need to check client configuration, add middleware, or verify that custom HTTP clients (like those with OpenTelemetry instrumentation) are properly configured. This follows the same pattern as the existing azkustodata package.
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.
Since the change no longer includes APIs to get the underlying http client back, please update the docs
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.
@copilot Since the change no longer includes APIs to get the underlying http client back, please update the docs
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.
Updated the CHANGELOG.md to remove references to the HTTP client getter methods since they were removed in commit 90d278b.
Co-authored-by: yogilad <[email protected]>
|
Co-authored-by: AsafMah <[email protected]>
Removed the HTTP client getter methods (HttpClient, QueuedHttpClient, StreamingHttpClient) and updated tests to access private fields directly instead. Tests now validate the custom HTTP client using Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: AsafMah <[email protected]>
This PR adds support for overriding the HTTP client in the
azkustoingestpackage to match the functionality already available inazkustodata. This enables users to add instrumentation like OpenTelemetry by providing a custom HTTP client with an instrumented transport.Problem
Previously, while
azkustodatasupported theWithHttpClientoption:The
azkustoingestpackage did not support this option, making it impossible to instrument ingest clients for observability.Solution
Added
WithHttpClientoption support for all three ingest client types:Queued Ingestion
Streaming Ingestion
Managed Ingestion
Changes Made
httpClientfield toIngestionstructWithHttpClient(client *http.Client) Optionfunction iningestion_options.goNew(),NewStreaming(), andNewManaged()to pass HTTP client option to underlyingazkustodata.New()callsHttpClient()methods toIngestionandStreamingstructs for public accessQueuedHttpClient()andStreamingHttpClient()methods toManagedstructnet/httpwhere neededTesting
All existing tests continue to pass, and new tests verify the functionality works correctly for all three client types. The implementation maintains full backward compatibility.
Fixes #311.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
statusreturner.azurewebsites.net/tmp/go-build2116896783/b316/etoe.test -test.testlogfile=/tmp/go-build2116896783/b316/testlog.txt -test.paniconexit0 -test.short=true -test.timeout=30s(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.