| 75 | } |
| 76 | |
| 77 | func NewConfigForPostgresPod(ctx context.Context, |
| 78 | inCluster *v1beta1.PostgresCluster, |
| 79 | inParameters *postgres.ParameterSet, |
| 80 | ) *Config { |
| 81 | config := NewConfig(inCluster.Spec.Instrumentation) |
| 82 | |
| 83 | // Metrics |
| 84 | EnablePostgresMetrics(ctx, inCluster, config) |
| 85 | EnablePatroniMetrics(ctx, inCluster, config) |
| 86 | |
| 87 | // Logging |
| 88 | EnablePostgresLogging(ctx, inCluster, inParameters, config) |
| 89 | EnablePatroniLogging(ctx, inCluster, config) |
| 90 | |
| 91 | return config |
| 92 | } |
| 93 | |
| 94 | // The contents of "postgres_logs_transforms.yaml" as JSON. |
| 95 | // See: https://pkg.go.dev/embed |