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

chore: Cleanup and fixes #45

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
18 changes: 12 additions & 6 deletions collector.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ receivers:
processors:
batch:

filter:
error_mode: ignore
traces:
span:
- 'trace_state["tracetest"] != "true"'

exporters:
logging:
loglevel: debug
jaeger:
endpoint: ${JAEGER_ENDPOINT}
otlp:
endpoint: jaeger:4317
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to hardcode this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah its all dockerized

tls:
insecure: true
otlp/trace:
Expand All @@ -27,9 +33,9 @@ service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [logging, jaeger]
traces/1:
processors: [filter, batch]
exporters: [otlp]
traces/agent:
receivers: [otlp]
processors: [batch]
processors: [filter, 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
Loading