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