Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
chrlic committed Jul 11, 2023
1 parent a0e3852 commit 096f98f
Show file tree
Hide file tree
Showing 4 changed files with 213 additions and 5 deletions.
8 changes: 8 additions & 0 deletions pkg/instrumentation/apachehttpd.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"strings"

"github.com/go-logr/logr"
semconv "go.opentelemetry.io/otel/semconv/v1.7.0"
corev1 "k8s.io/api/core/v1"

"github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1"
Expand Down Expand Up @@ -219,6 +220,13 @@ LoadModule otel_apache_module %[1]s/WebServerModule/Apache/libmod_apache_otel%[2
}
serviceName := chooseServiceName(pod, resourceMap, index)
serviceNamespace := pod.GetNamespace()
if len(serviceNamespace) == 0 {
serviceNamespace = resourceMap[string(semconv.K8SNamespaceNameKey)]
if len(serviceNamespace) == 0 {
serviceNamespace = "apache-httpd"
}

}
// Namespace name override TBD

// There are two versions of the OTEL modules - for Apache HTTPD 2.4 and 2.2.
Expand Down
Loading

0 comments on commit 096f98f

Please sign in to comment.