Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor stylistic cleanup #42

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
brooksmtownsend marked this conversation as resolved.
Show resolved Hide resolved
}

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