Skip to content

Commit

Permalink
[otel-collector] - rename otelcol to otel-collector (open-telemetry#1841
Browse files Browse the repository at this point in the history
)
  • Loading branch information
puckpuck authored Dec 16, 2024
1 parent 43f448c commit 9b7cfad
Show file tree
Hide file tree
Showing 15 changed files with 51 additions and 51 deletions.
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ ENV_PLATFORM=local
# OpenTelemetry Collector
HOST_FILESYSTEM=/
DOCKER_SOCK=/var/run/docker.sock
OTEL_COLLECTOR_HOST=otelcol
OTEL_COLLECTOR_HOST=otel-collector
OTEL_COLLECTOR_PORT_GRPC=4317
OTEL_COLLECTOR_PORT_HTTP=4318
OTEL_COLLECTOR_CONFIG=./src/otelcollector/otelcol-config.yml
OTEL_COLLECTOR_CONFIG_EXTRAS=./src/otelcollector/otelcol-config-extras.yml
OTEL_COLLECTOR_CONFIG=./src/otel-collector/otelcol-config.yml
OTEL_COLLECTOR_CONFIG_EXTRAS=./src/otel-collector/otelcol-config-extras.yml
OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_GRPC}
PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:8080/otlp-http/v1/traces

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- 'docker-compose*.yml'
- 'src/flagd/**'
- 'src/grafana/**'
- 'src/otelcollector/**'
- 'src/otel-collector/**'
- 'src/prometheus/**'
- name: "Add Label: docs-update-required"
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ the release.
([#1827](https://github.com/open-telemetry/opentelemetry-demo/pull/1827))
* [cartservice] - Add Exemplars to Cart Service
([#1830](https://github.com/open-telemetry/opentelemetry-demo/pull/1830))
* [otel-collector] rename otelcol to otel-collector
([#1841](https://github.com/open-telemetry/opentelemetry-demo/pull/1841))

## 1.12.0

Expand Down
2 changes: 1 addition & 1 deletion docker-compose-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ services:
depends_on:
tracetest-postgres:
condition: service_healthy
otelcol:
otel-collector:
condition: service_started
healthcheck:
test: [ "CMD", "wget", "--spider", "localhost:11633" ]
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-tests_include-override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

services:

otelcol:
otel-collector:
command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-tracetest.yml" ]
environment:
- ENVOY_PORT
Expand Down
28 changes: 14 additions & 14 deletions docker-compose.minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ services:
- OTEL_LOGS_EXPORTER=otlp
- OTEL_SERVICE_NAME=adservice
depends_on:
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand Down Expand Up @@ -76,7 +76,7 @@ services:
depends_on:
valkey-cart:
condition: service_started
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand Down Expand Up @@ -122,7 +122,7 @@ services:
condition: service_started
shippingservice:
condition: service_started
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand Down Expand Up @@ -150,7 +150,7 @@ services:
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME
depends_on:
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand All @@ -176,7 +176,7 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=emailservice
depends_on:
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand Down Expand Up @@ -233,7 +233,7 @@ services:
condition: service_started
shippingservice:
condition: service_started
otelcol:
otel-collector:
condition: service_started
imageprovider:
condition: service_started
Expand Down Expand Up @@ -308,7 +308,7 @@ services:
- OTEL_SERVICE_NAME=imageprovider
- OTEL_RESOURCE_ATTRIBUTES
depends_on:
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand Down Expand Up @@ -374,7 +374,7 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=paymentservice
depends_on:
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand Down Expand Up @@ -402,7 +402,7 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=productcatalogservice
depends_on:
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand Down Expand Up @@ -430,7 +430,7 @@ services:
- OTEL_SERVICE_NAME=quoteservice
- OTEL_PHP_INTERNAL_METRICS_ENABLED=true
depends_on:
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand Down Expand Up @@ -463,7 +463,7 @@ services:
depends_on:
productcatalogservice:
condition: service_started
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand All @@ -490,7 +490,7 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=shippingservice
depends_on:
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand Down Expand Up @@ -581,9 +581,9 @@ services:
logging: *logging

# OpenTelemetry Collector
otelcol:
otel-collector:
image: ${COLLECTOR_CONTRIB_IMAGE}
container_name: otel-col
container_name: otel-collector
deploy:
resources:
limits:
Expand Down
34 changes: 17 additions & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=accounting
depends_on:
otelcol:
otel-collector:
condition: service_started
kafka:
condition: service_healthy
Expand Down Expand Up @@ -72,7 +72,7 @@ services:
- OTEL_LOGS_EXPORTER=otlp
- OTEL_SERVICE_NAME=adservice
depends_on:
otelcol:
otel-collector:
condition: service_started
flagd:
condition: service_started
Expand Down Expand Up @@ -106,7 +106,7 @@ services:
depends_on:
valkey-cart:
condition: service_started
otelcol:
otel-collector:
condition: service_started
flagd:
condition: service_started
Expand Down Expand Up @@ -156,7 +156,7 @@ services:
condition: service_started
shippingservice:
condition: service_started
otelcol:
otel-collector:
condition: service_started
kafka:
condition: service_healthy
Expand Down Expand Up @@ -188,7 +188,7 @@ services:
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME
depends_on:
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand All @@ -215,7 +215,7 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=emailservice
depends_on:
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand Down Expand Up @@ -246,7 +246,7 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=frauddetectionservice
depends_on:
otelcol:
otel-collector:
condition: service_started
kafka:
condition: service_healthy
Expand Down Expand Up @@ -305,7 +305,7 @@ services:
condition: service_started
shippingservice:
condition: service_started
otelcol:
otel-collector:
condition: service_started
imageprovider:
condition: service_started
Expand Down Expand Up @@ -384,7 +384,7 @@ services:
- OTEL_SERVICE_NAME=imageprovider
- OTEL_RESOURCE_ATTRIBUTES
depends_on:
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand Down Expand Up @@ -451,7 +451,7 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=paymentservice
depends_on:
otelcol:
otel-collector:
condition: service_started
flagd:
condition: service_started
Expand Down Expand Up @@ -482,7 +482,7 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=productcatalogservice
depends_on:
otelcol:
otel-collector:
condition: service_started
flagd:
condition: service_started
Expand Down Expand Up @@ -512,7 +512,7 @@ services:
- OTEL_SERVICE_NAME=quoteservice
- OTEL_PHP_INTERNAL_METRICS_ENABLED=true
depends_on:
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand Down Expand Up @@ -546,7 +546,7 @@ services:
depends_on:
productcatalogservice:
condition: service_started
otelcol:
otel-collector:
condition: service_started
flagd:
condition: service_started
Expand Down Expand Up @@ -575,7 +575,7 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=shippingservice
depends_on:
otelcol:
otel-collector:
condition: service_started
logging: *logging

Expand Down Expand Up @@ -628,7 +628,7 @@ services:
ports:
- "${FLAGD_UI_PORT}"
depends_on:
otelcol:
otel-collector:
condition: service_started
flagd:
condition: service_started
Expand Down Expand Up @@ -725,9 +725,9 @@ services:
logging: *logging

# OpenTelemetry Collector
otelcol:
otel-collector:
image: ${COLLECTOR_CONTRIB_IMAGE}
container_name: otel-col
container_name: otel-collector
deploy:
resources:
limits:
Expand Down
4 changes: 2 additions & 2 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
"groupName": "loadgenerator",
},
{
"matchFileNames": ["src/otelcollector/**"],
"groupName": "otelcollector",
"matchFileNames": ["src/otel-collector/**"],
"groupName": "otel-collector",
},
{
"matchFileNames": ["src/paymentservice/**"],
Expand Down
4 changes: 1 addition & 3 deletions src/frontend/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import '../styles/globals.css';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import App, { AppContext, AppProps } from 'next/app';
import { getCookie } from 'cookies-next';
import CurrencyProvider from '../providers/Currency.provider';
import CartProvider from '../providers/Cart.provider';
import { ThemeProvider } from 'styled-components';
Expand All @@ -26,8 +25,7 @@ declare global {
}

if (typeof window !== 'undefined') {
const collector = getCookie('otelCollectorUrl')?.toString() || '';
FrontendTracer(collector);
FrontendTracer();
if (window.location) {
const session = SessionGateway.getSession();

Expand Down
4 changes: 2 additions & 2 deletions src/frontend/utils/telemetry/FrontendTracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const {
IS_SYNTHETIC_REQUEST = '',
} = typeof window !== 'undefined' ? window.ENV : {};

const FrontendTracer = (collectorString: string) => {
const FrontendTracer = () => {
let resource = new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: NEXT_PUBLIC_OTEL_SERVICE_NAME,
});
Expand All @@ -33,7 +33,7 @@ const FrontendTracer = (collectorString: string) => {
provider.addSpanProcessor(
new BatchSpanProcessor(
new OTLPTraceExporter({
url: NEXT_PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT || collectorString || 'http://localhost:4318/v1/traces',
url: NEXT_PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT || 'http://localhost:4318/v1/traces',
}),
{
scheduledDelayMillis: 500,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"id": 4,
"id": 3,
"links": [],
"panels": [
{
Expand Down Expand Up @@ -3055,13 +3055,13 @@
"type": "prometheus",
"uid": "$datasource"
},
"definition": "label_values(otelcol_process_uptime, job)",
"definition": "label_values(otelcol_process_uptime_total,job)",
"includeAll": false,
"label": "Job",
"name": "job",
"options": [],
"query": {
"query": "label_values(otelcol_process_uptime, job)",
"query": "label_values(otelcol_process_uptime_total,job)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
Expand Down Expand Up @@ -3234,6 +3234,6 @@
"timezone": "utc",
"title": "OpenTelemetry Collector",
"uid": "BKf2sowmj",
"version": 10,
"version": 1,
"weekStart": ""
}
File renamed without changes.
Loading

0 comments on commit 9b7cfad

Please sign in to comment.