Skip to content

Commit

Permalink
fix names
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldmitry committed Jul 26, 2024
1 parent 4d0452b commit 519bdd1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/tracegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
)
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_ingressed_tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/test_tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 519bdd1

Please sign in to comment.