Skip to content

Commit

Permalink
chore: Cleanup and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Sep 13, 2024
1 parent 391b31f commit b2fb5fc
Show file tree
Hide file tree
Showing 16 changed files with 11,590 additions and 7,869 deletions.
4,667 changes: 1,609 additions & 3,058 deletions api/package-lock.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
"@grpc/grpc-js": "^1.8.15",
"@koa/cors": "^3.3.0",
"@koa/router": "^10.1.1",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/auto-instrumentations-node": "^0.44.0",
"@opentelemetry/exporter-jaeger": "^1.24.0",
"@opentelemetry/exporter-trace-otlp-grpc": "^0.51.0",
"@opentelemetry/instrumentation": "^0.51.0",
"@opentelemetry/resources": "^1.24.0",
"@opentelemetry/sdk-node": "^0.51.0",
"@opentelemetry/sdk-trace-base": "^1.24.0",
"@opentelemetry/semantic-conventions": "^1.24.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/auto-instrumentations-node": "^0.50.0",
"@opentelemetry/exporter-jaeger": "^1.26.0",
"@opentelemetry/exporter-trace-otlp-grpc": "^0.53.0",
"@opentelemetry/instrumentation": "^0.53.0",
"@opentelemetry/resources": "^1.26.0",
"@opentelemetry/sdk-node": "^0.53.0",
"@opentelemetry/sdk-trace-base": "^1.26.0",
"@opentelemetry/semantic-conventions": "^1.27.0",
"@types/node-fetch": "^2.6.4",
"amqplib": "^0.8.0",
"class-transformer": "^0.5.1",
Expand Down
25 changes: 19 additions & 6 deletions collector.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,24 @@ receivers:
processors:
batch:

tail_sampling:
decision_wait: 2s
num_traces: 100
expected_new_traces_per_sec: 10
policies:
[
{
name: Accept traces that started from tracetest,
type: trace_state,
trace_state: { key: "tracetest", values: ["true"] },
},
]

exporters:
logging:
loglevel: debug
jaeger:
endpoint: ${JAEGER_ENDPOINT}
otlp:
endpoint: jaeger:4317
tls:
insecure: true
otlp/trace:
Expand All @@ -27,9 +40,9 @@ service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [logging, jaeger]
traces/1:
processors: [tail_sampling, batch]
exporters: [otlp]
traces/agent:
receivers: [otlp]
processors: [batch]
processors: [tail_sampling, batch]
exporters: [otlp/trace]
5 changes: 2 additions & 3 deletions cypress/e2e/1-getting-started/home.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ describe('Home', { defaultCommandTimeout: 80000 }, () => {
});

beforeEach(() => {
cy.visit('/', {
onBeforeLoad: win => tracetest.capture(win.document),
});
tracetest.capture();
cy.visit('/');
});

// uncomment to wait for trace tests to be done
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.stream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ services:
KAFKA_TOPIC: 'pokemon'
KAFKA_CLIENT_ID: 'streaming-worker'
REDIS_URL: cache
SERVICE_NAME: pokeshop-streaming-worker
restart: on-failure
depends_on:
db:
Expand All @@ -53,4 +54,4 @@ services:
cache:
condition: service_healthy
otel-collector:
condition: service_started
condition: service_started
15 changes: 4 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,25 @@ services:
- 14250:14250
- 16685:16685
- 16686:16686
environment:
- COLLECTOR_ZIPKIN_HOST_PORT=:9411
- COLLECTOR_OTLP_ENABLED=true
healthcheck:
test: ['CMD', 'wget', '--spider', 'localhost:16686']
interval: 1s
timeout: 3s
retries: 60

otel-collector:
image: otel/opentelemetry-collector-contrib:0.59.0
image: otel/opentelemetry-collector-contrib:0.100.0
restart: unless-stopped
extra_hosts:
- 'host.docker.internal:host-gateway'
# ports:
# - 55679:55679
# - 8888:8888
# - 4317:4317
# - 4318:4318
ports:
- 4317:4317
- 4318:4318
command:
- '--config'
- '/otel-local-config.yaml'
volumes:
- ./collector.config.yaml:/otel-local-config.yaml
environment:
- JAEGER_ENDPOINT=jaeger:14250
depends_on:
jaeger:
condition: service_healthy
Expand Down
Loading

0 comments on commit b2fb5fc

Please sign in to comment.