diff --git a/internal/collector/patroni.go b/internal/collector/patroni.go index 2e0edb0d1..c4f74a5d4 100644 --- a/internal/collector/patroni.go +++ b/internal/collector/patroni.go @@ -65,6 +65,7 @@ func EnablePatroniLogging(ctx context.Context, {"action": "insert", "key": "k8s.container.name", "value": naming.ContainerDatabase}, {"action": "insert", "key": "k8s.namespace.name", "value": "${env:K8S_POD_NAMESPACE}"}, {"action": "insert", "key": "k8s.pod.name", "value": "${env:K8S_POD_NAME}"}, + {"action": "insert", "key": "process.executable.name", "value": "patroni"}, }, } diff --git a/internal/collector/patroni_test.go b/internal/collector/patroni_test.go index 20dd8096e..42272df16 100644 --- a/internal/collector/patroni_test.go +++ b/internal/collector/patroni_test.go @@ -65,6 +65,9 @@ processors: - action: insert key: k8s.pod.name value: ${env:K8S_POD_NAME} + - action: insert + key: process.executable.name + value: patroni resourcedetection: detectors: [] override: false @@ -165,6 +168,9 @@ processors: - action: insert key: k8s.pod.name value: ${env:K8S_POD_NAME} + - action: insert + key: process.executable.name + value: patroni resourcedetection: detectors: [] override: false diff --git a/internal/collector/pgadmin.go b/internal/collector/pgadmin.go index c5cd147df..244fc5754 100644 --- a/internal/collector/pgadmin.go +++ b/internal/collector/pgadmin.go @@ -54,6 +54,7 @@ func EnablePgAdminLogging(ctx context.Context, spec *v1beta1.InstrumentationSpec {"action": "insert", "key": "k8s.container.name", "value": naming.ContainerPGAdmin}, {"action": "insert", "key": "k8s.namespace.name", "value": "${env:K8S_POD_NAMESPACE}"}, {"action": "insert", "key": "k8s.pod.name", "value": "${env:K8S_POD_NAME}"}, + {"action": "insert", "key": "process.executable.name", "value": "pgadmin"}, }, } diff --git a/internal/collector/pgadmin_test.go b/internal/collector/pgadmin_test.go index b856baab0..d7ebde326 100644 --- a/internal/collector/pgadmin_test.go +++ b/internal/collector/pgadmin_test.go @@ -69,6 +69,9 @@ collector.yaml: | - action: insert key: k8s.pod.name value: ${env:K8S_POD_NAME} + - action: insert + key: process.executable.name + value: pgadmin resourcedetection: detectors: [] override: false @@ -194,6 +197,9 @@ collector.yaml: | - action: insert key: k8s.pod.name value: ${env:K8S_POD_NAME} + - action: insert + key: process.executable.name + value: pgadmin resourcedetection: detectors: [] override: false diff --git a/internal/collector/pgbackrest.go b/internal/collector/pgbackrest.go index 4fa6f5c1f..75cc9a55c 100644 --- a/internal/collector/pgbackrest.go +++ b/internal/collector/pgbackrest.go @@ -87,6 +87,7 @@ func NewConfigForPgBackrestRepoHostPod( {"action": "insert", "key": "k8s.container.name", "value": naming.PGBackRestRepoContainerName}, {"action": "insert", "key": "k8s.namespace.name", "value": "${env:K8S_POD_NAMESPACE}"}, {"action": "insert", "key": "k8s.pod.name", "value": "${env:K8S_POD_NAME}"}, + {"action": "insert", "key": "process.executable.name", "value": "pgbackrest"}, }, } diff --git a/internal/collector/pgbackrest_test.go b/internal/collector/pgbackrest_test.go index 66e180ef1..15c217d72 100644 --- a/internal/collector/pgbackrest_test.go +++ b/internal/collector/pgbackrest_test.go @@ -67,6 +67,9 @@ processors: - action: insert key: k8s.pod.name value: ${env:K8S_POD_NAME} + - action: insert + key: process.executable.name + value: pgbackrest resourcedetection: detectors: [] override: false @@ -174,6 +177,9 @@ processors: - action: insert key: k8s.pod.name value: ${env:K8S_POD_NAME} + - action: insert + key: process.executable.name + value: pgbackrest resourcedetection: detectors: [] override: false diff --git a/internal/collector/pgbouncer.go b/internal/collector/pgbouncer.go index 700b9a372..9d78edea6 100644 --- a/internal/collector/pgbouncer.go +++ b/internal/collector/pgbouncer.go @@ -90,6 +90,7 @@ func EnablePgBouncerLogging(ctx context.Context, {"action": "insert", "key": "k8s.container.name", "value": naming.ContainerPGBouncer}, {"action": "insert", "key": "k8s.namespace.name", "value": "${env:K8S_POD_NAMESPACE}"}, {"action": "insert", "key": "k8s.pod.name", "value": "${env:K8S_POD_NAME}"}, + {"action": "insert", "key": "process.executable.name", "value": "pgbouncer"}, }, } diff --git a/internal/collector/pgbouncer_test.go b/internal/collector/pgbouncer_test.go index cbd69cbd0..93409f70b 100644 --- a/internal/collector/pgbouncer_test.go +++ b/internal/collector/pgbouncer_test.go @@ -64,6 +64,9 @@ processors: - action: insert key: k8s.pod.name value: ${env:K8S_POD_NAME} + - action: insert + key: process.executable.name + value: pgbouncer resourcedetection: detectors: [] override: false @@ -164,6 +167,9 @@ processors: - action: insert key: k8s.pod.name value: ${env:K8S_POD_NAME} + - action: insert + key: process.executable.name + value: pgbouncer resourcedetection: detectors: [] override: false diff --git a/internal/collector/postgres.go b/internal/collector/postgres.go index c98ba4e98..a92663909 100644 --- a/internal/collector/postgres.go +++ b/internal/collector/postgres.go @@ -197,6 +197,7 @@ func EnablePostgresLogging( {"action": "insert", "key": "k8s.container.name", "value": naming.ContainerDatabase}, {"action": "insert", "key": "k8s.namespace.name", "value": "${env:K8S_POD_NAMESPACE}"}, {"action": "insert", "key": "k8s.pod.name", "value": "${env:K8S_POD_NAME}"}, + {"action": "insert", "key": "process.executable.name", "value": "postgres"}, // https://github.com/open-telemetry/semantic-conventions/blob/v1.29.0/docs/database#readme {"action": "insert", "key": "db.system", "value": "postgresql"}, @@ -276,6 +277,7 @@ func EnablePostgresLogging( {"action": "insert", "key": "k8s.container.name", "value": naming.ContainerDatabase}, {"action": "insert", "key": "k8s.namespace.name", "value": "${env:K8S_POD_NAMESPACE}"}, {"action": "insert", "key": "k8s.pod.name", "value": "${env:K8S_POD_NAME}"}, + {"action": "insert", "key": "process.executable.name", "value": "pgbackrest"}, }, } diff --git a/internal/collector/postgres_test.go b/internal/collector/postgres_test.go index 222b263e2..2e0c16c18 100644 --- a/internal/collector/postgres_test.go +++ b/internal/collector/postgres_test.go @@ -73,6 +73,9 @@ processors: - action: insert key: k8s.pod.name value: ${env:K8S_POD_NAME} + - action: insert + key: process.executable.name + value: pgbackrest resource/postgres: attributes: - action: insert @@ -84,6 +87,9 @@ processors: - action: insert key: k8s.pod.name value: ${env:K8S_POD_NAME} + - action: insert + key: process.executable.name + value: postgres - action: insert key: db.system value: postgresql @@ -333,6 +339,9 @@ processors: - action: insert key: k8s.pod.name value: ${env:K8S_POD_NAME} + - action: insert + key: process.executable.name + value: pgbackrest resource/postgres: attributes: - action: insert @@ -344,6 +353,9 @@ processors: - action: insert key: k8s.pod.name value: ${env:K8S_POD_NAME} + - action: insert + key: process.executable.name + value: postgres - action: insert key: db.system value: postgresql