Skip to content

Commit 20e9e34

Browse files
Merge pull request #270 from crabnebula-dev/fix/health-check
fix: remove health stream usage
2 parents 8212279 + 12f7c82 commit 20e9e34

2 files changed

Lines changed: 0 additions & 19 deletions

File tree

clients/web/src/components/health-status.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,7 @@ const variant = (status: HealthCheckResponse_ServingStatus) => {
3535
export function HealthStatus() {
3636
const updateErrorHandler = () => {
3737
console.error("an error happened on Updates Stream");
38-
// if (isConnectionDead()) {
39-
/**
40-
* we do nothing because it's not an instrumentation issue.
41-
*/
42-
return;
43-
// }
44-
};
4538

46-
const healthErrorHandler = () => {
47-
console.error("an error happened on Health Stream");
4839
setMonitorData("health", 0);
4940
setConnectionDead(true);
5041

@@ -57,7 +48,6 @@ export function HealthStatus() {
5748
attempts: 5,
5849
});
5950
};
60-
6151
/* undefined = failed to reconnect
6252
-1 = reconnecting
6353
> 0 = time until reconnect
@@ -139,7 +129,6 @@ export function HealthStatus() {
139129
monitorData,
140130
);
141131

142-
connectionStore.stream.health.responses.onError(healthErrorHandler);
143132
connectionStore.stream.update.responses.onError(updateErrorHandler);
144133
}
145134

@@ -148,7 +137,6 @@ export function HealthStatus() {
148137
const [isConnectionDead, setConnectionDead] = createSignal(false);
149138

150139
onMount(() => {
151-
connectionStore.stream.health.responses.onError(healthErrorHandler);
152140
connectionStore.stream.update.responses.onError(updateErrorHandler);
153141
});
154142

clients/web/src/lib/connection/transport.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,6 @@ export function connect(url: string) {
6363
const sourcesClient = new SourcesClient(transport);
6464
const metaClient = new MetadataClient(transport);
6565

66-
const healthStream = healthClient.watch(
67-
/**
68-
* empty string means all services.
69-
*/
70-
HealthCheckRequest.create({ service: "" }),
71-
);
7266
const updateStream = instrumentClient.watchUpdates(
7367
InstrumentRequest.create({}),
7468
);
@@ -84,7 +78,6 @@ export function connect(url: string) {
8478
meta: metaClient,
8579
},
8680
stream: {
87-
health: healthStream,
8881
update: updateStream,
8982
},
9083
};

0 commit comments

Comments
 (0)