Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Disable OpenTelemetry and accept all CORS origins in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mkralik3 committed Jun 20, 2023
1 parent 225e2fd commit d42242e
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ You can run it with the following command:

`docker run --rm -d -p 8081:8081 kaotoio/backend`

### Using OpenTelemetry tracing

Kaoto-backend provides OpenTelemetry tracing. By default, OpenTelemetry SDK Autoconfigure is disabled.
It can be enabled by `quarkus.otel.sdk.disabled=false`
Note that after that, the OTLP Exporter (e.g. Jaeger) is expected on `http://localhost:4317/` but the endpoint can be overridden via `quarkus.otel.exporter.otlp.traces.endpoint` configuration property.
For more information and all configuration properties, see [Quarkus OpenTelemetry guide](https://quarkus.io/guides/opentelemetry)

### CORS

[CORS filter](https://quarkus.io/guides/http-reference#cors-filter) is enabled by default.
For proper functionality with the Kaoto-ui, it is necessary to set `quarkus.http.cors.origins` configuration property with Kaoto-ui URL(s).
For more information and all configuration properties, see [Quarkus HTTP Reference](https://quarkus.io/guides/http-reference#quarkus-vertx-http-config-group-cors-cors-config_configuration)

Note: When you run Kaoto-backend in the dev mode, all origins are accepted.

## Developing Kaoto

Developer documentation is on https://kaotoio.github.io/kaoto-backend/
Expand Down
9 changes: 9 additions & 0 deletions api/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"%dev":
quarkus:
http:
cors:
# allows all origins during dev mode
origins: /.*/
repository:
step:
jar:
Expand Down Expand Up @@ -49,3 +54,7 @@ quarkus:
class: org.quartz.plugins.history.LoggingJobHistoryPlugin
properties:
jobSuccessMessage: "Job [{1}.{0}] execution complete and reports: {8}"
# disable OpenTelemetry SDK Autoconfigure by default
otel:
sdk:
disabled: true
1 change: 1 addition & 0 deletions api/src/test/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ quarkus.log.category."io.kaoto.backend.deployment".level=TRACE
quarkus.jacoco.excludes=**/model/**/*
quarkus.jacoco.title=Kaoto Backend Coverage
quarkus.swagger-ui.always-include=true
quarkus.otel.sdk.disabled=true
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ quarkus.http.test-ssl-port=8448
quarkus.kubernetes-client.namespace=default
quarkus.jacoco.excludes=**/model/**/*
quarkus.kubernetes-client.devservices.enabled=false
quarkus.otel.sdk.disabled=true
1 change: 1 addition & 0 deletions cluster/src/test/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ quarkus.http.test-port=8087
quarkus.http.test-ssl-port=8447
quarkus.jacoco.excludes=**/model/**/*
quarkus.kubernetes-client.namespace=default
quarkus.otel.sdk.disabled=true
1 change: 1 addition & 0 deletions kamelet-support/src/test/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ quarkus.http.test-port=8083
quarkus.http.test-ssl-port=8443
quarkus.kubernetes-client.namespace=default
quarkus.jacoco.excludes=**/model/**/*
quarkus.otel.sdk.disabled=true

0 comments on commit d42242e

Please sign in to comment.