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 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 {