Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support K8S application logs #97

Merged
merged 30 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1638a00
Add logs-endpoint env-var injection
harelmo-lumigo May 28, 2024
f296a8b
Update CONTRIBUTING guide
harelmo-lumigo May 28, 2024
9c7b6ef
Propagate env-var, value is empty
harelmo-lumigo May 28, 2024
bc5be5e
Fix docs
harelmo-lumigo May 28, 2024
a2f46fc
Add pipeline
harelmo-lumigo May 29, 2024
381ca48
Fixes
harelmo-lumigo May 29, 2024
0daab4f
Change logs exporter
harelmo-lumigo May 29, 2024
a3f801e
Remove duplicate logging section
harelmo-lumigo May 29, 2024
7629fcf
Remove unused test function
harelmo-lumigo May 29, 2024
4a8cded
Produce test-app logs using Winston
harelmo-lumigo Jun 2, 2024
bba6e60
Try activate UT
harelmo-lumigo Jun 2, 2024
5ec1a13
Fix UT
harelmo-lumigo Jun 2, 2024
6efff14
Inject LUMIGO_ENABLE_LOGS
harelmo-lumigo Jun 2, 2024
5be719b
Inject LUMIGO_ENABLE_LOGS - tests
harelmo-lumigo Jun 2, 2024
ec1982f
Revert envtest version un-pinning
harelmo-lumigo Jun 2, 2024
0f5ea9f
Update readme [skip-ci]
harelmo-lumigo Jun 3, 2024
e5d5782
Fix docs
harelmo-lumigo Jun 3, 2024
f1d5d75
Add the logging to the specs
harelmo-lumigo Jun 3, 2024
e0808af
Test application logs
harelmo-lumigo Jun 3, 2024
79f13d7
Try fix test
harelmo-lumigo Jun 3, 2024
e6e9c14
Move to the correct test suite
harelmo-lumigo Jun 3, 2024
846df94
Try fix test
harelmo-lumigo Jun 3, 2024
3138cd8
Try python logging
harelmo-lumigo Jun 4, 2024
c2d48cd
Remove log testing
harelmo-lumigo Jun 4, 2024
cd318f4
Add a Python test-image with custom logging
harelmo-lumigo Jun 8, 2024
022b051
Failing test - waiting for injector update
harelmo-lumigo Jun 8, 2024
27df8c6
Fix typo
harelmo-lumigo Jun 9, 2024
6ca7987
Finalize Python logging setup
harelmo-lumigo Jun 9, 2024
8da74ce
Temp disable test-telemetry-proxy-for-security-issues
harelmo-lumigo Jun 9, 2024
a7c9fbd
Revert "Temp disable test-telemetry-proxy-for-security-issues"
harelmo-lumigo Jun 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Start `minikube`:
minikube start --insecure-registry "host.docker.internal:5000"
```

* Note that if the minikube machine already exists, you will need to delete it first with `minikube delete` - otherwise the `--insecure-registry` parameter will be ignored (more details [here](https://stackoverflow.com/a/53937716))

Start a local Docker registry:

```sh
Expand All @@ -46,15 +48,15 @@ $ curl localhost:5000/v2/_catalog -v
> Host: localhost:5000
> User-Agent: curl/7.77.0
> Accept: */*
>
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Docker-Distribution-Api-Version: registry/2.0
< X-Content-Type-Options: nosniff
< Date: Fri, 20 Jan 2023 08:10:32 GMT
< Content-Length: 20
<
<
{"repositories":[]}
* Connection #0 to host localhost left intact
```
Expand Down Expand Up @@ -100,7 +102,7 @@ Changing the target Lumigo backend can be done with a [`patchStrategicMerge`](ht
echo -n "apiVersion: apps/v1
kind: Deployment
metadata:
name: lumigo-controller-manager
name: lumigo-lumigo-controller-manager
spec:
template:
spec:
Expand All @@ -109,6 +111,8 @@ spec:
env:
- name: LUMIGO_ENDPOINT
value: \"https://my.lumigo.endpoint\" # Replace this!
- name: LUMIGO_LOGS_ENDPOINT
value: \"https://my.lumigo.endpoint\" # Replace this!
" > lumigo-endpoint.patch.yaml
kubectl patch --patch-file lumigo-endpoint.patch.yaml --type strategic -n lumigo-system --filename=lumigo-endpoint.patch.yaml
```
Expand All @@ -123,8 +127,8 @@ If you see the following, it's likely because and Mac OS has [squatted over port
docker push host.docker.internal:5000/controller
Using default tag: latest
The push refers to repository [host.docker.internal:5000/controller]
377b701db379: Preparing
fba4381f2bb7: Preparing
377b701db379: Preparing
fba4381f2bb7: Preparing
error parsing HTTP 403 response body: unexpected end of JSON input: ""
```

Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ vet: ## Run go vet against code.

.PHONY: test
test: manifests generate fmt vet envtest ## Run tests.
(cd ./controller/src && KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GOCMD) test . -coverprofile cover.out )
(cd ./controller/src && KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GOCMD) test ./... -failfast -coverprofile cover.out )
harelmo-lumigo marked this conversation as resolved.
Show resolved Hide resolved

##@ Build

Expand Down Expand Up @@ -182,8 +182,7 @@ controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessar
$(CONTROLLER_GEN): $(LOCALBIN)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) $(GOCMD) install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

## Pin the version of setup-envtest until https://github.com/kubernetes-sigs/controller-runtime/issues/2720 is resolved.
.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) $(GOCMD) install sigs.k8s.io/controller-runtime/tools/setup-envtest@c7e1dc9b
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) $(GOCMD) install sigs.k8s.io/controller-runtime/tools/setup-envtest
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ spec:
value: "{{ .Values.debug.enabled | default false }}"
- name: LUMIGO_ENDPOINT
value: "{{ .Values.endpoint.otlp.url }}"
- name: LUMIGO_LOGS_ENDPOINT
value: "{{ .Values.endpoint.otlp.logs_url }}"
- name: LUMIGO_OPERATOR_VERSION
value: "{{ $lumigoOperatorVersion }}"
- name: LUMIGO_OPERATOR_DEPLOYMENT_METHOD
Expand Down
3 changes: 2 additions & 1 deletion charts/lumigo-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ metricsService:
type: ClusterIP
endpoint:
otlp:
url: https://ga-otlp.lumigo-tracer-edge.golumigo.com
url: https://ga-otlp.lumigo-tracer-edge.golumigo.com
harelmo-lumigo marked this conversation as resolved.
Show resolved Hide resolved
logs_url: https://ga-otlp.lumigo-tracer-edge.golumigo.com
2 changes: 2 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ spec:
value: Kustomize
- name: LUMIGO_ENDPOINT
value: https://ga-otlp.lumigo-tracer-edge.golumigo.com
- name: LUMIGO_LOGS_ENDPOINT
value: https://ga-otlp.lumigo-tracer-edge.golumigo.com
ports:
- containerPort: 4318
name: otlphttp
Expand Down
4 changes: 2 additions & 2 deletions controller/src/api/v1alpha1/lumigo_webhook_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ var _ = BeforeSuite(func() {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: false,
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
WebhookInstallOptions: envtest.WebhookInstallOptions{
Paths: []string{filepath.Join("..", "..", "config", "webhook")},
},
Expand Down
5 changes: 3 additions & 2 deletions controller/src/controllers/lumigo_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ type LumigoReconciler struct {
LumigoOperatorVersion string
LumigoInjectorImage string
TelemetryProxyOtlpServiceUrl string
TelemetryProxyOtlpLogsServiceUrl string
TelemetryProxyNamespaceConfigurationsPath string
}

Expand Down Expand Up @@ -489,7 +490,7 @@ func (r *LumigoReconciler) updateStatusIfNeeded(ctx context.Context, logger logr
}

func (r *LumigoReconciler) injectLumigoIntoResources(ctx context.Context, lumigo *operatorv1alpha1.Lumigo, log *logr.Logger) error {
mutator, err := mutation.NewMutator(log, &lumigo.Spec.LumigoToken, r.LumigoOperatorVersion, r.LumigoInjectorImage, r.TelemetryProxyOtlpServiceUrl)
mutator, err := mutation.NewMutator(log, &lumigo.Spec.LumigoToken, r.LumigoOperatorVersion, r.LumigoInjectorImage, r.TelemetryProxyOtlpServiceUrl, r.TelemetryProxyOtlpLogsServiceUrl)
if err != nil {
return fmt.Errorf("cannot instantiate mutator: %w", err)
}
Expand Down Expand Up @@ -688,7 +689,7 @@ func (r *LumigoReconciler) injectLumigoIntoResources(ctx context.Context, lumigo

func (r *LumigoReconciler) removeLumigoFromResources(ctx context.Context, lumigo *operatorv1alpha1.Lumigo, log *logr.Logger) error {
namespace := lumigo.Namespace
mutator, err := mutation.NewMutator(log, nil, r.LumigoOperatorVersion, r.LumigoInjectorImage, r.TelemetryProxyOtlpServiceUrl)
mutator, err := mutation.NewMutator(log, nil, r.LumigoOperatorVersion, r.LumigoInjectorImage, r.TelemetryProxyOtlpServiceUrl, r.TelemetryProxyOtlpLogsServiceUrl)
if err != nil {
return fmt.Errorf("cannot instantiate mutator: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion controller/src/controllers/lumigo_controller_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ var _ = BeforeSuite(func() {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
}

Expand Down
29 changes: 16 additions & 13 deletions controller/src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ func startManager(metricsAddr string, probeAddr string, enableLeaderElection boo
}

telemetryProxyOtlpService := lumigoEndpoint + "/v1/traces" // TODO: Fix it when the distros use the Lumigo endpoint as root
telemetryProxyOtlpLogsService := lumigoEndpoint + "/v1/logs"

namespaceConfigurationsPath, isSet := os.LookupEnv("LUMIGO_NAMESPACE_CONFIGURATIONS")
if !isSet {
Expand All @@ -151,26 +152,28 @@ func startManager(metricsAddr string, probeAddr string, enableLeaderElection boo
}

if err = (&controllers.LumigoReconciler{
Client: mgr.GetClient(),
Clientset: clientset,
DynamicClient: dynamicClient,
EventRecorder: mgr.GetEventRecorderFor(fmt.Sprintf("lumigo-operator.v%s/controller", lumigoOperatorVersion)),
Scheme: mgr.GetScheme(),
LumigoOperatorVersion: lumigoOperatorVersion,
LumigoInjectorImage: lumigoInjectorImage,
TelemetryProxyOtlpServiceUrl: telemetryProxyOtlpService,
Client: mgr.GetClient(),
Clientset: clientset,
DynamicClient: dynamicClient,
EventRecorder: mgr.GetEventRecorderFor(fmt.Sprintf("lumigo-operator.v%s/controller", lumigoOperatorVersion)),
Scheme: mgr.GetScheme(),
LumigoOperatorVersion: lumigoOperatorVersion,
LumigoInjectorImage: lumigoInjectorImage,
TelemetryProxyOtlpServiceUrl: telemetryProxyOtlpService,
TelemetryProxyOtlpLogsServiceUrl: telemetryProxyOtlpLogsService,
TelemetryProxyNamespaceConfigurationsPath: namespaceConfigurationsPath,
Log: logger,
}).SetupWithManager(mgr); err != nil {
return fmt.Errorf("unable to create controller: %w", err)
}

if err = (&injector.LumigoInjectorWebhookHandler{
EventRecorder: mgr.GetEventRecorderFor(fmt.Sprintf("lumigo-operator.v%s/injector-webhook", lumigoOperatorVersion)),
LumigoOperatorVersion: lumigoOperatorVersion,
LumigoInjectorImage: lumigoInjectorImage,
TelemetryProxyOtlpServiceUrl: telemetryProxyOtlpService,
Log: logger,
EventRecorder: mgr.GetEventRecorderFor(fmt.Sprintf("lumigo-operator.v%s/injector-webhook", lumigoOperatorVersion)),
LumigoOperatorVersion: lumigoOperatorVersion,
LumigoInjectorImage: lumigoInjectorImage,
TelemetryProxyOtlpServiceUrl: telemetryProxyOtlpService,
TelemetryProxyOtlpLogsServiceUrl: telemetryProxyOtlpLogsService,
Log: logger,
}).SetupWebhookWithManager(mgr); err != nil {
return fmt.Errorf("unable to create injector webhook: %w", err)
}
Expand Down
17 changes: 16 additions & 1 deletion controller/src/mutation/mutate.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const LumigoInjectorVolumeName = "lumigo-injector"
const LumigoInjectorVolumeMountPoint = "/opt/lumigo"
const LumigoTracerTokenEnvVarName = "LUMIGO_TRACER_TOKEN"
const LumigoEndpointEnvVarName = "LUMIGO_ENDPOINT"
const LumigoLogsEndpointEnvVarName = "LUMIGO_LOGS_ENDPOINT"
const LumigoContainerNameEnvVarName = "LUMIGO_CONTAINER_NAME"
const LdPreloadEnvVarName = "LD_PRELOAD"
const LdPreloadEnvVarValue = LumigoInjectorVolumeMountPoint + "/injector/lumigo_injector.so"
Expand Down Expand Up @@ -78,6 +79,7 @@ type mutatorImpl struct {
log *logr.Logger
lumigoAutotraceLabelValue string
lumigoEndpoint string
lumigoLogsEndpoint string
lumigoToken *operatorv1alpha1.Credentials
lumigoInjectorImage string
}
Expand All @@ -86,7 +88,7 @@ func (m *mutatorImpl) GetAutotraceLabelValue() string {
return m.lumigoAutotraceLabelValue
}

func NewMutator(Log *logr.Logger, LumigoToken *operatorv1alpha1.Credentials, LumigoOperatorVersion string, LumigoInjectorImage string, TelemetryProxyOtlpServiceUrl string) (Mutator, error) {
func NewMutator(Log *logr.Logger, LumigoToken *operatorv1alpha1.Credentials, LumigoOperatorVersion string, LumigoInjectorImage string, TelemetryProxyOtlpServiceUrl string, TelemetryProxyOtlpLogsServiceUrl string) (Mutator, error) {
version := LumigoOperatorVersion

if len(version) > 8 {
Expand All @@ -97,6 +99,7 @@ func NewMutator(Log *logr.Logger, LumigoToken *operatorv1alpha1.Credentials, Lum
log: Log,
lumigoAutotraceLabelValue: LumigoAutoTraceLabelVersionPrefixValue + version,
lumigoEndpoint: TelemetryProxyOtlpServiceUrl,
lumigoLogsEndpoint: TelemetryProxyOtlpLogsServiceUrl,
lumigoToken: LumigoToken,
lumigoInjectorImage: LumigoInjectorImage,
}, nil
Expand Down Expand Up @@ -403,6 +406,18 @@ func (m *mutatorImpl) injectLumigoIntoPodSpec(podSpec *corev1.PodSpec) error {
} else {
envVars[lumigoEndpointEnvVarIndex] = *lumigoEndpointEnvVar
}

lumigoLogsEndpointEnvVar := &corev1.EnvVar{
Name: LumigoLogsEndpointEnvVarName,
Value: m.lumigoLogsEndpoint,
}
lumigoLogsEndpointEnvVarIndex := slices.IndexFunc(envVars, func(c corev1.EnvVar) bool { return c.Name == LumigoLogsEndpointEnvVarName })
if lumigoLogsEndpointEnvVarIndex < 0 {
envVars = append(envVars, *lumigoLogsEndpointEnvVar)
} else {
envVars[lumigoLogsEndpointEnvVarIndex] = *lumigoLogsEndpointEnvVar
}

lumigoContainerNameEnvVar := &corev1.EnvVar{
Name: LumigoContainerNameEnvVarName,
Value: container.Name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ var _ = BeforeSuite(func() {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: false,
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
WebhookInstallOptions: envtest.WebhookInstallOptions{
Paths: []string{filepath.Join("..", "..", "config", "webhooks")},
Paths: []string{filepath.Join("..", "..", "..", "..", "config", "webhooks")},
},
}

Expand Down
11 changes: 6 additions & 5 deletions controller/src/webhooks/injector/injector_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ type LumigoInjectorWebhookHandler struct {
client.Client
record.EventRecorder
*admission.Decoder
LumigoOperatorVersion string
LumigoInjectorImage string
TelemetryProxyOtlpServiceUrl string
Log logr.Logger
LumigoOperatorVersion string
LumigoInjectorImage string
TelemetryProxyOtlpServiceUrl string
TelemetryProxyOtlpLogsServiceUrl string
Log logr.Logger
}

func (h *LumigoInjectorWebhookHandler) SetupWebhookWithManager(mgr ctrl.Manager) error {
Expand Down Expand Up @@ -132,7 +133,7 @@ func (h *LumigoInjectorWebhookHandler) Handle(ctx context.Context, request admis
return admission.Allowed(fmt.Sprintf("The Lumigo object in the '%s' namespace is not active; resource will not be mutated", namespace))
}

mutator, err := mutation.NewMutator(&log, &lumigo.Spec.LumigoToken, h.LumigoOperatorVersion, h.LumigoInjectorImage, h.TelemetryProxyOtlpServiceUrl)
mutator, err := mutation.NewMutator(&log, &lumigo.Spec.LumigoToken, h.LumigoOperatorVersion, h.LumigoInjectorImage, h.TelemetryProxyOtlpServiceUrl, h.TelemetryProxyOtlpLogsServiceUrl)
if err != nil {
return admission.Allowed(fmt.Errorf("cannot instantiate mutator: %w", err).Error())
}
Expand Down
18 changes: 10 additions & 8 deletions controller/src/webhooks/injector/injector_webhook_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ var lumigoApiVersion = fmt.Sprintf("%s/%s", operatorv1alpha1.GroupVersion.Group,
var lumigoOperatorVersion = "2b1e6b60ca871edee1d8f543c400f0b24663349144b78c79cfa006efaad6176a" // Unrealistically long, but we need to ensure we don't set label values too long
var lumigoInjectorImage = "localhost:5000/lumigo-autotrace:test"
var telemetryProxyOtlpServiceUrl = "lumigo-telemetry-proxy.lumigo-system.svc.cluster.local"
var telemetryProxyOtlpLogsServiceUrl = telemetryProxyOtlpServiceUrl

var statusActive = operatorv1alpha1.LumigoStatus{
Conditions: []operatorv1alpha1.LumigoCondition{
Expand Down Expand Up @@ -117,10 +118,10 @@ var _ = BeforeSuite(func() {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: false,
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
WebhookInstallOptions: envtest.WebhookInstallOptions{
Paths: []string{filepath.Join("..", "..", "config", "webhooks")},
Paths: []string{filepath.Join("..", "..", "..", "..", "config", "webhooks")},
},
}

Expand Down Expand Up @@ -174,11 +175,12 @@ var _ = BeforeSuite(func() {
Expect(err).NotTo(HaveOccurred())

err = (&LumigoInjectorWebhookHandler{
EventRecorder: mgr.GetEventRecorderFor(fmt.Sprintf("lumigo-operator.v%s", lumigoOperatorVersion)),
LumigoOperatorVersion: lumigoOperatorVersion,
LumigoInjectorImage: lumigoInjectorImage,
TelemetryProxyOtlpServiceUrl: telemetryProxyOtlpServiceUrl,
Log: ctrl.Log.WithName("injector-webhook").WithName("Lumigo"),
EventRecorder: mgr.GetEventRecorderFor(fmt.Sprintf("lumigo-operator.v%s", lumigoOperatorVersion)),
LumigoOperatorVersion: lumigoOperatorVersion,
LumigoInjectorImage: lumigoInjectorImage,
TelemetryProxyOtlpServiceUrl: telemetryProxyOtlpServiceUrl,
TelemetryProxyOtlpLogsServiceUrl: telemetryProxyOtlpLogsServiceUrl,
Log: ctrl.Log.WithName("injector-webhook").WithName("Lumigo"),
}).SetupWebhookWithManager(mgr)
Expect(err).NotTo(HaveOccurred())

Expand Down
2 changes: 2 additions & 0 deletions helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,8 @@ spec:
readOnlyRootFilesystem: true
runAsNonRoot: true
- env:
- name: LUMIGO_LOGS_ENDPOINT
value: https://ga-otlp.lumigo-tracer-edge.golumigo.com
- name: LUMIGO_ENDPOINT
value: https://ga-otlp.lumigo-tracer-edge.golumigo.com
- mountPath: /lumigo/etc/namespaces/
Expand Down
19 changes: 19 additions & 0 deletions telemetryproxy/docker/etc/config.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ exporters:
endpoint: {{ env.Getenv "LUMIGO_ENDPOINT" "https://ga-otlp.lumigo-tracer-edge.golumigo.com" }}
auth:
authenticator: headers_setter/lumigo
otlphttp/lumigo_logs:
endpoint: {{ env.Getenv "LUMIGO_LOGS_ENDPOINT" "https://ga-otlp.lumigo-tracer-edge.golumigo.com" }}
auth:
authenticator: headers_setter/lumigo
{{- if $debug }}
logging:
verbosity: detailed
Expand Down Expand Up @@ -233,6 +237,21 @@ service:
- logging
{{- end }}
- otlphttp/lumigo_ns_{{ $namespace.name }}
logs/application_logs_ns_{{ $namespace.name }}:
receivers:
- otlp
processors:
- k8sdataenricherprocessor
- transform/add_ns_attributes_ns_{{ $namespace.name }}
{{- if $clusterName }}
- transform/add_cluster_name
{{- end }}
- transform/inject_operator_details_into_resource
exporters:
{{- if $config.debug }}
- logging
{{- end }}
- otlphttp/lumigo_logs
logs/k8s_objects_ns_{{ $namespace.name }}:
receivers:
- k8sobjects/objects_ns_{{ $namespace.name }}
Expand Down
Loading
Loading