Skip to content

Conversation

podgaietska
Copy link
Contributor

This change sets traceId on the JsonStreamWriter. The AivenKafkaConnector prefix is recognized by BigQuery, allowing to identify traffic coming from the connector.

@podgaietska podgaietska changed the title Set BigQuery Write API Trace ID for Connector Identification Set BigQuery Write API Trace ID for connector identification Aug 25, 2025
@@ -101,6 +104,7 @@ protected StorageWriteApiBase(int retry,
throw new BigQueryStorageWriteApiConnectException("Failed to create Big Query Storage Write API write client", e);
}
this.jsonWriterFactory = getJsonWriterFactory();
this.traceId = String.format(TRACE_ID_FORMAT, UUID.randomUUID());

Choose a reason for hiding this comment

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

Is there any JobID or something that identifies the current Kafka process that can be used? That would be preferable over a random UUID.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed it to AivenKafkaConnector:connectorName-taskId

Choose a reason for hiding this comment

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

Looks good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants