Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e68a56c
feat(csharp/src/Drivers/BigQuery): instrument OTel exporters for BigQ…
birschick-bq Aug 18, 2025
2e511ee
small improvement
birschick-bq Aug 18, 2025
d5e34d5
reworked static initialization. added REAME.md docs
birschick-bq Aug 19, 2025
c1cd4da
add unit test to ensure adbcfile exporter creates files in the expect…
birschick-bq Aug 19, 2025
a3f475b
modify test to be more reliable.
birschick-bq Aug 20, 2025
98ae2a0
Merge branch 'main' into dev/birschick-bq/bigquery-exporter
birschick-bq Aug 21, 2025
1e1cf4e
Fix a number of problems that cause tracing to fail. Added tests. Add…
birschick-bq Aug 21, 2025
c3b38aa
Merge branch 'main' into dev/birschick-bq/bigquery-exporter
birschick-bq Aug 28, 2025
ea5f0a5
Merge branch 'main' into dev/birschick-bq/bigquery-exporter
birschick-bq Sep 3, 2025
c4ae06e
feat(csharp/src/Telemetry/Traces/Exporters): refactor and improve per…
birschick-bq Sep 5, 2025
532f2c0
add automated unit tests
birschick-bq Sep 5, 2025
c97f97d
restore a previous default
birschick-bq Sep 5, 2025
c886b82
attempt test stability
birschick-bq Sep 5, 2025
48dbbad
attempt test stability #2
birschick-bq Sep 5, 2025
265de5d
attempt test stability - 3
birschick-bq Sep 5, 2025
c3ca343
attempt test stability - 4
birschick-bq Sep 5, 2025
f55bf3c
attempt test stability - 5
birschick-bq Sep 5, 2025
90bbc4a
Merge branch 'main' into dev/birschick-bq/improve-file-exporter
birschick-bq Sep 7, 2025
21173e6
Merge branch 'main' into dev/birschick-bq/bigquery-exporter
birschick-bq Sep 7, 2025
20bb6c2
Merge branch 'dev/birschick-bq/improve-file-exporter' into dev/birsch…
birschick-bq Sep 7, 2025
f829caa
Attempt test stability - 5
birschick-bq Sep 7, 2025
3fb86a4
Attempt test stability - 5
birschick-bq Sep 7, 2025
3886446
Improve error handling and reduce number of retries.
birschick-bq Sep 8, 2025
8881bcf
Improve file name to avoid file name clash
birschick-bq Sep 8, 2025
b0bae4e
Improve back-off for file create.
birschick-bq Sep 8, 2025
607355c
Improve error handling - 2.
birschick-bq Sep 8, 2025
b3c6c0c
Merge branch 'dev/birschick-bq/improve-file-exporter' into dev/birsch…
birschick-bq Sep 9, 2025
da686c6
Merge branch 'main' into dev/birschick-bq/bigquery-exporter
birschick-bq Sep 15, 2025
bc43c31
Merge branch 'main' into dev/birschick-bq/bigquery-exporter
birschick-bq Sep 18, 2025
0b8c510
remove unit test script update
birschick-bq Sep 18, 2025
ac66860
corrected formatting
birschick-bq Sep 18, 2025
429d8ae
Add light-weight Listeners
birschick-bq Sep 19, 2025
03236d6
remove unnecessary using statements
birschick-bq Sep 19, 2025
76cb74f
add explanitory comments
birschick-bq Sep 19, 2025
12ea879
add README updates
birschick-bq Sep 19, 2025
443b8df
add README updates - 2
birschick-bq Sep 19, 2025
260f8f0
minor changes
birschick-bq Sep 20, 2025
31aa647
code review changes - 1
birschick-bq Sep 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions csharp/Apache.Arrow.Adbc.sln
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Exporters", "Exporters", "{
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Arrow.Adbc.Tests.Telemetry.Traces.Exporters", "test\Telemetry\Traces\Exporters\Apache.Arrow.Adbc.Tests.Telemetry.Traces.Exporters.csproj", "{1558BC4B-6E76-434B-8877-6C49B1460544}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Listeners", "Listeners", "{53C45FD3-7277-49FA-AEEB-DF8F2386ECAA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Listeners", "Listeners", "{1C530561-1008-4F39-B437-15B2FD59EAC9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Arrow.Adbc.Tests.Telemetry.Traces.Listeners", "test\Telemetry\Traces\Listeners\Apache.Arrow.Adbc.Tests.Telemetry.Traces.Listeners.csproj", "{9CE9106B-ACBB-54C1-DE57-370E5CF09363}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Arrow.Adbc.Telemetry.Traces.Listeners", "src\Telemetry\Traces\Listeners\Apache.Arrow.Adbc.Telemetry.Traces.Listeners.csproj", "{4D5ADA1A-2DEE-5860-2351-221090CF4442}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -136,6 +144,14 @@ Global
{1558BC4B-6E76-434B-8877-6C49B1460544}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1558BC4B-6E76-434B-8877-6C49B1460544}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1558BC4B-6E76-434B-8877-6C49B1460544}.Release|Any CPU.Build.0 = Release|Any CPU
{9CE9106B-ACBB-54C1-DE57-370E5CF09363}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9CE9106B-ACBB-54C1-DE57-370E5CF09363}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9CE9106B-ACBB-54C1-DE57-370E5CF09363}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9CE9106B-ACBB-54C1-DE57-370E5CF09363}.Release|Any CPU.Build.0 = Release|Any CPU
{4D5ADA1A-2DEE-5860-2351-221090CF4442}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4D5ADA1A-2DEE-5860-2351-221090CF4442}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D5ADA1A-2DEE-5860-2351-221090CF4442}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D5ADA1A-2DEE-5860-2351-221090CF4442}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -164,6 +180,10 @@ Global
{B74532A7-8A78-4AD9-9B2E-584765491E48} = {9FE39661-2A39-4E9F-A5F2-11FB0D54CB42}
{43910445-FEC4-4AEC-A698-6A48327600C3} = {B74532A7-8A78-4AD9-9B2E-584765491E48}
{1558BC4B-6E76-434B-8877-6C49B1460544} = {43910445-FEC4-4AEC-A698-6A48327600C3}
{53C45FD3-7277-49FA-AEEB-DF8F2386ECAA} = {B74532A7-8A78-4AD9-9B2E-584765491E48}
{1C530561-1008-4F39-B437-15B2FD59EAC9} = {22EF23A3-1566-446F-B696-9323F3B6F56C}
{9CE9106B-ACBB-54C1-DE57-370E5CF09363} = {53C45FD3-7277-49FA-AEEB-DF8F2386ECAA}
{4D5ADA1A-2DEE-5860-2351-221090CF4442} = {1C530561-1008-4F39-B437-15B2FD59EAC9}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4795CF16-0FDB-4BE0-9768-5CF31564DC03}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<ItemGroup>
<ProjectReference Include="..\..\Apache.Arrow.Adbc\Apache.Arrow.Adbc.csproj" />
<ProjectReference Include="..\..\Telemetry\Traces\Listeners\Apache.Arrow.Adbc.Telemetry.Traces.Listeners.csproj" />
</ItemGroup>

</Project>
35 changes: 34 additions & 1 deletion csharp/src/Drivers/Apache/Hive2/HiveServer2Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
using System.Threading.Tasks;
using Apache.Arrow.Adbc.Drivers.Apache.Thrift;
using Apache.Arrow.Adbc.Extensions;
using Apache.Arrow.Adbc.Telemetry.Traces.Listeners;
using Apache.Arrow.Adbc.Telemetry.Traces.Listeners.FileListener;
using Apache.Arrow.Adbc.Tracing;
using Apache.Arrow.Ipc;
using Apache.Arrow.Types;
Expand All @@ -49,6 +51,9 @@ internal abstract class HiveServer2Connection : TracingConnection
private readonly Lazy<string> _vendorVersion;
private readonly Lazy<string> _vendorName;
private bool _isDisposed;
// Note: this needs to be set before the constructor runs
private readonly string _traceInstanceId = Guid.NewGuid().ToString("N");
private readonly FileActivityListener? _fileActivityListener;

readonly AdbcInfoCode[] infoSupportedCodes = [
AdbcInfoCode.DriverName,
Expand Down Expand Up @@ -278,6 +283,8 @@ internal HiveServer2Connection(IReadOnlyDictionary<string, string> properties)
{
Properties = properties;

TryInitTracerProvider(out _fileActivityListener);

// Note: "LazyThreadSafetyMode.PublicationOnly" is thread-safe initialization where
// the first successful thread sets the value. If an exception is thrown, initialization
// will retry until it successfully returns a value without an exception.
Expand All @@ -294,6 +301,31 @@ internal HiveServer2Connection(IReadOnlyDictionary<string, string> properties)
}
}

private bool TryInitTracerProvider(out FileActivityListener? fileActivityListener)
{
Properties.TryGetValue(ListenersOptions.Exporter, out string? exporterOption);
// This listener will only listen for activity from this specific connection instance.
bool shouldListenTo(ActivitySource source) => source.Tags?.Any(t => ReferenceEquals(t.Key, _traceInstanceId)) == true;
return FileActivityListener.TryActivateFileListener(AssemblyName, exporterOption, out fileActivityListener, shouldListenTo: shouldListenTo);
}

public override IEnumerable<KeyValuePair<string, object?>>? GetActivitySourceTags(IReadOnlyDictionary<string, string> properties)
{
IEnumerable<KeyValuePair<string, object?>>? tags = base.GetActivitySourceTags(properties);
tags ??= [];
tags = tags.Concat([new(_traceInstanceId, null)]);
return tags;
}

/// <summary>
/// Conditional used to determines if it is safe to trace
/// </summary>
/// <remarks>
/// It is safe to write to some output types (ie, files) but not others (ie, a shared resource).
/// </remarks>
/// <returns></returns>
internal bool IsSafeToTrace => _fileActivityListener != null;

internal TCLIService.IAsync Client
{
get { return _client ?? throw new InvalidOperationException("connection not open"); }
Expand Down Expand Up @@ -732,6 +764,7 @@ protected override void Dispose(bool disposing)
if (!_isDisposed && disposing)
{
DisposeClient();
_fileActivityListener?.Dispose();
_isDisposed = true;
}
base.Dispose(disposing);
Expand Down Expand Up @@ -1540,7 +1573,7 @@ public override IArrowArrayStream GetInfo(IReadOnlyList<AdbcInfoCode> codes)
nullCount++;
break;
}
ActivityExtensions.AddTag(activity, tagKey, tagValue);
Tracing.ActivityExtensions.AddTag(activity, tagKey, tagValue);
}

StructType entryType = new StructType(
Expand Down
31 changes: 31 additions & 0 deletions csharp/src/Drivers/Apache/Hive2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,34 @@ The Collector can be configure to receive trace messages from the driver and exp
Ensure to set the [environment variable](https://opentelemetry.io/docs/specs/otel/protocol/exporter/) `OTEL_EXPORTER_OTLP_INSECURE` to `true`, in this scenario.

Ensure to follow [Collector configuration best practices](https://opentelemetry.io/docs/security/config-best-practices/).

## Tracing

### Tracing Exporters

To enable tracing messages to be observed, a tracing exporter needs to be activated.
Use either the environment variable `OTEL_TRACES_EXPORTER` or the parameter `adbc.traces.exporter` to select one of the
supported exporters. The parameter has precedence over the environment variable. The parameter must be set before
the connection is initialized.

The following exporters are supported:

| Exporter | Description |
| --- | --- |
| `adbcfile` | Exports traces to rotating files in a folder. |

#### File Exporter (adbcfile)

Rotating trace files are written to a folder. The file names are created with the following pattern:
`apache.arrow.adbc.drivers.bigquery-<YYYY-MM-DD-HH-mm-ss-fff>-<process-id>.log`.

The folder used depends on the platform.

| Platform | Folder |
| --- | --- |
| Windows | `%LOCALAPPDATA%/Apache.Arrow.Adbc/Traces` |
| macOS | `$HOME/Library/Application Support/Apache.Arrow.Adbc/Traces` |
| Linux | `$HOME/.local/share/Apache.Arrow.Adbc/Traces` |

By default, up to 999 files of maximum size 1024 KB are written to
the trace folder.
31 changes: 31 additions & 0 deletions csharp/src/Drivers/Apache/Impala/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,34 @@ The Collector can be configure to receive trace messages from the driver and exp
Ensure to set the [environment variable](https://opentelemetry.io/docs/specs/otel/protocol/exporter/) `OTEL_EXPORTER_OTLP_INSECURE` to `true`, in this scenario.

Ensure to follow [Collector configuration best practices](https://opentelemetry.io/docs/security/config-best-practices/).

## Tracing

### Tracing Exporters

To enable tracing messages to be observed, a tracing exporter needs to be activated.
Use either the environment variable `OTEL_TRACES_EXPORTER` or the parameter `adbc.traces.exporter` to select one of the
supported exporters. The parameter has precedence over the environment variable. The parameter must be set before
the connection is initialized.

The following exporters are supported:

| Exporter | Description |
| --- | --- |
| `adbcfile` | Exports traces to rotating files in a folder. |

#### File Exporter (adbcfile)

Rotating trace files are written to a folder. The file names are created with the following pattern:
`apache.arrow.adbc.drivers.bigquery-<YYYY-MM-DD-HH-mm-ss-fff>-<process-id>.log`.

The folder used depends on the platform.

| Platform | Folder |
| --- | --- |
| Windows | `%LOCALAPPDATA%/Apache.Arrow.Adbc/Traces` |
| macOS | `$HOME/Library/Application Support/Apache.Arrow.Adbc/Traces` |
| Linux | `$HOME/.local/share/Apache.Arrow.Adbc/Traces` |

By default, up to 999 files of maximum size 1024 KB are written to
the trace folder.
31 changes: 31 additions & 0 deletions csharp/src/Drivers/Apache/Spark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,34 @@ The Collector can be configure to receive trace messages from the driver and exp
Ensure to set the [environment variable](https://opentelemetry.io/docs/specs/otel/protocol/exporter/) `OTEL_EXPORTER_OTLP_INSECURE` to `true`, in this scenario.

Ensure to follow [Collector configuration best practices](https://opentelemetry.io/docs/security/config-best-practices/).

## Tracing

### Tracing Exporters

To enable tracing messages to be observed, a tracing exporter needs to be activated.
Use either the environment variable `OTEL_TRACES_EXPORTER` or the parameter `adbc.traces.exporter` to select one of the
supported exporters. The parameter has precedence over the environment variable. The parameter must be set before
the connection is initialized.

The following exporters are supported:

| Exporter | Description |
| --- | --- |
| `adbcfile` | Exports traces to rotating files in a folder. |

#### File Exporter (adbcfile)

Rotating trace files are written to a folder. The file names are created with the following pattern:
`apache.arrow.adbc.drivers.bigquery-<YYYY-MM-DD-HH-mm-ss-fff>-<process-id>.log`.

The folder used depends on the platform.

| Platform | Folder |
| --- | --- |
| Windows | `%LOCALAPPDATA%/Apache.Arrow.Adbc/Traces` |
| macOS | `$HOME/Library/Application Support/Apache.Arrow.Adbc/Traces` |
| Linux | `$HOME/.local/share/Apache.Arrow.Adbc/Traces` |

By default, up to 999 files of maximum size 1024 KB are written to
the trace folder.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Apache.Arrow.Adbc\Apache.Arrow.Adbc.csproj" />
<ProjectReference Include="..\..\Telemetry\Traces\Listeners\Apache.Arrow.Adbc.Telemetry.Traces.Listeners.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="readme.md">
Expand Down
35 changes: 34 additions & 1 deletion csharp/src/Drivers/BigQuery/BigQueryConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Apache.Arrow.Adbc.Extensions;
using Apache.Arrow.Adbc.Telemetry.Traces.Listeners;
using Apache.Arrow.Adbc.Telemetry.Traces.Listeners.FileListener;
using Apache.Arrow.Adbc.Tracing;
using Apache.Arrow.Ipc;
using Apache.Arrow.Types;
Expand All @@ -45,6 +47,9 @@ public class BigQueryConnection : TracingConnection, ITokenProtectedResource
bool includePublicProjectIds = false;
const string infoDriverName = "ADBC BigQuery Driver";
const string infoVendorName = "BigQuery";
// Note: this needs to be set before the constructor runs
private readonly string _traceInstanceId = Guid.NewGuid().ToString("N");
private readonly FileActivityListener? _fileActivityListener;

private readonly string infoDriverArrowVersion = BigQueryUtils.GetAssemblyVersion(typeof(IArrowArray));

Expand All @@ -66,6 +71,8 @@ public BigQueryConnection(IReadOnlyDictionary<string, string> properties) : base
this.properties = properties.ToDictionary(k => k.Key, v => v.Value);
}

TryInitTracerProvider(out _fileActivityListener);

// add the default value for now and set to true until C# has a BigDecimal
this.properties[BigQueryParameters.LargeDecimalsAsString] = BigQueryConstants.TreatLargeDecimalAsString;
this.httpClient = new HttpClient();
Expand All @@ -85,6 +92,31 @@ public BigQueryConnection(IReadOnlyDictionary<string, string> properties) : base
}
}

private bool TryInitTracerProvider(out FileActivityListener? fileActivityListener)
{
properties.TryGetValue(ListenersOptions.Exporter, out string? exporterOption);
// This listener will only listen for activity from this specific connection instance.
bool shouldListenTo(ActivitySource source) => source.Tags?.Any(t => ReferenceEquals(t.Key, _traceInstanceId)) == true;
return FileActivityListener.TryActivateFileListener(AssemblyName, exporterOption, out fileActivityListener, shouldListenTo: shouldListenTo);
}

public override IEnumerable<KeyValuePair<string, object?>>? GetActivitySourceTags(IReadOnlyDictionary<string, string> properties)
{
IEnumerable<KeyValuePair<string, object?>>? tags = base.GetActivitySourceTags(properties);
tags ??= [];
tags = tags.Concat([new(_traceInstanceId, null)]);
return tags;
}

/// <summary>
/// Conditional used to determines if it is safe to trace
/// </summary>
/// <remarks>
/// It is safe to write to some output types (ie, files) but not others (ie, a shared resource).
/// </remarks>
/// <returns></returns>
internal bool IsSafeToTrace => _fileActivityListener != null;

/// <summary>
/// The function to call when updating the token.
/// </summary>
Expand Down Expand Up @@ -470,7 +502,7 @@ internal void UpdateClientToken()

return this.TraceActivity(activity =>
{
activity?.AddConditionalTag(SemanticConventions.Db.Query.Text, sql, BigQueryUtils.IsSafeToTrace());
activity?.AddConditionalTag(SemanticConventions.Db.Query.Text, sql, IsSafeToTrace);

Func<Task<BigQueryResults?>> func = () => Client.ExecuteQueryAsync(sql, parameters ?? Enumerable.Empty<BigQueryParameter>(), queryOptions, resultsOptions);
BigQueryResults? result = ExecuteWithRetriesAsync<BigQueryResults?>(func, activity).GetAwaiter().GetResult();
Expand Down Expand Up @@ -1273,6 +1305,7 @@ public override void Dispose()
Client?.Dispose();
Client = null;
this.httpClient?.Dispose();
this._fileActivityListener?.Dispose();
}

private static Regex sanitizedInputRegex = new Regex("^[a-zA-Z0-9_-]+");
Expand Down
10 changes: 5 additions & 5 deletions csharp/src/Drivers/BigQuery/BigQueryStatement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private async Task<QueryResult> ExecuteQueryInternalAsync()
{
QueryOptions queryOptions = ValidateOptions(activity);

activity?.AddConditionalTag(SemanticConventions.Db.Query.Text, SqlQuery, BigQueryUtils.IsSafeToTrace());
activity?.AddConditionalTag(SemanticConventions.Db.Query.Text, SqlQuery, this.bigQueryConnection.IsSafeToTrace);

BigQueryJob job = await Client.CreateQueryJobAsync(SqlQuery, null, queryOptions);

Expand Down Expand Up @@ -216,7 +216,7 @@ private async Task<IEnumerable<IArrowReader>> GetArrowReaders(
ReadSession rrs = await bigQueryReadClient.CreateReadSessionAsync("projects/" + projectId, rs, maxStreamCount);

var readers = rrs.Streams
.Select(s => ReadChunk(bigQueryReadClient, s.Name, activity))
.Select(s => ReadChunk(bigQueryReadClient, s.Name, activity, this.bigQueryConnection.IsSafeToTrace))
.Where(chunk => chunk != null)
.Cast<IArrowReader>();

Expand All @@ -242,7 +242,7 @@ private async Task<UpdateResult> ExecuteUpdateInternalAsync()
activity?.AddBigQueryParameterTag(BigQueryParameters.GetQueryResultsOptionsTimeout, seconds);
}

activity?.AddConditionalTag(SemanticConventions.Db.Query.Text, SqlQuery, BigQueryUtils.IsSafeToTrace());
activity?.AddConditionalTag(SemanticConventions.Db.Query.Text, SqlQuery, this.bigQueryConnection.IsSafeToTrace);

// Cannot set destination table in jobs with DDL statements, otherwise an error will be prompted
Func<Task<BigQueryResults?>> func = () => Client.ExecuteQueryAsync(SqlQuery, null, null, getQueryResultsOptions);
Expand Down Expand Up @@ -340,11 +340,11 @@ private IArrowType GetType(TableFieldSchema field, IArrowType type)
return type;
}

private static IArrowReader? ReadChunk(BigQueryReadClient client, string streamName, Activity? activity)
private static IArrowReader? ReadChunk(BigQueryReadClient client, string streamName, Activity? activity, bool isSafeToTrace)
{
// Ideally we wouldn't need to indirect through a stream, but the necessary APIs in Arrow
// are internal. (TODO: consider changing Arrow).
activity?.AddConditionalBigQueryTag("read_stream", streamName, BigQueryUtils.IsSafeToTrace());
activity?.AddConditionalBigQueryTag("read_stream", streamName, isSafeToTrace);
BigQueryReadClient.ReadRowsStream readRowsStream = client.ReadRows(new ReadRowsRequest { ReadStream = streamName });
IAsyncEnumerator<ReadRowsResponse> enumerator = readRowsStream.GetResponseStream().GetAsyncEnumerator();

Expand Down
13 changes: 0 additions & 13 deletions csharp/src/Drivers/BigQuery/BigQueryUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,5 @@ public static bool TokenRequiresUpdate(Exception ex)
internal static string GetAssemblyName(Type type) => type.Assembly.GetName().Name!;

internal static string GetAssemblyVersion(Type type) => FileVersionInfo.GetVersionInfo(type.Assembly.Location).ProductVersion ?? string.Empty;

/// <summary>
/// Conditional used to determines if it is safe to trace
/// </summary>
/// <remarks>
/// It is safe to write to some output types (ie, files) but not others (ie, a shared resource).
/// </remarks>
/// <returns></returns>
internal static bool IsSafeToTrace()
{
// TODO: Add logic to determine if a file writer is listening
return false;
}
}
}
Loading
Loading