Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Khoyo committed Jul 8, 2024
1 parent 3e2ef68 commit 27d726e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 16 deletions.
2 changes: 2 additions & 0 deletions core/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
build
Dockerfile
.gradle
.idea
2 changes: 1 addition & 1 deletion core/src/main/java/fr/sncf/osrd/cli/WorkerCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class WorkerCommand : CliCommand {
}

override fun get(carrier: Map<String, Any>?, key: String): String? {
return carrier?.get(key) as String?
return (carrier?.get(key) as ByteArray?)?.decodeToString()
}
}

Expand Down
16 changes: 1 addition & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
1 change: 1 addition & 0 deletions editoast/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ impl CoreClient {
CoreError::UnparsableErrorOutput.into()
}

#[tracing::instrument(name = "core::fetch", skip_all, err, fields(path))]
async fn fetch<B: Serialize, R: CoreResponse>(
&self,
method: reqwest::Method,
Expand Down
1 change: 1 addition & 0 deletions editoast/src/core/mq_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 27d726e

Please sign in to comment.