(object T)
| 16 | } |
| 17 | |
| 18 | func OpenTelemetrySpecPresent[T CrunchyCRD](object T) bool { |
| 19 | |
| 20 | switch v := any(object).(type) { |
| 21 | case *v1beta1.InstrumentationSpec: |
| 22 | return v != nil |
| 23 | case *v1beta1.PostgresCluster: |
| 24 | return v != nil && v.Spec.Instrumentation != nil |
| 25 | case *v1beta1.PGAdmin: |
| 26 | return v != nil && v.Spec.Instrumentation != nil |
| 27 | default: |
| 28 | return false |
| 29 | } |
| 30 | |
| 31 | } |
| 32 | |
| 33 | func OpenTelemetryLogsOrMetricsEnabled[T CrunchyCRD]( |
| 34 | ctx context.Context, |
no outgoing calls
no test coverage detected