-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(server): splitting trace poller in multiple queues (#3133)
* wip - isolating trace poller start * Added missing method * fixes * wip - splitting polling * Adding offset to help on requeues for TracePoller * Adding polling stop strategy * Fix context propagation * Updating context propagation * updating logging on trace poller * Fixing trace poller looping logic * Updating dogfooding * Fixing problems in dogfooding * Fix docker compose for dogfooding * Updating trace poller * Fixing poll stop strategy * wip * Update trace polling * Reverting changes unrelated to this PR * Updating trace poller logic * wip * wip * wip * Updating trace poller * wip * Adding more info on poller * fixing trace poller * Update trace poller * Fix unit tests for agent --------- Co-authored-by: Matheus Nogueira <[email protected]>
- Loading branch information
1 parent
3caff14
commit 082bbda
Showing
24 changed files
with
1,023 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
http: | ||
|
||
processors: | ||
batch: | ||
timeout: 100ms | ||
|
||
probabilistic_sampler: | ||
hash_seed: 22 | ||
sampling_percentage: 100 | ||
|
||
exporters: | ||
logging: | ||
loglevel: warn | ||
jaeger: | ||
endpoint: jaeger:14250 | ||
tls: | ||
insecure: true | ||
otlp/tracetest: | ||
endpoint: host.docker.internal:4317 | ||
tls: | ||
insecure: true | ||
|
||
service: | ||
pipelines: | ||
traces: | ||
receivers: [otlp] | ||
processors: [probabilistic_sampler, batch] | ||
exporters: [jaeger, otlp/tracetest, logging] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
version: '3' | ||
services: | ||
postgres: | ||
image: postgres:14 | ||
environment: | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_USER: postgres | ||
healthcheck: | ||
test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" | ||
interval: 1s | ||
timeout: 5s | ||
retries: 60 | ||
ports: | ||
- 5432:5432 | ||
|
||
jaeger: | ||
image: jaegertracing/all-in-one:latest | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ["CMD", "wget", "--spider", "localhost:16686"] | ||
interval: 1s | ||
timeout: 3s | ||
retries: 60 | ||
ports: | ||
- 16685:16685 | ||
- 16686:16686 | ||
|
||
otel-collector: | ||
image: otel/opentelemetry-collector:0.54.0 | ||
command: | ||
- "--config" | ||
- "/otel-local-config.yaml" | ||
volumes: | ||
- ./collector.config.yaml:/otel-local-config.yaml | ||
depends_on: | ||
- jaeger | ||
ports: | ||
- 24317:4317 | ||
|
||
cache: | ||
image: redis:6 | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ["CMD", "redis-cli", "ping"] | ||
interval: 1s | ||
timeout: 3s | ||
retries: 60 | ||
|
||
queue: | ||
image: rabbitmq:3.8-management | ||
restart: unless-stopped | ||
healthcheck: | ||
test: rabbitmq-diagnostics -q check_running | ||
interval: 1s | ||
timeout: 5s | ||
retries: 60 | ||
|
||
stream: | ||
image: confluentinc/cp-kafka:latest-ubi8 | ||
ports: | ||
- 29092:29092 | ||
environment: | ||
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://stream:9092,PLAINTEXT_HOST://127.0.0.1:29092 | ||
- KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093,PLAINTEXT_HOST://:29092 | ||
- [email protected]:9093 | ||
- KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER | ||
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT | ||
- KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0 | ||
- KAFKA_PROCESS_ROLES=controller,broker | ||
- KAFKA_NODE_ID=1 | ||
- KAFKA_METADATA_LOG_SEGMENT_MS=15000 | ||
- KAFKA_METADATA_MAX_RETENTION_MS=60000 | ||
- KAFKA_METADATA_LOG_MAX_RECORD_BYTES_BETWEEN_SNAPSHOTS=2800 | ||
- KAFKA_AUTO_CREATE_TOPICS_ENABLE=true | ||
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 | ||
- KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 | ||
- KAFKA_HEAP_OPTS=-Xmx200m -Xms200m | ||
- CLUSTER_ID=ckjPoprWQzOf0-FuNkGfFQ | ||
healthcheck: | ||
test: nc -z stream 9092 | ||
start_period: 10s | ||
interval: 5s | ||
timeout: 10s | ||
retries: 10 | ||
|
||
demo-api: | ||
image: kubeshop/demo-pokemon-api:latest | ||
restart: unless-stopped | ||
pull_policy: always | ||
environment: | ||
REDIS_URL: cache | ||
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postgres?schema=public | ||
RABBITMQ_HOST: queue | ||
POKE_API_BASE_URL: https://pokeapi.co/api/v2 | ||
COLLECTOR_ENDPOINT: http://otel-collector:4317 | ||
NPM_RUN_COMMAND: api | ||
ports: | ||
- "8081:8081" | ||
healthcheck: | ||
test: ["CMD", "wget", "--spider", "localhost:8081"] | ||
interval: 1s | ||
timeout: 3s | ||
retries: 60 | ||
depends_on: | ||
postgres: | ||
condition: service_healthy | ||
cache: | ||
condition: service_healthy | ||
queue: | ||
condition: service_healthy | ||
|
||
demo-worker: | ||
image: kubeshop/demo-pokemon-api:latest | ||
restart: unless-stopped | ||
pull_policy: always | ||
environment: | ||
REDIS_URL: cache | ||
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postgres?schema=public | ||
RABBITMQ_HOST: queue | ||
POKE_API_BASE_URL: https://pokeapi.co/api/v2 | ||
COLLECTOR_ENDPOINT: http://otel-collector:4317 | ||
NPM_RUN_COMMAND: worker | ||
depends_on: | ||
postgres: | ||
condition: service_healthy | ||
cache: | ||
condition: service_healthy | ||
queue: | ||
condition: service_healthy | ||
|
||
demo-rpc: | ||
image: kubeshop/demo-pokemon-api:latest | ||
restart: unless-stopped | ||
pull_policy: always | ||
environment: | ||
REDIS_URL: cache | ||
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postgres?schema=public | ||
RABBITMQ_HOST: queue | ||
POKE_API_BASE_URL: https://pokeapi.co/api/v2 | ||
COLLECTOR_ENDPOINT: http://otel-collector:4317 | ||
NPM_RUN_COMMAND: rpc | ||
ports: | ||
- 8082:8082 | ||
healthcheck: | ||
test: ["CMD", "lsof", "-i", "8082"] | ||
interval: 1s | ||
timeout: 3s | ||
retries: 60 | ||
depends_on: | ||
postgres: | ||
condition: service_healthy | ||
cache: | ||
condition: service_healthy | ||
queue: | ||
condition: service_healthy | ||
|
||
demo-streaming-worker: | ||
image: kubeshop/demo-pokemon-api:latest | ||
environment: | ||
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postgres?schema=public | ||
POKE_API_BASE_URL: https://pokeapi.co/api/v2 | ||
COLLECTOR_ENDPOINT: http://otel-collector:4317 | ||
ZIPKIN_URL: http://localhost:9411 | ||
NPM_RUN_COMMAND: stream-worker | ||
KAFKA_BROKER: 'stream:9092' | ||
KAFKA_TOPIC: 'pokemon' | ||
KAFKA_CLIENT_ID: 'streaming-worker' | ||
REDIS_URL: cache | ||
depends_on: | ||
postgres: | ||
condition: service_healthy | ||
stream: | ||
condition: service_healthy | ||
cache: | ||
condition: service_healthy | ||
otel-collector: | ||
condition: service_started |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
postgres: | ||
host: localhost | ||
user: postgres | ||
password: postgres | ||
port: 5432 | ||
dbname: postgres | ||
params: sslmode=disable | ||
|
||
telemetry: | ||
exporters: | ||
collector: | ||
serviceName: tracetest | ||
sampling: 100 # 100% | ||
exporter: | ||
type: collector | ||
collector: | ||
endpoint: localhost:24317 | ||
|
||
server: | ||
telemetry: | ||
exporter: collector |
Oops, something went wrong.