Documentation ¶
Index ¶
- func ApplyAliases(ctx context.Context) (context.Context, error)
- func DetermineConfigDir(ctx context.Context) (context.Context, error)
- func InitClient(ctx context.Context) (context.Context, error)
- func LoadConfig(ctx context.Context) (context.Context, error)
- func SetOtelAuthenticationKey(ctx context.Context) (context.Context, error)
- type Preparer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyAliases ¶
ApplyAliases consolidates flags with aliases into a single source-of-truth flag. After calling this, the main flags will have their values set as follows:
- If the main flag was already set, it will keep its value.
- If it was not set, but an alias was, it will take the value of the first specified alias flag. This will set flag.Changed to true, as if it were specified manually.
- If none of the flags were set, the main flag will remain its default value.
func SetOtelAuthenticationKey ¶ added in v0.1.135
This method sets the user auth token as an environment variable called FLY_OTEL_AUTH_KEY Why is this necessary? It's quite difficult to get the auth token when we initialize the tracer. There's no assurance it will exist at the time of creation, so we use this preparer to set it And then in the tracer, we use a GRPC interceptor to pull it out when sending the traces. *Another approach would be to load the config in the interceptor, and pull the tokens from it. except it only came to my mind after writing this so let's stick with this for now.