From d4425713e849a36fefca3336e39889bbc72de638 Mon Sep 17 00:00:00 2001 From: akvlad Date: Thu, 24 Oct 2024 14:31:32 +0300 Subject: [PATCH 1/2] debug clusterKey; pyroscope config --- extension/pyroscope/config.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/extension/pyroscope/config.go b/extension/pyroscope/config.go index e660ef2..e986f70 100644 --- a/extension/pyroscope/config.go +++ b/extension/pyroscope/config.go @@ -3,17 +3,17 @@ package pyroscope import "go.opentelemetry.io/collector/component" type Config struct { - ApplicationName string `json:"application_name"` - Tags map[string]string `json:"tags"` - ServerAddress string `json:"server_address"` - BasicAuth BasicAuth `json:"basic_auth"` - ProfileTypes []string `json:"profile_types"` - TenantID string `json:"tenant_id"` + ApplicationName string `mapstructure:"application_name"` + Tags map[string]string `mapstructure:"tags"` + ServerAddress string `mapstructure:"server_address"` + BasicAuth BasicAuth `mapstructure:"basic_auth"` + ProfileTypes []string `mapstructure:"profile_types"` + TenantID string `mapstructure:"tenant_id"` } type BasicAuth struct { - Username string `json:"username"` - Password string `json:"password"` + Username string `mapstructure:"username"` + Password string `mapstructure:"password"` } func defaultConfig() component.Config { From 90ec04f18595590d3aed68e6a7b2e7544ccb199e Mon Sep 17 00:00:00 2001 From: akvlad Date: Thu, 24 Oct 2024 14:31:40 +0300 Subject: [PATCH 2/2] debug clusterKey; pyroscope config --- exporter/qrynexporter/logs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporter/qrynexporter/logs.go b/exporter/qrynexporter/logs.go index 7791965..8a9361c 100644 --- a/exporter/qrynexporter/logs.go +++ b/exporter/qrynexporter/logs.go @@ -452,7 +452,7 @@ func (e *logsExporter) pushLogsData(ctx context.Context, ld plog.Logs) error { } func batchSamplesAndTimeSeries(ctx context.Context, db clickhouse.Conn, samples []Sample, timeSeries []TimeSerie) error { - isCluster := ctx.Value("cluster").(bool) + isCluster := ctx.Value(clusterKey).(bool) samplesBatch, err := db.PrepareBatch(ctx, samplesSQL(isCluster)) if err != nil { return err