Skip to content

Commit

Permalink
chore: Minor stylistic cleanup (#42)
Browse files Browse the repository at this point in the history
Signed-off-by: Joonas Bergius <[email protected]>
  • Loading branch information
joonas authored Oct 2, 2024
1 parent 56a33cf commit ce927ea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions host.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ const (
// OtelProtocol returns the configured OpenTelemetry protocol if one is provided,
// otherwise defaulting to http.
func (config *OtelConfig) OtelProtocol() string {
protocol := OtelProtocolHTTP
if config.Protocol != "" {
protocol = strings.ToLower(config.Protocol)
return strings.ToLower(config.Protocol)
}
return protocol

return OtelProtocolHTTP
}

// TracesURL returns the configured TracesEndpoint as-is if one is provided,
Expand Down Expand Up @@ -123,11 +123,11 @@ func (config *OtelConfig) resolveSignalUrl(signal otelSignal) string {
}

func (config *OtelConfig) defaultEndpoint() string {
endpoint := OtelExporterHttpEndpoint
if config.OtelProtocol() == OtelProtocolGRPC {
endpoint = OtelExporterGrpcEndpoint
return OtelExporterGrpcEndpoint
}
return endpoint

return OtelExporterHttpEndpoint
}

func (config *OtelConfig) defaultSignalPath(signal otelSignal) string {
Expand Down

0 comments on commit ce927ea

Please sign in to comment.