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

Add options to configure tracing #1545

Merged
merged 1 commit into from
Mar 9, 2025
Merged

Add options to configure tracing #1545

merged 1 commit into from
Mar 9, 2025

Conversation

bgrainger
Copy link
Member

Fixes #1524

@Tobbeman
Copy link

Looking forward to this change!
What is the timeplan for a merge and release?

@bgrainger
Copy link
Member Author

As per the milestone assigned to this PR, the current plan is to add this new API in 2.5.0.

@bgrainger bgrainger requested a review from Copilot March 8, 2025 20:47

Choose a reason for hiding this comment

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

PR Overview

This PR adds configurable tracing options to the MySqlConnector, allowing users to enable or disable the emission of the "read-result-set-header" event. Key changes include the introduction of tracing option and builder classes, integration of the tracing options in core data source and result set logic, and new integration tests to validate the event behavior.

Reviewed Changes

File Description
src/MySqlConnector/MySqlConnectorTracingOptions.cs Adds a new options class with a flag for enabling the result set header event.
tests/IntegrationTests/ActivityTests.cs Introduces integration tests for the new tracing event functionality.
src/MySqlConnector/MySqlConnectorTracingOptionsBuilder.cs Implements a builder to configure the tracing options.
src/MySqlConnector/Core/ResultSet.cs Modifies the result set reading logic to conditionally add the tracing event.
src/MySqlConnector/MySqlDataSourceBuilder.cs Updates the builder to include tracing configuration callbacks.
src/MySqlConnector/MySqlDataSource.cs Propagates the tracing options and sets the default if none provided.
src/MySqlConnector/MySqlConnection.cs Exposes a property to access the associated MySqlDataSource.

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

@bgrainger bgrainger merged commit 3692305 into master Mar 9, 2025
23 checks passed
@bgrainger bgrainger deleted the tracing-options branch March 9, 2025 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Spammed by 'read-result-set-header' traces in application insights
2 participants