Skip to content

Commit ad7bbda

Browse files
committed
Fix lint errors
Signed-off-by: Dan Barr <6922515+danbarr@users.noreply.github.com>
1 parent 84b3002 commit ad7bbda

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

cmd/thv/app/run_flags.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,10 @@ func setupOIDCConfiguration(cmd *cobra.Command, runFlags *RunFlags) (*auth.Token
302302
func setupTelemetryConfiguration(cmd *cobra.Command, runFlags *RunFlags) *telemetry.Config {
303303
configProvider := cfg.NewDefaultProvider()
304304
config := configProvider.GetConfig()
305-
finalOtelEndpoint, finalOtelSamplingRate, finalOtelEnvironmentVariables, finalOtelInsecure, finalOtelEnablePrometheusMetricsPath := getTelemetryFromFlags(cmd, config,
306-
runFlags.OtelEndpoint, runFlags.OtelSamplingRate, runFlags.OtelEnvironmentVariables, runFlags.OtelInsecure, runFlags.OtelEnablePrometheusMetricsPath)
305+
finalOtelEndpoint, finalOtelSamplingRate, finalOtelEnvironmentVariables, finalOtelInsecure,
306+
finalOtelEnablePrometheusMetricsPath := getTelemetryFromFlags(cmd, config, runFlags.OtelEndpoint,
307+
runFlags.OtelSamplingRate, runFlags.OtelEnvironmentVariables, runFlags.OtelInsecure,
308+
runFlags.OtelEnablePrometheusMetricsPath)
307309

308310
return createTelemetryConfig(finalOtelEndpoint, finalOtelEnablePrometheusMetricsPath,
309311
runFlags.OtelServiceName, runFlags.OtelTracingEnabled, runFlags.OtelMetricsEnabled, finalOtelSamplingRate,
@@ -575,7 +577,8 @@ func getOidcFromFlags(cmd *cobra.Command) (string, string, string, string, strin
575577

576578
// getTelemetryFromFlags extracts telemetry configuration from command flags
577579
func getTelemetryFromFlags(cmd *cobra.Command, config *cfg.Config, otelEndpoint string, otelSamplingRate float64,
578-
otelEnvironmentVariables []string, otelInsecure bool, otelEnablePrometheusMetricsPath bool) (string, float64, []string, bool, bool) {
580+
otelEnvironmentVariables []string, otelInsecure bool, otelEnablePrometheusMetricsPath bool) (
581+
string, float64, []string, bool, bool) {
579582
// Use config values as fallbacks for OTEL flags if not explicitly set
580583
finalOtelEndpoint := otelEndpoint
581584
if !cmd.Flags().Changed("otel-endpoint") && config.OTEL.Endpoint != "" {
@@ -602,7 +605,8 @@ func getTelemetryFromFlags(cmd *cobra.Command, config *cfg.Config, otelEndpoint
602605
finalOtelEnablePrometheusMetricsPath = config.OTEL.EnablePrometheusMetricsPath
603606
}
604607

605-
return finalOtelEndpoint, finalOtelSamplingRate, finalOtelEnvironmentVariables, finalOtelInsecure, finalOtelEnablePrometheusMetricsPath
608+
return finalOtelEndpoint, finalOtelSamplingRate, finalOtelEnvironmentVariables,
609+
finalOtelInsecure, finalOtelEnablePrometheusMetricsPath
606610
}
607611

608612
// createOIDCConfig creates an OIDC configuration if any OIDC parameters are provided

0 commit comments

Comments
 (0)