-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Add OpenTelemetry support (#41)
* not done yet. moving to new sia-mac :D * implement tracing package and settings package * fix redundant import in test * removed redundant usage of metav1 * added graceful shutdown support to tracing package * implement finalizers for graceful shutdown * added spans to Check() function * removed jager exporter and used standard http/grpc exporter * move tracing package from /pkg to /internal * fix typo in tracing init in main
- Loading branch information
Showing
8 changed files
with
321 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package settings | ||
|
||
import "flag" | ||
|
||
func (s Settings) BindFlags(fs *flag.FlagSet) { | ||
flag.StringVar(&s.MetricsAddress, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.") | ||
flag.StringVar(&s.ProbeAddress, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.") | ||
flag.StringVar(&s.AuthServerAddress, "address", ":8082", "The address the authorization service binds to.") | ||
|
||
flag.StringVar(&s.TLS.CertPath, "tls-cert-path", "", "grpc Authentication server TLS certificate") | ||
flag.StringVar(&s.TLS.KeyPath, "tls-key-path", "", "grpc Authentication server TLS key") | ||
flag.StringVar(&s.TLS.CaPath, "tls-ca-path", "", "grpc Authentication server CA certificate") | ||
|
||
flag.BoolVar(&s.Tracing.Enabled, "enable-tracing", false, | ||
"Enable OpenTelemetry Tracing. "+ | ||
"After enabling this you should add --tracing-provider") | ||
flag.StringVar(&s.Tracing.Provider, "tracing-provider", "jaeger", | ||
"Tracing provider, for now only 'jaeger'. "+ | ||
"You should also set OTEL_EXPORTER_JAEGER_AGENT_HOST and OTEL_EXPORTER_JAEGER_AGENT_PORT.") | ||
flag.Float64Var(&s.Tracing.SamplingRatio, "tracing-sampling-ratio", 0.001, | ||
"Tracing sampling ration sets sampling portion of requests") | ||
flag.Float64Var(&s.Tracing.Timeout, "tracing-sampling-ratio", 1, | ||
"sets tracing timeout in seconds") | ||
|
||
flag.BoolVar(&s.LeaderElection.Enabled, "leader-elect", false, | ||
"Enable leader election for controller manager. "+ | ||
"Enabling this will ensure there is only one active controller manager.") | ||
} |
Oops, something went wrong.