diff --git a/core/.dockerignore b/core/.dockerignore index 7a530350c9a..1928a977b68 100644 --- a/core/.dockerignore +++ b/core/.dockerignore @@ -1,2 +1,4 @@ build Dockerfile +.gradle +.idea diff --git a/core/src/main/java/fr/sncf/osrd/cli/WorkerCommand.kt b/core/src/main/java/fr/sncf/osrd/cli/WorkerCommand.kt index 4614157fa3c..946187cc0d7 100644 --- a/core/src/main/java/fr/sncf/osrd/cli/WorkerCommand.kt +++ b/core/src/main/java/fr/sncf/osrd/cli/WorkerCommand.kt @@ -158,7 +158,7 @@ class WorkerCommand : CliCommand { } override fun get(carrier: Map?, key: String): String? { - return carrier?.get(key) as String? + return (carrier?.get(key) as ByteArray?)?.decodeToString() } } diff --git a/docker-compose.yml b/docker-compose.yml index 3a17a808304..ecdf17b6892 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,28 +54,14 @@ services: core: image: ghcr.io/openrailassociation/osrd-edge/osrd-core:${TAG-dev} - # container_name: osrd-core + container_name: osrd-core-dummy build: context: core dockerfile: Dockerfile additional_contexts: test_data: tests/data restart: no - ports: ["8080:8080"] command: "true" - environment: - CORE_EDITOAST_URL: "http://osrd-editoast" - JAVA_TOOL_OPTIONS: "-javaagent:/app/opentelemetry-javaagent.jar" - CORE_MONITOR_TYPE: "opentelemetry" - OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: "grpc" - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "http://jaeger:4317" - OTEL_METRICS_EXPORTER: "none" - OTEL_LOGS_EXPORTER: "none" - # healthcheck: - # test: ["CMD", "curl", "-f", "http://localhost:8080/health"] - # start_period: 4s - # interval: 5s - osrdyne: image: ghcr.io/openrailassociation/osrd-edge/osrd-osrdyne:${TAG-dev} diff --git a/editoast/src/core/mod.rs b/editoast/src/core/mod.rs index 94c3e3f401b..2272ec2b0af 100644 --- a/editoast/src/core/mod.rs +++ b/editoast/src/core/mod.rs @@ -114,6 +114,7 @@ impl CoreClient { CoreError::UnparsableErrorOutput.into() } + #[tracing::instrument(name = "core::fetch", skip_all, err, fields(path))] async fn fetch( &self, method: reqwest::Method, diff --git a/editoast/src/core/mq_client.rs b/editoast/src/core/mq_client.rs index 9c25bdc9bbb..b2291b42546 100644 --- a/editoast/src/core/mq_client.rs +++ b/editoast/src/core/mq_client.rs @@ -228,6 +228,7 @@ fn attach_tracing_info(headers: &mut FieldTable) { struct HeaderInjector<'a>(&'a mut FieldTable); impl opentelemetry::propagation::Injector for HeaderInjector<'_> { /// Set a key and value pair on the headers + #[tracing::instrument(name = "headerinjector::set", skip(self))] fn set(&mut self, key: &str, value: String) { let value: ByteArray = value.bytes().collect_vec().into(); self.0.insert(key.into(), value.into());