diff --git a/scripts/tracegen.py b/scripts/tracegen.py index c5fcd5f..76ffb4d 100644 --- a/scripts/tracegen.py +++ b/scripts/tracegen.py @@ -41,7 +41,7 @@ def emit_trace( def _export_trace(span_exporter, log_trace_to_console: bool = False, nonce: Any = None, protocol: Literal["grpc", "http"] = "http"): resource = Resource.create(attributes={ - "service.name": f"tracegen{protocol}", + "service.name": f"tracegen-{protocol}", "nonce": str(nonce) } ) diff --git a/tests/integration/helpers.py b/tests/integration/helpers.py index 3e19cbc..5b8ffac 100644 --- a/tests/integration/helpers.py +++ b/tests/integration/helpers.py @@ -313,7 +313,7 @@ async def deploy_cluster(ops_test: OpsTest, tempo_app=APP_NAME): ) -def get_traces(tempo_host: str, service_name="tracegenhttp", tls=True): +def get_traces(tempo_host: str, service_name="tracegen-http", tls=True): url = f"{'https' if tls else 'http'}://{tempo_host}:3200/api/search?tags=service.name={service_name}" req = requests.get( url, @@ -325,7 +325,7 @@ def get_traces(tempo_host: str, service_name="tracegenhttp", tls=True): @retry(stop=stop_after_attempt(15), wait=wait_exponential(multiplier=1, min=4, max=10)) -async def get_traces_patiently(tempo_host, service_name="tracegenhttp", tls=True): +async def get_traces_patiently(tempo_host, service_name="tracegen-http", tls=True): traces = get_traces(tempo_host, service_name=service_name, tls=tls) assert len(traces) > 0 return traces diff --git a/tests/integration/test_ingressed_tls.py b/tests/integration/test_ingressed_tls.py index afdcec2..3741f04 100644 --- a/tests/integration/test_ingressed_tls.py +++ b/tests/integration/test_ingressed_tls.py @@ -135,7 +135,7 @@ async def test_verify_ingressed_traces_grpc_tls(ops_test: OpsTest, nonce, server f"{tempo_host}:4317", nonce=nonce, proto="grpc", ops_test=ops_test, use_cert=True ) # THEN we can verify it's been ingested - assert await get_traces_patiently(tempo_host, service_name="grpc") + assert await get_traces_patiently(tempo_host, service_name="tracegen-grpc") @pytest.mark.teardown diff --git a/tests/integration/test_tls.py b/tests/integration/test_tls.py index a1e5c31..8fb3e27 100644 --- a/tests/integration/test_tls.py +++ b/tests/integration/test_tls.py @@ -122,7 +122,9 @@ async def test_verify_traces_grpc_tls(ops_test: OpsTest, nonce, server_cert): # WHEN we emit a trace secured with TLS await emit_trace(tempo_endpoint, ops_test, nonce=nonce, verbose=1, proto="grpc", use_cert=True) # THEN we can verify it's been ingested - await get_traces_patiently(await get_application_ip(ops_test, APP_NAME), service_name="grpc") + await get_traces_patiently( + await get_application_ip(ops_test, APP_NAME), service_name="tracegen-grpc" + ) @pytest.mark.teardown