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

add advance conf for otel-collector #212

Merged
merged 13 commits into from
Aug 4, 2022
67 changes: 18 additions & 49 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ services:
jaeger:
image: jaegertracing/all-in-one
container_name: jaeger
volumes:
- ./src/jaeger/jaeger-ui.json:/etc/jaeger/jaeger-ui.json
command: --query.ui-config /etc/jaeger/jaeger-ui.json
ports:
- "5775:5775"
- "5778:5778"
Expand All @@ -17,10 +20,12 @@ services:
- "14269:14269"
environment:
- COLLECTOR_ZIPKIN_HOST_PORT
- METRICS_STORAGE_TYPE=prometheus
- PROMETHEUS_SERVER_URL=http://prometheus:9090

# Collector
otelcol:
image: otel/opentelemetry-collector:0.52.0
image: otel/opentelemetry-collector-contrib:0.52.0
Frapschen marked this conversation as resolved.
Show resolved Hide resolved
container_name: otel-col
command: [ "--config=/etc/otelcol-config.yml" ]
volumes:
Expand All @@ -42,11 +47,8 @@ services:

# AdService
adservice:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-adservice
image: ghcr.io/open-telemetry/demo:v0.2.0-alpha-adservice
container_name: ad-service
build:
context: ./
dockerfile: ./src/adservice/Dockerfile
ports:
- "${AD_SERVICE_PORT}"
environment:
Expand All @@ -58,11 +60,8 @@ services:

# CartService
cartservice:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice
image: ghcr.io/open-telemetry/demo:v0.2.0-alpha-cartservice
container_name: cart-service
build:
context: ./
dockerfile: ./src/cartservice/src/Dockerfile
ports:
- "${CART_SERVICE_PORT}"
environment:
Expand All @@ -77,11 +76,8 @@ services:

# CheckoutService
checkoutservice:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice
image: ghcr.io/open-telemetry/demo:v0.2.0-alpha-checkoutservice
container_name: checkout-service
build:
context: ./
dockerfile: ./src/checkoutservice/Dockerfile
ports:
- "${CHECKOUT_SERVICE_PORT}"
environment:
Expand All @@ -105,13 +101,8 @@ services:

# CurrencyService
currencyservice:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice
image: ghcr.io/open-telemetry/demo:v0.2.0-alpha-currencyservice
container_name: currency-service
build:
context: ./src/currencyservice
args:
- GRPC_VERSION=1.46.0
- OPENTELEMETRY_VERSION=1.4.0
ports:
- "${CURRENCY_SERVICE_PORT}"
environment:
Expand All @@ -123,10 +114,8 @@ services:

# EmailService
emailservice:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice
image: ghcr.io/open-telemetry/demo:v0.2.0-alpha-emailservice
container_name: email-service
build:
context: ./src/emailservice
ports:
- "${EMAIL_SERVICE_PORT}"
environment:
Expand All @@ -139,11 +128,8 @@ services:

# Frontend
frontend:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend
image: ghcr.io/open-telemetry/demo:v0.2.0-alpha-frontend
container_name: frontend
build:
context: ./
dockerfile: ./src/frontend/Dockerfile
ports:
- "${FRONTEND_PORT}:${FRONTEND_PORT}"
environment:
Expand All @@ -170,11 +156,8 @@ services:

# PaymentService
paymentservice:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice
image: ghcr.io/open-telemetry/demo:v0.2.0-alpha-paymentservice
container_name: payment-service
build:
context: ./
dockerfile: ./src/paymentservice/Dockerfile
ports:
- "${PAYMENT_SERVICE_PORT}"
environment:
Expand All @@ -186,11 +169,8 @@ services:

# ProductCatalogService
productcatalogservice:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice
image: ghcr.io/open-telemetry/demo:v0.2.0-alpha-productcatalogservice
container_name: product-catalog-service
build:
context: ./
dockerfile: ./src/productcatalogservice/Dockerfile
ports:
- "${PRODUCT_CATALOG_SERVICE_PORT}"
environment:
Expand All @@ -202,11 +182,8 @@ services:

# RecommendationService
recommendationservice:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice
image: ghcr.io/open-telemetry/demo:v0.2.0-alpha-recommendationservice
container_name: recommendation-service
build:
context: ./
dockerfile: ./src/recommendationservice/Dockerfile
ports:
- "${RECOMMENDATION_SERVICE_PORT}"
depends_on:
Expand All @@ -221,11 +198,8 @@ services:

# ShippingService
shippingservice:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice
image: ghcr.io/open-telemetry/demo:v0.2.0-alpha-shippingservice
container_name: shipping-service
build:
context: ./
dockerfile: ./src/shippingservice/Dockerfile
ports:
- "${SHIPPING_SERVICE_PORT}"
environment:
Expand All @@ -237,10 +211,8 @@ services:

# FeatureFlagService
featureflagservice:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice
image: ghcr.io/open-telemetry/demo:v0.2.0-alpha-featureflagservice
container_name: feature-flag-service
build:
context: ./src/featureflagservice
ports:
- "${FEATURE_FLAG_SERVICE_PORT}:${FEATURE_FLAG_SERVICE_PORT}"
- "${FEATURE_FLAG_GRPC_SERVICE_PORT}"
Expand All @@ -263,11 +235,8 @@ services:

# LoadGenerator
loadgenerator:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator
image: ghcr.io/open-telemetry/demo:v0.2.0-alpha-loadgenerator
container_name: load-generator
build:
context: ./
dockerfile: ./src/loadgenerator/Dockerfile
environment:
- FRONTEND_ADDR
- USERS
Expand Down
8 changes: 8 additions & 0 deletions src/jaeger/jaeger-ui.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"monitor": {
"menuEnabled": true
},
"dependencies": {
"menuEnabled": true
}
}
11 changes: 10 additions & 1 deletion src/otelcollector/otelcol-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ receivers:
protocols:
grpc:
http:
otlp/spanmetrics:
protocols:
grpc:
endpoint: "localhost:65535"

exporters:
jaeger:
Expand All @@ -16,14 +20,19 @@ exporters:

processors:
batch:
spanmetrics:
metrics_exporter: prometheus

service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
processors: [spanmetrics,batch]
Frapschen marked this conversation as resolved.
Show resolved Hide resolved
exporters: [logging, jaeger]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [prometheus, logging]
metrics/spanmetrics:
receivers: [ otlp/spanmetrics ]
exporters: [ prometheus ]
Frapschen marked this conversation as resolved.
Show resolved Hide resolved