Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2] Configure health check extension for all configs #5861

Merged
merged 32 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2d6c6a9
Added healthcheck to config.taml
Wise-Wizard Aug 18, 2024
2b2ca68
Add health ext to all configs
Wise-Wizard Aug 19, 2024
b31bf19
Added e2e test
Wise-Wizard Aug 19, 2024
12851ff
Added config for other storage
Wise-Wizard Aug 19, 2024
bd5b614
Add extension to Kafka
Wise-Wizard Aug 19, 2024
8a9582a
Resolved Comments
Wise-Wizard Aug 21, 2024
f4d180a
Merge branch 'main' into V2/Health_Check
Wise-Wizard Aug 21, 2024
7a010c5
Edited file path
Wise-Wizard Aug 21, 2024
fb3dc14
Test config
Wise-Wizard Aug 21, 2024
af87deb
Add different port
Wise-Wizard Aug 21, 2024
333fdbc
Merge branch 'main' into V2/Health_Check
Wise-Wizard Aug 21, 2024
be1ccd6
Merge branch 'main' into V2/Health_Check
yurishkuro Aug 21, 2024
1a2d577
Changed port to 13133 for all storages
Wise-Wizard Aug 21, 2024
4f4d21a
Merge branch 'V2/Health_Check' of https://github.com/Wise-Wizard/jaeg…
Wise-Wizard Aug 21, 2024
294ba5a
refactor
yurishkuro Aug 21, 2024
4861447
fix
yurishkuro Aug 21, 2024
b054725
swap port, improve logging
yurishkuro Aug 21, 2024
6ffc727
fix-typo
yurishkuro Aug 21, 2024
e6bfa61
Modified config file
Wise-Wizard Aug 22, 2024
06220d0
Move HC Call
Wise-Wizard Aug 22, 2024
383946d
Move HC Call back
Wise-Wizard Aug 22, 2024
5a9ac06
Merge branch 'main' into V2/Health_Check
Wise-Wizard Aug 22, 2024
95db3c2
log found traces
yurishkuro Aug 22, 2024
6b1189f
fix
yurishkuro Aug 22, 2024
cfa9864
undo
yurishkuro Aug 22, 2024
13bf5b2
simpler
yurishkuro Aug 22, 2024
921d564
revert grpc to original health check
yurishkuro Aug 22, 2024
e9f2438
fix
yurishkuro Aug 22, 2024
b5a675e
try to minimize configuration
yurishkuro Aug 23, 2024
7a381e0
improve logging
yurishkuro Aug 23, 2024
a7c11e9
undo grpc check override
yurishkuro Aug 23, 2024
b1d0431
redo override
yurishkuro Aug 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmd/jaeger/config-badger.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
service:
extensions: [jaeger_storage, jaeger_query]
extensions: [jaeger_storage, jaeger_query, healthcheckv2]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [jaeger_storage_exporter]

extensions:
healthcheckv2:
use_v2: true
http:
endpoint: "0.0.0.0:13133"
grpc:
jaeger_query:
trace_storage: some_store
trace_storage_archive: another_store
Expand Down
7 changes: 6 additions & 1 deletion cmd/jaeger/config-cassandra.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
service:
extensions: [jaeger_storage, jaeger_query]
extensions: [jaeger_storage, jaeger_query, healthcheckv2]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [jaeger_storage_exporter]

extensions:
healthcheckv2:
use_v2: true
http:
endpoint: "0.0.0.0:13133"
grpc:
jaeger_query:
trace_storage: some_storage
trace_storage_archive: another_storage
Expand Down
7 changes: 6 additions & 1 deletion cmd/jaeger/config-elasticsearch.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
service:
extensions: [jaeger_storage, jaeger_query]
extensions: [jaeger_storage, jaeger_query, healthcheckv2]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [jaeger_storage_exporter]

extensions:
healthcheckv2:
use_v2: true
http:
endpoint: "0.0.0.0:13133"
grpc:
jaeger_query:
trace_storage: some_storage
trace_storage_archive: another_storage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
service:
extensions: [healthcheckv2]
pipelines:
traces:
receivers: [otlp, jaeger]
Expand All @@ -10,6 +11,13 @@ service:
metrics:
level: detailed

extensions:
healthcheckv2:
use_v2: true
http:
endpoint: "0.0.0.0:14133"
grpc:

receivers:
otlp:
protocols:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
service:
extensions: [jaeger_storage, jaeger_query]
extensions: [jaeger_storage, jaeger_query, healthcheckv2]
pipelines:
traces:
receivers: [kafka]
Expand All @@ -12,6 +12,11 @@ service:
level: debug

extensions:
healthcheckv2:
use_v2: true
http:
endpoint: "localhost:13133"
grpc:
jaeger_query:
trace_storage: some_storage

Expand All @@ -21,7 +26,7 @@ extensions:
memory:
max_traces: 100000

receivers:
receivers:
kafka:
brokers:
- localhost:9092
Expand Down
7 changes: 6 additions & 1 deletion cmd/jaeger/config-opensearch.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
service:
extensions: [jaeger_storage, jaeger_query]
extensions: [jaeger_storage, jaeger_query, healthcheckv2]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [jaeger_storage_exporter]

extensions:
healthcheckv2:
use_v2: true
http:
endpoint: "0.0.0.0:13133"
grpc:
jaeger_query:
trace_storage: some_storage
trace_storage_archive: another_storage
Expand Down
7 changes: 6 additions & 1 deletion cmd/jaeger/config-remote-storage.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
service:
extensions: [jaeger_storage, jaeger_query]
extensions: [jaeger_storage, jaeger_query, healthcheckv2]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [jaeger_storage_exporter]

extensions:
healthcheckv2:
use_v2: true
http:
endpoint: "0.0.0.0:13133"
grpc:
jaeger_query:
trace_storage: some-storage
ui_config: ./cmd/jaeger/config-ui.json
Expand Down
8 changes: 6 additions & 2 deletions cmd/jaeger/config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
service:
extensions: [jaeger_storage, jaeger_query, remote_sampling]
extensions: [jaeger_storage, jaeger_query, remote_sampling, healthcheckv2]
pipelines:
traces:
receivers: [otlp, jaeger, zipkin]
processors: [batch, adaptive_sampling]
exporters: [jaeger_storage_exporter]

extensions:
# health_check:
healthcheckv2:
use_v2: true
http:
endpoint: "0.0.0.0:13133"
grpc:
# pprof:
# endpoint: 0.0.0.0:1777
# zpages:
Expand Down
20 changes: 19 additions & 1 deletion cmd/jaeger/internal/integration/e2e_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package integration

import (
"context"
"encoding/json"
"fmt"
"io"
"net/http"
Expand Down Expand Up @@ -109,7 +110,24 @@ func (s *E2EStorageIntegration) e2eInitialize(t *testing.T, storage string) {
return false
}
defer resp.Body.Close()
return resp.StatusCode == http.StatusOK
if s.HealthCheckEndpoint == "" {
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
Wise-Wizard marked this conversation as resolved.
Show resolved Hide resolved
return resp.StatusCode == http.StatusOK
}

var healthResponse struct {
Status string `json:"status"`
}
if err := json.NewDecoder(resp.Body).Decode(&healthResponse); err != nil {
t.Logf("Failed to decode JSON response: %v", err)
return false
}

// Check if the status field in the JSON is "StatusOK"
if healthResponse.Status != "StatusOK" {
t.Logf("Received non-StatusOK status: %s", healthResponse.Status)
return false
}
return true
}, 60*time.Second, 3*time.Second, "Jaeger-v2 did not start")
t.Log("Jaeger-v2 is ready")
Wise-Wizard marked this conversation as resolved.
Show resolved Hide resolved
t.Cleanup(func() {
Expand Down
7 changes: 4 additions & 3 deletions cmd/jaeger/internal/integration/kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,20 @@ func TestKafkaStorage(t *testing.T) {

collector := &E2EStorageIntegration{
SkipStorageCleaner: true,
ConfigFile: createConfigWithEncoding(t, "../../collector-with-kafka.yaml", test.encoding, uniqueTopic),
HealthCheckEndpoint: "http://localhost:8888/metrics",
ConfigFile: createConfigWithEncoding(t, "../../config-kafka-collector.yaml", test.encoding, uniqueTopic),
HealthCheckEndpoint: "http://localhost:13133/status",
}
collector.e2eInitialize(t, "kafka")
t.Log("Collector initialized")

ingester := &E2EStorageIntegration{
ConfigFile: createConfigWithEncoding(t, "../../ingester-remote-storage.yaml", test.encoding, uniqueTopic),
ConfigFile: createConfigWithEncoding(t, "../../config-kafka-ingester.yaml", test.encoding, uniqueTopic),
StorageIntegration: integration.StorageIntegration{
CleanUp: purge,
GetDependenciesReturnsSource: true,
SkipArchiveTest: true,
},
HealthCheckEndpoint: "http://localhost:14133/status",
}
ingester.e2eInitialize(t, "kafka")
t.Log("Ingester initialized")
Expand Down
Loading