@@ -71,8 +71,14 @@ type Observability struct {
71
71
}
72
72
73
73
type Otel struct {
74
- Enabled bool `json:"enabled"`
75
- Collector OtelCollector `json:"collector"`
74
+ Enabled bool `json:"enabled"`
75
+ Collector OtelCollector `json:"collector"`
76
+ AutoInstrumentation AutoInstrumentation `json:"auto-instrumentation"`
77
+ }
78
+
79
+ type AutoInstrumentation struct {
80
+ Enabled bool `json:"enabled"`
81
+ AppConfig string `json:"app-config"`
76
82
}
77
83
78
84
type OtelCollector struct {
@@ -174,67 +180,69 @@ type Config struct {
174
180
}
175
181
176
182
const (
177
- AivenProject = "aiven-project"
178
- AivenRange = "aiven-range"
179
- ApiServerIp = "api-server-ip"
180
- Bind = "bind"
181
- HealthProbeBindAddress = "health-probe-bind-address"
182
- ClusterName = "cluster-name"
183
- DryRun = "dry-run"
184
- NaisNamespace = "nais-namespace"
185
- FeaturesAccessPolicyNotAllowedCIDRs = "features.access-policy-not-allowed-cidrs"
186
- FeaturesAzurerator = "features.azurerator"
187
- FeaturesGCP = "features.gcp"
188
- FeaturesIDPorten = "features.idporten"
189
- FeaturesJwker = "features.jwker"
190
- FeaturesCNRM = "features.cnrm"
191
- FeaturesKafkarator = "features.kafkarator"
192
- FeaturesLinkerd = "features.linkerd"
193
- FeaturesMaskinporten = "features.maskinporten"
194
- FeaturesNetworkPolicy = "features.network-policy"
195
- FeaturesPrometheusOperator = "features.prometheus-operator"
196
- FeaturesVault = "features.vault"
197
- FeaturesWebhook = "features.webhook"
198
- FeaturesWonderwall = "features.wonderwall"
199
- FeaturesLegacyGCP = "features.legacy-gcp"
200
- FQDNPolicyEnabled = "fqdn-policy.enabled"
201
- GoogleCloudSQLProxyContainerImage = "google-cloud-sql-proxy-container-image"
202
- GoogleProjectId = "google-project-id"
203
- InformerFullSynchronizationInterval = "informer.full-sync-interval"
204
- KafkaBrokers = "kafka.brokers"
205
- KafkaEnabled = "kafka.enabled"
206
- KafkaLogVerbosity = "kafka.log-verbosity"
207
- KafkaTLSCAPath = "kafka.tls.ca-path"
208
- KafkaTLSCertificatePath = "kafka.tls.certificate-path"
209
- KafkaTLSEnabled = "kafka.tls.enabled"
210
- KafkaTLSInsecure = "kafka.tls.insecure"
211
- KafkaTLSPrivateKeyPath = "kafka.tls.private-key-path"
212
- KafkaTopic = "kafka.topic"
213
- KubeConfig = "kubeconfig"
214
- LeaderElectionImage = "leader-election.image"
215
- MaxConcurrentReconciles = "max-concurrent-reconciles"
216
- ObservabilityLoggingDestinations = "observability.logging.destinations"
217
- ObservabilityOtelCollectorLabels = "observability.otel.collector.labels"
218
- ObservabilityOtelCollectorNamespace = "observability.otel.collector.namespace"
219
- ObservabilityOtelCollectorPort = "observability.otel.collector.port"
220
- ObservabilityOtelCollectorProtocol = "observability.otel.collector.protocol"
221
- ObservabilityOtelCollectorService = "observability.otel.collector.service"
222
- ObservabilityOtelCollectorTLS = "observability.otel.collector.tls"
223
- ObservabilityOtelEnabled = "observability.otel.enabled"
224
- ProxyAddress = "proxy.address"
225
- ProxyExclude = "proxy.exclude"
226
- RateLimitBurst = "ratelimit.burst"
227
- RateLimitQPS = "ratelimit.qps"
228
- SecurelogsConfigMapReloadImage = "securelogs.configmap-reload-image"
229
- SecurelogsFluentdImage = "securelogs.fluentd-image"
230
- SynchronizerRolloutCheckInterval = "synchronizer.rollout-check-interval"
231
- SynchronizerRolloutTimeout = "synchronizer.rollout-timeout"
232
- SynchronizerSynchronizationTimeout = "synchronizer.synchronization-timeout"
233
- VaultAddress = "vault.address"
234
- VaultAuthPath = "vault.auth-path"
235
- VaultInitContainerImage = "vault.init-container-image"
236
- VaultKvPath = "vault.kv-path"
237
- WonderwallImage = "wonderwall.image"
183
+ AivenProject = "aiven-project"
184
+ AivenRange = "aiven-range"
185
+ ApiServerIp = "api-server-ip"
186
+ Bind = "bind"
187
+ HealthProbeBindAddress = "health-probe-bind-address"
188
+ ClusterName = "cluster-name"
189
+ DryRun = "dry-run"
190
+ NaisNamespace = "nais-namespace"
191
+ FeaturesAccessPolicyNotAllowedCIDRs = "features.access-policy-not-allowed-cidrs"
192
+ FeaturesAzurerator = "features.azurerator"
193
+ FeaturesGCP = "features.gcp"
194
+ FeaturesIDPorten = "features.idporten"
195
+ FeaturesJwker = "features.jwker"
196
+ FeaturesCNRM = "features.cnrm"
197
+ FeaturesKafkarator = "features.kafkarator"
198
+ FeaturesLinkerd = "features.linkerd"
199
+ FeaturesMaskinporten = "features.maskinporten"
200
+ FeaturesNetworkPolicy = "features.network-policy"
201
+ FeaturesPrometheusOperator = "features.prometheus-operator"
202
+ FeaturesVault = "features.vault"
203
+ FeaturesWebhook = "features.webhook"
204
+ FeaturesWonderwall = "features.wonderwall"
205
+ FeaturesLegacyGCP = "features.legacy-gcp"
206
+ FQDNPolicyEnabled = "fqdn-policy.enabled"
207
+ GoogleCloudSQLProxyContainerImage = "google-cloud-sql-proxy-container-image"
208
+ GoogleProjectId = "google-project-id"
209
+ InformerFullSynchronizationInterval = "informer.full-sync-interval"
210
+ KafkaBrokers = "kafka.brokers"
211
+ KafkaEnabled = "kafka.enabled"
212
+ KafkaLogVerbosity = "kafka.log-verbosity"
213
+ KafkaTLSCAPath = "kafka.tls.ca-path"
214
+ KafkaTLSCertificatePath = "kafka.tls.certificate-path"
215
+ KafkaTLSEnabled = "kafka.tls.enabled"
216
+ KafkaTLSInsecure = "kafka.tls.insecure"
217
+ KafkaTLSPrivateKeyPath = "kafka.tls.private-key-path"
218
+ KafkaTopic = "kafka.topic"
219
+ KubeConfig = "kubeconfig"
220
+ LeaderElectionImage = "leader-election.image"
221
+ MaxConcurrentReconciles = "max-concurrent-reconciles"
222
+ ObservabilityLoggingDestinations = "observability.logging.destinations"
223
+ ObservabilityOtelCollectorLabels = "observability.otel.collector.labels"
224
+ ObservabilityOtelCollectorNamespace = "observability.otel.collector.namespace"
225
+ ObservabilityOtelCollectorPort = "observability.otel.collector.port"
226
+ ObservabilityOtelCollectorProtocol = "observability.otel.collector.protocol"
227
+ ObservabilityOtelCollectorService = "observability.otel.collector.service"
228
+ ObservabilityOtelCollectorTLS = "observability.otel.collector.tls"
229
+ ObservabilityOtelEnabled = "observability.otel.enabled"
230
+ ObservabilityOtelAutoInstrumentationAppConfig = "observability.otel.auto-instrumentation.app-config"
231
+ ObservabilityOtelAutoInstrumentationEnabled = "observability.otel.auto-instrumentation.enabled"
232
+ ProxyAddress = "proxy.address"
233
+ ProxyExclude = "proxy.exclude"
234
+ RateLimitBurst = "ratelimit.burst"
235
+ RateLimitQPS = "ratelimit.qps"
236
+ SecurelogsConfigMapReloadImage = "securelogs.configmap-reload-image"
237
+ SecurelogsFluentdImage = "securelogs.fluentd-image"
238
+ SynchronizerRolloutCheckInterval = "synchronizer.rollout-check-interval"
239
+ SynchronizerRolloutTimeout = "synchronizer.rollout-timeout"
240
+ SynchronizerSynchronizationTimeout = "synchronizer.synchronization-timeout"
241
+ VaultAddress = "vault.address"
242
+ VaultAuthPath = "vault.auth-path"
243
+ VaultInitContainerImage = "vault.init-container-image"
244
+ VaultKvPath = "vault.kv-path"
245
+ WonderwallImage = "wonderwall.image"
238
246
)
239
247
240
248
func bindNAIS () {
@@ -303,6 +311,8 @@ func init() {
303
311
flag .String (ObservabilityOtelCollectorNamespace , "nais-system" , "namespace of the OpenTelemetry collector" )
304
312
flag .String (ObservabilityOtelCollectorService , "opentelmetry-collector" , "service name of the OpenTelemetry collector" )
305
313
flag .String (ObservabilityOtelCollectorProtocol , "grpc" , "protocol used by the OpenTelemetry collector" )
314
+ flag .Bool (ObservabilityOtelAutoInstrumentationEnabled , false , "enable OpenTelemetry auto-instrumentation" )
315
+ flag .String (ObservabilityOtelAutoInstrumentationAppConfig , "nais-system/apps" , "path to OpenTelemetry auto-instrumentation config" )
306
316
flag .Int (ObservabilityOtelCollectorPort , 4317 , "port used by the OpenTelemetry collector" )
307
317
flag .Bool (ObservabilityOtelCollectorTLS , false , "use TLS for the OpenTelemetry collector" )
308
318
flag .StringArray (ObservabilityOtelCollectorLabels , []string {}, "list of labels to be used by the OpenTelemetry collector" )
0 commit comments