Skip to content

Commit a030e10

Browse files
authored
Merge branch 'main' into sozhan/rename.ad
2 parents d593e85 + fa7847e commit a030e10

16 files changed

+491
-54
lines changed

.env

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ ENV_PLATFORM=local
2828
# OpenTelemetry Collector
2929
HOST_FILESYSTEM=/
3030
DOCKER_SOCK=/var/run/docker.sock
31-
OTEL_COLLECTOR_HOST=otelcol
31+
OTEL_COLLECTOR_HOST=otel-collector
3232
OTEL_COLLECTOR_PORT_GRPC=4317
3333
OTEL_COLLECTOR_PORT_HTTP=4318
34-
OTEL_COLLECTOR_CONFIG=./src/otelcollector/otelcol-config.yml
35-
OTEL_COLLECTOR_CONFIG_EXTRAS=./src/otelcollector/otelcol-config-extras.yml
34+
OTEL_COLLECTOR_CONFIG=./src/otel-collector/otelcol-config.yml
35+
OTEL_COLLECTOR_CONFIG_EXTRAS=./src/otel-collector/otelcol-config-extras.yml
3636
OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_GRPC}
3737
PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:8080/otlp-http/v1/traces
3838

@@ -94,7 +94,7 @@ IMAGE_PROVIDER_DOCKERFILE=./src/imageprovider/Dockerfile
9494

9595
# Load Generator
9696
LOCUST_WEB_PORT=8089
97-
LOCUST_USERS=10
97+
LOCUST_USERS=5
9898
LOCUST_HOST=http://${FRONTEND_PROXY_ADDR}
9999
LOCUST_WEB_HOST=loadgenerator
100100
LOCUST_AUTOSTART=true

.github/workflows/label-pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- 'docker-compose*.yml'
3131
- 'src/flagd/**'
3232
- 'src/grafana/**'
33-
- 'src/otelcollector/**'
33+
- 'src/otel-collector/**'
3434
- 'src/prometheus/**'
3535
3636
- name: "Add Label: docs-update-required"

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ the release.
3232
([#1827](https://github.com/open-telemetry/opentelemetry-demo/pull/1827))
3333
* [cartservice] - Add Exemplars to Cart Service
3434
([#1830](https://github.com/open-telemetry/opentelemetry-demo/pull/1830))
35+
* [grafana] Add Exemplars Dashboard
36+
([#1836](https://github.com/open-telemetry/opentelemetry-demo/pull/1836))
37+
* [otel-collector] rename otelcol to otel-collector
38+
([#1841](https://github.com/open-telemetry/opentelemetry-demo/pull/1841))
3539
* [ad] rename adservice to ad
3640
([#1827](https://github.com/open-telemetry/opentelemetry-demo/pull/1832))
3741

docker-compose-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ services:
107107
depends_on:
108108
tracetest-postgres:
109109
condition: service_healthy
110-
otelcol:
110+
otel-collector:
111111
condition: service_started
112112
healthcheck:
113113
test: [ "CMD", "wget", "--spider", "localhost:11633" ]

docker-compose-tests_include-override.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
services:
55

6-
otelcol:
6+
otel-collector:
77
command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-tracetest.yml" ]
88
environment:
99
- ENVOY_PORT

docker-compose.minimal.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ services:
4545
- OTEL_LOGS_EXPORTER=otlp
4646
- OTEL_SERVICE_NAME=ad
4747
depends_on:
48-
otelcol:
48+
otel-collector:
4949
condition: service_started
5050
logging: *logging
5151

@@ -76,7 +76,7 @@ services:
7676
depends_on:
7777
valkey-cart:
7878
condition: service_started
79-
otelcol:
79+
otel-collector:
8080
condition: service_started
8181
logging: *logging
8282

@@ -122,7 +122,7 @@ services:
122122
condition: service_started
123123
shippingservice:
124124
condition: service_started
125-
otelcol:
125+
otel-collector:
126126
condition: service_started
127127
logging: *logging
128128

@@ -150,7 +150,7 @@ services:
150150
- OTEL_EXPORTER_OTLP_ENDPOINT
151151
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME
152152
depends_on:
153-
otelcol:
153+
otel-collector:
154154
condition: service_started
155155
logging: *logging
156156

@@ -176,7 +176,7 @@ services:
176176
- OTEL_RESOURCE_ATTRIBUTES
177177
- OTEL_SERVICE_NAME=emailservice
178178
depends_on:
179-
otelcol:
179+
otel-collector:
180180
condition: service_started
181181
logging: *logging
182182

@@ -233,7 +233,7 @@ services:
233233
condition: service_started
234234
shippingservice:
235235
condition: service_started
236-
otelcol:
236+
otel-collector:
237237
condition: service_started
238238
imageprovider:
239239
condition: service_started
@@ -308,7 +308,7 @@ services:
308308
- OTEL_SERVICE_NAME=imageprovider
309309
- OTEL_RESOURCE_ATTRIBUTES
310310
depends_on:
311-
otelcol:
311+
otel-collector:
312312
condition: service_started
313313
logging: *logging
314314

@@ -374,7 +374,7 @@ services:
374374
- OTEL_RESOURCE_ATTRIBUTES
375375
- OTEL_SERVICE_NAME=paymentservice
376376
depends_on:
377-
otelcol:
377+
otel-collector:
378378
condition: service_started
379379
logging: *logging
380380

@@ -402,7 +402,7 @@ services:
402402
- OTEL_RESOURCE_ATTRIBUTES
403403
- OTEL_SERVICE_NAME=productcatalogservice
404404
depends_on:
405-
otelcol:
405+
otel-collector:
406406
condition: service_started
407407
logging: *logging
408408

@@ -430,7 +430,7 @@ services:
430430
- OTEL_SERVICE_NAME=quoteservice
431431
- OTEL_PHP_INTERNAL_METRICS_ENABLED=true
432432
depends_on:
433-
otelcol:
433+
otel-collector:
434434
condition: service_started
435435
logging: *logging
436436

@@ -463,7 +463,7 @@ services:
463463
depends_on:
464464
productcatalogservice:
465465
condition: service_started
466-
otelcol:
466+
otel-collector:
467467
condition: service_started
468468
logging: *logging
469469

@@ -490,7 +490,7 @@ services:
490490
- OTEL_RESOURCE_ATTRIBUTES
491491
- OTEL_SERVICE_NAME=shippingservice
492492
depends_on:
493-
otelcol:
493+
otel-collector:
494494
condition: service_started
495495
logging: *logging
496496

@@ -581,9 +581,9 @@ services:
581581
logging: *logging
582582

583583
# OpenTelemetry Collector
584-
otelcol:
584+
otel-collector:
585585
image: ${COLLECTOR_CONTRIB_IMAGE}
586-
container_name: otel-col
586+
container_name: otel-collector
587587
deploy:
588588
resources:
589589
limits:

docker-compose.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ services:
3838
- OTEL_RESOURCE_ATTRIBUTES
3939
- OTEL_SERVICE_NAME=accounting
4040
depends_on:
41-
otelcol:
41+
otel-collector:
4242
condition: service_started
4343
kafka:
4444
condition: service_healthy
@@ -72,7 +72,7 @@ services:
7272
- OTEL_LOGS_EXPORTER=otlp
7373
- OTEL_SERVICE_NAME=ad
7474
depends_on:
75-
otelcol:
75+
otel-collector:
7676
condition: service_started
7777
flagd:
7878
condition: service_started
@@ -106,7 +106,7 @@ services:
106106
depends_on:
107107
valkey-cart:
108108
condition: service_started
109-
otelcol:
109+
otel-collector:
110110
condition: service_started
111111
flagd:
112112
condition: service_started
@@ -156,7 +156,7 @@ services:
156156
condition: service_started
157157
shippingservice:
158158
condition: service_started
159-
otelcol:
159+
otel-collector:
160160
condition: service_started
161161
kafka:
162162
condition: service_healthy
@@ -188,7 +188,7 @@ services:
188188
- OTEL_EXPORTER_OTLP_ENDPOINT
189189
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME
190190
depends_on:
191-
otelcol:
191+
otel-collector:
192192
condition: service_started
193193
logging: *logging
194194

@@ -215,7 +215,7 @@ services:
215215
- OTEL_RESOURCE_ATTRIBUTES
216216
- OTEL_SERVICE_NAME=emailservice
217217
depends_on:
218-
otelcol:
218+
otel-collector:
219219
condition: service_started
220220
logging: *logging
221221

@@ -246,7 +246,7 @@ services:
246246
- OTEL_RESOURCE_ATTRIBUTES
247247
- OTEL_SERVICE_NAME=frauddetectionservice
248248
depends_on:
249-
otelcol:
249+
otel-collector:
250250
condition: service_started
251251
kafka:
252252
condition: service_healthy
@@ -305,7 +305,7 @@ services:
305305
condition: service_started
306306
shippingservice:
307307
condition: service_started
308-
otelcol:
308+
otel-collector:
309309
condition: service_started
310310
imageprovider:
311311
condition: service_started
@@ -384,7 +384,7 @@ services:
384384
- OTEL_SERVICE_NAME=imageprovider
385385
- OTEL_RESOURCE_ATTRIBUTES
386386
depends_on:
387-
otelcol:
387+
otel-collector:
388388
condition: service_started
389389
logging: *logging
390390

@@ -451,7 +451,7 @@ services:
451451
- OTEL_RESOURCE_ATTRIBUTES
452452
- OTEL_SERVICE_NAME=paymentservice
453453
depends_on:
454-
otelcol:
454+
otel-collector:
455455
condition: service_started
456456
flagd:
457457
condition: service_started
@@ -482,7 +482,7 @@ services:
482482
- OTEL_RESOURCE_ATTRIBUTES
483483
- OTEL_SERVICE_NAME=productcatalogservice
484484
depends_on:
485-
otelcol:
485+
otel-collector:
486486
condition: service_started
487487
flagd:
488488
condition: service_started
@@ -512,7 +512,7 @@ services:
512512
- OTEL_SERVICE_NAME=quoteservice
513513
- OTEL_PHP_INTERNAL_METRICS_ENABLED=true
514514
depends_on:
515-
otelcol:
515+
otel-collector:
516516
condition: service_started
517517
logging: *logging
518518

@@ -546,7 +546,7 @@ services:
546546
depends_on:
547547
productcatalogservice:
548548
condition: service_started
549-
otelcol:
549+
otel-collector:
550550
condition: service_started
551551
flagd:
552552
condition: service_started
@@ -575,7 +575,7 @@ services:
575575
- OTEL_RESOURCE_ATTRIBUTES
576576
- OTEL_SERVICE_NAME=shippingservice
577577
depends_on:
578-
otelcol:
578+
otel-collector:
579579
condition: service_started
580580
logging: *logging
581581

@@ -628,7 +628,7 @@ services:
628628
ports:
629629
- "${FLAGD_UI_PORT}"
630630
depends_on:
631-
otelcol:
631+
otel-collector:
632632
condition: service_started
633633
flagd:
634634
condition: service_started
@@ -689,15 +689,15 @@ services:
689689
image: ${JAEGERTRACING_IMAGE}
690690
container_name: jaeger
691691
command:
692-
- "--memory.max-traces=5000"
692+
- "--memory.max-traces=25000"
693693
- "--query.base-path=/jaeger/ui"
694694
- "--prometheus.server-url=http://${PROMETHEUS_ADDR}"
695695
- "--prometheus.query.normalize-calls=true"
696696
- "--prometheus.query.normalize-duration=true"
697697
deploy:
698698
resources:
699699
limits:
700-
memory: 400M
700+
memory: 1200M
701701
restart: unless-stopped
702702
ports:
703703
- "${JAEGER_SERVICE_PORT}" # Jaeger UI
@@ -725,9 +725,9 @@ services:
725725
logging: *logging
726726

727727
# OpenTelemetry Collector
728-
otelcol:
728+
otel-collector:
729729
image: ${COLLECTOR_CONTRIB_IMAGE}
730-
container_name: otel-col
730+
container_name: otel-collector
731731
deploy:
732732
resources:
733733
limits:

renovate.json5

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767
"groupName": "loadgenerator",
6868
},
6969
{
70-
"matchFileNames": ["src/otelcollector/**"],
71-
"groupName": "otelcollector",
70+
"matchFileNames": ["src/otel-collector/**"],
71+
"groupName": "otel-collector",
7272
},
7373
{
7474
"matchFileNames": ["src/paymentservice/**"],

src/frontend/pages/_app.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import '../styles/globals.css';
55
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
66
import App, { AppContext, AppProps } from 'next/app';
7-
import { getCookie } from 'cookies-next';
87
import CurrencyProvider from '../providers/Currency.provider';
98
import CartProvider from '../providers/Cart.provider';
109
import { ThemeProvider } from 'styled-components';
@@ -26,8 +25,7 @@ declare global {
2625
}
2726

2827
if (typeof window !== 'undefined') {
29-
const collector = getCookie('otelCollectorUrl')?.toString() || '';
30-
FrontendTracer(collector);
28+
FrontendTracer();
3129
if (window.location) {
3230
const session = SessionGateway.getSession();
3331

src/frontend/utils/telemetry/FrontendTracer.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const {
1919
IS_SYNTHETIC_REQUEST = '',
2020
} = typeof window !== 'undefined' ? window.ENV : {};
2121

22-
const FrontendTracer = (collectorString: string) => {
22+
const FrontendTracer = () => {
2323
let resource = new Resource({
2424
[SemanticResourceAttributes.SERVICE_NAME]: NEXT_PUBLIC_OTEL_SERVICE_NAME,
2525
});
@@ -33,7 +33,7 @@ const FrontendTracer = (collectorString: string) => {
3333
provider.addSpanProcessor(
3434
new BatchSpanProcessor(
3535
new OTLPTraceExporter({
36-
url: NEXT_PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT || collectorString || 'http://localhost:4318/v1/traces',
36+
url: NEXT_PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT || 'http://localhost:4318/v1/traces',
3737
}),
3838
{
3939
scheduledDelayMillis: 500,

0 commit comments

Comments
 (0)