-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Azure Monitor Exporter - Add IngestionResponsePolicy #16032
Azure Monitor Exporter - Add IngestionResponsePolicy #16032
Conversation
sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ApplicationInsightsRestClient.cs
Outdated
Show resolved
Hide resolved
} | ||
} | ||
catch (Exception ex) | ||
{ | ||
if (ex?.InnerException?.InnerException?.Source == "System.Net.Http") |
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.
@pakrym what's the best practice for Azure SDKs? Relying on the knowledge of inner exception hierarchy seems fragile and could break in the future.
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.
Will merge the PR and follow up with @pakrym for best practice.
sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/IngestionResponsePolicy.cs
Outdated
Show resolved
Hide resolved
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.
LGTM, left couple non-blocking comments.
sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ResponseStatusCodes.cs
Outdated
Show resolved
Hide resolved
sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/IngestionResponsePolicy.cs
Show resolved
Hide resolved
sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ApplicationInsightsRestClient.cs
Show resolved
Hide resolved
* Added IngestionResponsePolicy * check for object is int * Added constant to response code * Added method summary.
Retry
provided with Azure SDKIngestionResponsePolicy
which inherits fromHttpPipelineSynchronousPolicy
. This policy will have ability to check parse response and store to diskApplicationInsightsRestClient
to returnItemsAccepted
onInternalTrackAsync
InternalTrackAsync
overload to send data from storage