OBI Service Discovery
The executable_name
, open_port
, service_name
, and service_namespace
fields are key settings that help you configure OBI to instrument either a single service or a group of related services.
In some deployments, such as running Coralogix as a Kubernetes DaemonSet, you may need to monitor a broad range of services. The discovery
section in the YAML configuration provides fine-grained control over which services Coralogix instruments.
For example, you can override service names and namespaces for different types of services.
Services selection
YAML Key | Env Variable | Type | Default |
---|---|---|---|
instrument | N/A | list of objects | (unset) |
Specify different selection rules for different services. You can also override metadata such as service name or namespace.
See the Discovery services example section for more details.
Exclude services
YAML Key | Env Variable | Type | Default |
---|---|---|---|
exclude_instrument | N/A | list of objects | (unset) |
Define services to exclude from instrumentation. This uses the same format as the services
selection. Useful for skipping services like Prometheus.
Default excluded services
YAML Key | Env Variable | Type | Default |
---|---|---|---|
default_exclude_instrument | N/A | list of objects | `(?:^ |
Skip Go-specific tracers
YAML Key | Env Variable | Type | Default |
---|---|---|---|
skip_go_specific_tracers | OTEL_EBPF_SKIP_GO_SPECIFIC_TRACERS | boolean | false |
Turns off detection of Go-specific telemetry. Coralogix falls back to generic instrumentation in this case.
Exclude OpenTelemetry-instrumented services
YAML Key | Env Variable | Type | Default |
---|---|---|---|
exclude_otel_instrumented_services | OBI_EXCLUDE_OTEL_INSTRUMENTED_SERVICES | boolean | true |
exclude_otel_instrumented_services_span_metrics | OTEL_EBPF_EXCLUDE_OTEL_INSTRUMENTED_SERVICES_SPAN_METRICS | boolean | false |
Prevents Coralogix from monitoring services that already use OpenTelemetry SDKs to avoid duplicated telemetry. Turn this off if dual telemetry is acceptable.
Discovery services example
Example YAML selecting two service groups:
discovery:
instrument:
- exe_path: {worker,backend,frontend}
namespace: MyApplication
- exe_path: loadgen
namespace: testing
name: "TestLoadGenerator"
exe_path
values. The name
and namespace
fields control the service's reported identity. Service name and namespace overrides
Each service entry accepts properties grouped by purpose:
- Name and namespace overrides:
name
,namespace
- Selection criteria (selectors): everything else
Name override
YAML Key | Env Variable | Type | Default |
---|---|---|---|
name | – | string | (derived) |
Sets the service name in telemetry. Deprecated in favor of automatic metadata extraction.
Namespace override
YAML Key | Env Variable | Type | Default |
---|---|---|---|
namespace | – | string | (derived or empty) |
Sets the service namespace in telemetry. Deprecated.
Selector properties
YAML Key | Env Variable | Type | Default |
---|---|---|---|
open_ports | – | string (ports) | (unset) |
exe_path | – | string (glob) | (unset) |
containers_only | – | boolean | false |
k8s_namespace | – | string (glob) | (unset) |
k8s_pod_name | – | string (glob) | (unset) |
k8s_deployment_name | – | string (glob) | (unset) |
k8s_replicaset_name | – | string (glob) | (unset) |
k8s_statefulset_name | – | string (glob) | (unset) |
k8s_daemonset_name | – | string (glob) | (unset) |
k8s_owner_name | – | string (glob) | (unset) |
k8s_pod_labels | – | map[string]string (glob) | (unset) |
k8s_pod_annotations | – | map[string]string (glob) | (unset) |
Selectors can be combined within a service entry. All conditions must match for a process to be instrumented.
Example using labels:
Kubernetes-specific name and namespace resolution
Coralogix automatically sets service name and namespace using Kubernetes metadata in this priority order:
OTEL_RESOURCE_ATTRIBUTES
orOTEL_SERVICE_NAME
environment variables- Pod annotations:
resource.opentelemetry.io/service.name
resource.opentelemetry.io/service.namespace
- Pod labels:
app.kubernetes.io/name
app.kubernetes.io/part-of
- Pod owner metadata (Deployment, ReplicaSet, StatefulSet, etc.)
- Executable name
You can override default labels with YAML:
kubernetes:
resource_labels:
service.name:
- override-svc-name
- app.kubernetes.io/name
service.namespace:
- override-svc-ns
- app.kubernetes.io/part-of