Skip to content

Commit

Permalink
PLT-6117 Set default otel service names in docker images.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwbush committed Jun 2, 2023
1 parent 769d87d commit 80af6c6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
6 changes: 0 additions & 6 deletions deploy/nomadTasks.nix
Expand Up @@ -36,7 +36,6 @@ rec
DB_NAME = "\${NOMAD_META_environment}_chainsync";
MASTER_REPLICA_SRV_DNS = "_infra-database._master.service.us-east-1.consul";
HTTP_PORT = "\${NOMAD_PORT_chain_indexer_http}";
OTEL_SERVICE_NAME = "marlowe-chain-indexer";
};
template = dbTemplate "chainsync";
config.image = ociNamer oci-images.marlowe-chain-indexer;
Expand Down Expand Up @@ -70,7 +69,6 @@ rec
DB_NAME = "\${NOMAD_META_environment}_chainsync";
MASTER_REPLICA_SRV_DNS = "_infra-database._master.service.us-east-1.consul";
HTTP_PORT = "\${NOMAD_PORT_chain_sync_http}";
OTEL_SERVICE_NAME = "marlowe-chain-sync";
};
template = dbTemplate "chainsync";
config.image = ociNamer oci-images.marlowe-chain-sync;
Expand Down Expand Up @@ -102,7 +100,6 @@ rec
MARLOWE_CHAIN_SYNC_PORT = "\${NOMAD_PORT_marlowe_chain_sync}";
MARLOWE_CHAIN_SYNC_QUERY_PORT = "\${NOMAD_PORT_marlowe_chain_sync_query}";
HTTP_PORT = "\${NOMAD_PORT_indexer_http}";
OTEL_SERVICE_NAME = "marlowe-indexer";
};
template = dbTemplate "marlowe";
config.image = ociNamer oci-images.marlowe-indexer;
Expand All @@ -129,7 +126,6 @@ rec
MARLOWE_HEADER_SYNC_PORT = "\${NOMAD_PORT_marlowe_header_sync}";
MARLOWE_QUERY_PORT = "\${NOMAD_PORT_marlowe_query}";
HTTP_PORT = "\${NOMAD_PORT_sync_http}";
OTEL_SERVICE_NAME = "marlowe-sync";
};
template = dbTemplate "marlowe";
config.image = ociNamer oci-images.marlowe-sync;
Expand Down Expand Up @@ -157,7 +153,6 @@ rec
MARLOWE_CHAIN_SYNC_QUERY_PORT = "\${NOMAD_PORT_marlowe_chain_sync_query}";
MARLOWE_CHAIN_SYNC_COMMAND_PORT = "\${NOMAD_PORT_marlowe_chain_sync_command}";
HTTP_PORT = "\${NOMAD_PORT_tx_http}";
OTEL_SERVICE_NAME = "marlowe-tx";
};
config.image = ociNamer oci-images.marlowe-tx;
config.ports = [ "tx" "tx_http" ];
Expand All @@ -178,7 +173,6 @@ rec
# TODO replace with a persistent volume
STORE_DIR = "/tmp/store";
HTTP_PORT = "\${NOMAD_PORT_contract_http}";
OTEL_SERVICE_NAME = "marlowe-contract";
};
config.image = ociNamer oci-images.marlowe-contract;
config.ports = [ "marlowe_load" "contract_query" "contract_http" ];
Expand Down
16 changes: 16 additions & 0 deletions deploy/operables.nix
Expand Up @@ -171,6 +171,8 @@ in
${wait-for-socket}/bin/wait-for-socket "$CARDANO_NODE_SOCKET_PATH"
export OTEL_SERVICE_NAME="''${OTEL_SERVICE_NAME:-marlowe-chain-indexer}"
${packages.marlowe-chain-indexer}/bin/marlowe-chain-indexer \
--socket-path "$CARDANO_NODE_SOCKET_PATH" \
--database-uri "$DATABASE_URI" \
Expand Down Expand Up @@ -228,6 +230,8 @@ in
${wait-for-socket}/bin/wait-for-socket "$CARDANO_NODE_SOCKET_PATH"
export OTEL_SERVICE_NAME="''${OTEL_SERVICE_NAME:-marlowe-chain-sync}"
DATABASE_URI=${database-uri}
${packages.marlowe-chain-sync}/bin/marlowe-chain-sync \
--host "$HOST" \
Expand Down Expand Up @@ -287,6 +291,8 @@ in
${wait-for-tcp}/bin/wait-for-tcp "$MARLOWE_CHAIN_SYNC_HOST" "$MARLOWE_CHAIN_SYNC_PORT"
export OTEL_SERVICE_NAME="''${OTEL_SERVICE_NAME:-marlowe-indexer}"
${packages.marlowe-indexer}/bin/marlowe-indexer \
--database-uri "$DATABASE_URI" \
--chain-sync-port "$MARLOWE_CHAIN_SYNC_PORT" \
Expand Down Expand Up @@ -332,6 +338,8 @@ in
[ -z "''${DB_HOST:-}" ] && echo "DB_HOST env var must be set -- aborting" && exit 1
export OTEL_SERVICE_NAME="''${OTEL_SERVICE_NAME:-marlowe-sync}"
DATABASE_URI=${database-uri}
${packages.marlowe-sync}/bin/marlowe-sync \
--database-uri "$DATABASE_URI" \
Expand Down Expand Up @@ -369,6 +377,8 @@ in
${wait-for-tcp}/bin/wait-for-tcp "$MARLOWE_CHAIN_SYNC_HOST" "$MARLOWE_CHAIN_SYNC_PORT"
export OTEL_SERVICE_NAME="''${OTEL_SERVICE_NAME:-marlowe-tx}"
${packages.marlowe-tx}/bin/marlowe-tx \
--host "$HOST" \
--command-port "$PORT" \
Expand Down Expand Up @@ -405,6 +415,8 @@ in
mkdir -p /tmp /store
export OTEL_SERVICE_NAME="''${OTEL_SERVICE_NAME:-marlowe-contract}"
${packages.marlowe-contract}/bin/marlowe-contract \
--host "$HOST" \
--port "$PORT" \
Expand Down Expand Up @@ -450,6 +462,8 @@ in
${wait-for-tcp}/bin/wait-for-tcp "$CONTRACT_HOST" "$LOAD_PORT"
${wait-for-tcp}/bin/wait-for-tcp "$SYNC_HOST" "$MARLOWE_QUERY_PORT"
export OTEL_SERVICE_NAME="''${OTEL_SERVICE_NAME:-marlowe-proxy}"
${packages.marlowe-proxy}/bin/marlowe-proxy \
--host "$HOST" \
--port "$PORT" \
Expand Down Expand Up @@ -488,6 +502,8 @@ in
${wait-for-tcp}/bin/wait-for-tcp "$RUNTIME_HOST" "$RUNTIME_PORT"
export OTEL_SERVICE_NAME="''${OTEL_SERVICE_NAME:-marlowe-web-server}"
${packages.marlowe-web-server}/bin/marlowe-web-server \
--http-port "$PORT" \
--marlowe-runtime-host "$RUNTIME_HOST" \
Expand Down

0 comments on commit 80af6c6

Please sign in to comment.