generated from kedacore/github-template
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Bilal Hussain <[email protected]>
- Loading branch information
1 parent
7d1740a
commit 1eb19da
Showing
18 changed files
with
656 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package config | ||
|
||
import ( | ||
"github.com/kelseyhightower/envconfig" | ||
) | ||
|
||
// Tracing is the configuration for configuring tracing through the interceptor. | ||
type Tracing struct { | ||
// States whether tracing should be enabled, False by default | ||
Enabled bool `envconfig:"KEDA_HTTP_TRACING_ENABLED" default:"false"` | ||
// Sets what tracing export to use, must be one of: console,otlphttp | ||
Exporter string `envconfig:"KEDA_HTTP_TRACE_EXPORTER" default:"console"` | ||
// Sets the endpoint which traces should be forwarded to | ||
Endpoint string `envconfig:"KEDA_HTTP_TRACE_ENDPOINT" default:"localhost:4318"` | ||
// OTLP headers | ||
Headers string `envconfig:"OTEL_EXPORTER_OTLP_HEADERS" default:""` | ||
// Sends traces to the tracing via HTTP rather than HTTPS. Defaults to False | ||
Insecure bool `envconfig:"KEDA_HTTP_TRACE_INSECURE" default:"false"` | ||
// The timeout for the batch processor is described as "Time duration after which a batch will be sent regardless of size." | ||
Timeout int `envconfig:"KEDA_HTTP_BATCH_TIMEOUT" default:"5"` | ||
} | ||
|
||
// Parse parses standard configs using envconfig and returns a pointer to the | ||
// newly created config. Returns nil and a non-nil error if parsing failed | ||
func MustParseTracing() *Tracing { | ||
ret := new(Tracing) | ||
envconfig.MustProcess("", ret) | ||
return ret | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.