Skip to content

Add client hostname option#1173

Open
OrangeFlag wants to merge 1 commit into
ClickHouse:mainfrom
OrangeFlag:client-hostname-option
Open

Add client hostname option#1173
OrangeFlag wants to merge 1 commit into
ClickHouse:mainfrom
OrangeFlag:client-hostname-option

Conversation

@OrangeFlag

@OrangeFlag OrangeFlag commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Propagate os.Hostname() to query ClientInfo.ClientHostname.
  • Format custom ClientName in clickhouse-go style: application product first, then ch-go product.
  • Append Go runtime and OS metadata to ClientName, for example:
    application/v1.85.2 clickhouse/ch-go/0.71.0 (lv:go/1.26.4; os:linux).

Motivation

ClickHouse query logs expose both client_hostname and client_name. Applications need to use these fields for different attribution dimensions:

  • client_hostname: pod or host identity.
  • client_name: application/library identity and versions.

This makes it easier to filter by service/version and separately group by pod/host.

Checklist

  • A human-readable description of the changes was provided to include in CHANGELOG

@CLAassistant

CLAassistant commented Jun 30, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@OrangeFlag OrangeFlag force-pushed the client-hostname-option branch 3 times, most recently from ac5547a to 674f977 Compare June 30, 2026 16:05
@OrangeFlag OrangeFlag force-pushed the client-hostname-option branch from 674f977 to 8a26fed Compare June 30, 2026 16:25
@OrangeFlag

Copy link
Copy Markdown
Contributor Author

@kavirajk can you review this PR?

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