Skip to content

Commit 7671be6

Browse files
JuArceentropidelic
andauthored
fix(telemetry): set correct configuration for api deployments to prod (#1256)
Co-authored-by: Mariano Nicolini <[email protected]>
1 parent d0d330a commit 7671be6

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

telemetry-docker-compose.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,37 @@ services:
1010
ports:
1111
- "4317:4317"
1212

13+
cassandra:
14+
image: cassandra:latest
15+
container_name: cassandra
16+
hostname: cassandra.local
17+
ports:
18+
- "9042:9042"
19+
environment:
20+
- CASSANDRA_USER=admin
21+
- CASSANDRA_PASSWORD=admin
22+
volumes:
23+
- cassandra-data:/var/lib/cassandra
24+
25+
cassandra-schema:
26+
image: jaegertracing/jaeger-cassandra-schema
27+
depends_on:
28+
- cassandra
29+
1330
jaeger:
1431
image: jaegertracing/all-in-one:1.60
1532
container_name: jaeger
33+
hostname: jaeger.local
1634
ports:
1735
- "16686:16686"
36+
command: ["--cassandra.keyspace=jaeger_v1_dc1"]
37+
environment:
38+
- SPAN_STORAGE_TYPE=cassandra
39+
- CASSANDRA_SERVERS=cassandra.local:9042
40+
- CASSANDRA_USER=admin
41+
- CASSANDRA_PASSWORD=admin
42+
depends_on:
43+
- cassandra-schema
44+
45+
volumes:
46+
cassandra-data:

telemetry_api/config/config.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ config :telemetry_api,
1414
# Configures the endpoint
1515
config :telemetry_api, TelemetryApiWeb.Endpoint,
1616
url: [host: "localhost"],
17+
server: true,
1718
adapter: Bandit.PhoenixAdapter,
1819
render_errors: [
1920
formats: [json: TelemetryApiWeb.ErrorJSON],

telemetry_api/lib/telemetry_api/periodic/operator_fetcher.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ defmodule TelemetryApi.Periodic.OperatorFetcher do
88
@registered 1
99
@deregistered 2
1010

11-
wait_time_str = System.get_env("OPERATOR_FETCHER_WAIT_TIME_MS") ||
11+
@wait_time_str System.get_env("OPERATOR_FETCHER_WAIT_TIME_MS") ||
1212
raise """
1313
environment variable OPERATOR_FETCHER_WAIT_TIME_MS is missing.
1414
"""
1515

1616
@wait_time_ms (
17-
case Integer.parse(wait_time_str) do
18-
:error -> raise("OPERATOR_FETCHER_WAIT_TIME_MS is not a number, received: #{wait_time_str}")
17+
case Integer.parse(@wait_time_str) do
18+
:error -> raise("OPERATOR_FETCHER_WAIT_TIME_MS is not a number, received: #{@wait_time_str}")
1919
{num, _} -> num
2020
end
2121
)

0 commit comments

Comments
 (0)