Draft: New cross building for docker images (#37)

* Add .circleci/config.yml

* base

* base

* add architectures and cross build

* fix clippy warnings
This commit is contained in:
Matthieu Pignolet 2023-01-20 16:38:10 +04:00 committed by GitHub
parent 98420c50a8
commit ea1d345147
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 46 additions and 3603 deletions

View file

@ -1,2 +1,3 @@
target/
docs/
docs/
bin/

1
.gitignore vendored
View file

@ -8,3 +8,4 @@ config.yml
config/*
build/
*.yml
bin/

31
Cargo.lock generated
View file

@ -776,12 +776,6 @@ dependencies = [
"percent-encoding",
]
[[package]]
name = "fs_extra"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"
[[package]]
name = "futures"
version = "0.3.25"
@ -885,7 +879,6 @@ dependencies = [
"serde",
"serde_json",
"shared",
"tikv-jemallocator",
"tokio",
"tokio-stream",
"tracing",
@ -1953,7 +1946,6 @@ dependencies = [
"serde_json",
"shared",
"test-log",
"tikv-jemallocator",
"tokio",
"tokio-stream",
"tokio-test",
@ -2074,7 +2066,6 @@ dependencies = [
"serde",
"serde_json",
"shared",
"tikv-jemallocator",
"tokio",
"tokio-stream",
"tonic",
@ -2569,27 +2560,6 @@ dependencies = [
"once_cell",
]
[[package]]
name = "tikv-jemalloc-sys"
version = "0.5.2+5.3.0-patched"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec45c14da997d0925c7835883e4d5c181f196fa142f8c19d7643d1e9af2592c3"
dependencies = [
"cc",
"fs_extra",
"libc",
]
[[package]]
name = "tikv-jemallocator"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20612db8a13a6c06d57ec83953694185a367e16945f66565e8028d2c0bd76979"
dependencies = [
"libc",
"tikv-jemalloc-sys",
]
[[package]]
name = "time"
version = "0.3.17"
@ -3291,7 +3261,6 @@ dependencies = [
"serde",
"serde_json",
"shared",
"tikv-jemallocator",
"tokio",
"tracing",
"twilight-model",

View file

@ -30,7 +30,6 @@ tracing-futures = "0.2"
tracing-opentelemetry = "0.18"
opentelemetry = { version = "0.18", features = ["rt-tokio"] }
opentelemetry-http = "0.7"
tikv-jemallocator = "0.5"
criterion = { version = "0.4", features = ["async_tokio"] }
tokio-test = "0.4.2"

View file

@ -1,33 +1,27 @@
FROM rust AS chef
USER root
COPY .cargo .cargo
RUN cargo install cargo-chef
RUN apt-get update && apt-get install -y protobuf-compiler
WORKDIR /app
# Planning install
FROM chef AS planner
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM tonistiigi/xx:master AS xx
FROM --platform=$BUILDPLATFORM rust:alpine as alpine_rbuild
RUN apk add clang lld protobuf-dev build-base git
# Copy the xx scripts
COPY --from=xx / /
# Copy source code
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
# Building all targets
FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
RUN --mount=type=cache,target=/root/.cargo/git/db \
--mount=type=cache,target=/root/.cargo/registry/cache \
--mount=type=cache,target=/root/.cargo/registry/index \
cargo fetch
ARG TARGETPLATFORM
RUN --mount=type=cache,target=/root/.cargo/git/db \
--mount=type=cache,target=/root/.cargo/registry/cache \
--mount=type=cache,target=/root/.cargo/registry/index \
xx-cargo build --release --target-dir ./build
# Notice that we are specifying the --target flag!
RUN cargo chef cook --release --recipe-path recipe.json
COPY . .
RUN cargo build --release
#Copy from the build/<target triple>/release folder to the out folder
RUN mkdir ./out && cp ./build/*/release/* ./out || true
# Base os
FROM debian:latest AS runtime-base
# RUN addgroup -S nova && adduser -S nova -G nova
RUN apt-get update && apt-get install ca-certificates -y
# Final os
FROM runtime-base AS runtime
FROM alpine AS runtime
ARG COMPONENT
ENV COMPONENT=${COMPONENT}
COPY --from=builder /app/target/release/${COMPONENT} /usr/local/bin/
# USER nova
COPY --from=alpine_rbuild /out/${COMPONENT} /usr/local/bin/
ENTRYPOINT /usr/local/bin/${COMPONENT}

View file

@ -21,7 +21,9 @@ services:
x-bake:
platforms:
- linux/amd64
- linux/arm64
- linux/arm64/v8
- linux/arm/v7
- linux/arm/v6
args:
- COMPONENT=cache
volumes:
@ -43,7 +45,9 @@ services:
x-bake:
platforms:
- linux/amd64
- linux/arm64
- linux/arm64/v8
- linux/arm/v7
- linux/arm/v6
volumes:
- ./config/default.yml:/config/default.yml
environment:
@ -62,7 +66,9 @@ services:
x-bake:
platforms:
- linux/amd64
- linux/arm64
- linux/arm64/v8
- linux/arm/v7
- linux/arm/v6
volumes:
- ./config/default.yml:/config/default.yml
environment:
@ -85,7 +91,9 @@ services:
x-bake:
platforms:
- linux/amd64
- linux/arm64
- linux/arm64/v8
- linux/arm/v7
- linux/arm/v6
volumes:
- ./config/default.yml:/config/default.yml
environment:
@ -106,7 +114,9 @@ services:
x-bake:
platforms:
- linux/amd64
- linux/arm64
- linux/arm64/v8
- linux/arm/v7
- linux/arm/v6
volumes:
- ./config/default.yml:/config/default.yml
environment:

View file

@ -22,6 +22,3 @@ twilight-gateway = { version = "0.14" }
twilight-model = "0.14"
bytes = "1.3.0"
async-nats = "0.26.0"
[target.'cfg(not(target_os = "windows"))'.dependencies]
tikv-jemallocator = { workspace = true }

View file

@ -1,11 +1,4 @@
use gateway::GatewayServer;
use leash::ignite;
#[cfg(not(target_os = "windows"))]
use tikv_jemallocator::Jemalloc;
#[cfg(not(target_os = "windows"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
ignite!(GatewayServer);

View file

@ -33,9 +33,6 @@ tracing-subscriber = { workspace = true }
test-log = { workspace = true }
env_logger = { workspace = true }
[target.'cfg(not(target_os = "windows"))'.dependencies]
tikv-jemallocator = { workspace = true }
[[bench]]
name = "bucket"
harness = false

View file

@ -1,11 +1,4 @@
use leash::ignite;
use ratelimit::RatelimiterServerComponent;
#[cfg(not(target_os = "windows"))]
use tikv_jemallocator::Jemalloc;
#[cfg(not(target_os = "windows"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
ignite!(RatelimiterServerComponent);

View file

@ -30,6 +30,3 @@ hashring = "0.3.0"
tonic = "0.8.3"
tokio-stream = "0.1.11"
dns-lookup = "1.0.8"
[target.'cfg(not(target_os = "windows"))'.dependencies]
tikv-jemallocator = { workspace = true }

View file

@ -89,7 +89,7 @@ fn normalize_path(request_path: &str) -> (&str, &str) {
("/api", request_path)
}
}
fn path_name(path: &Path) -> &'static str {
const fn path_name(path: &Path) -> &'static str {
match path {
Path::ApplicationCommand(..) => "Application commands",
Path::ApplicationCommandId(..) => "Application command",
@ -112,7 +112,9 @@ fn path_name(path: &Path) -> &'static str {
Path::ChannelsIdThreadMembersId(..) => "Thread member",
Path::ChannelsIdThreads(..) => "Channel threads",
Path::ChannelsIdTyping(..) => "Typing indicator",
Path::ChannelsIdWebhooks(..) | Path::WebhooksId(..) => "Webhook",
Path::ChannelsIdWebhooks(..) | Path::WebhooksId(..) | Path::WebhooksIdToken(..) => {
"Webhook"
}
Path::Gateway => "Gateway",
Path::GatewayBot => "Gateway bot info",
Path::Guilds => "Guilds",
@ -146,14 +148,15 @@ fn path_name(path: &Path) -> &'static str {
Path::GuildsIdScheduledEventsIdUsers(..) => "Users of a scheduled event",
Path::GuildsIdStickers(..) => "Guild stickers",
Path::GuildsIdTemplates(..) => "Guild templates",
Path::GuildsIdTemplatesCode(..) => "Specific guild template",
Path::GuildsIdTemplatesCode(..) | Path::GuildsTemplatesCode(..) => {
"Specific guild template"
}
Path::GuildsIdThreads(..) => "Guild threads",
Path::GuildsIdVanityUrl(..) => "Guild vanity invite",
Path::GuildsIdVoiceStates(..) => "Guild voice states",
Path::GuildsIdWebhooks(..) => "Guild webhooks",
Path::GuildsIdWelcomeScreen(..) => "Guild welcome screen",
Path::GuildsIdWidget(..) => "Guild widget",
Path::GuildsTemplatesCode(..) => "Specific guild template",
Path::InteractionCallback(..) => "Interaction callback",
Path::InvitesCode => "Invite info",
Path::OauthApplicationsMe => "Current application info",
@ -167,7 +170,6 @@ fn path_name(path: &Path) -> &'static str {
Path::UsersIdGuildsId => "Guild from user",
Path::UsersIdGuildsIdMember => "Member of a guild",
Path::VoiceRegions => "Voice region list",
Path::WebhooksIdToken(..) => "Webhook",
Path::WebhooksIdTokenMessagesId(..) => "Specific webhook message",
_ => "Unknown path!",
}

View file

@ -1,11 +1,4 @@
use leash::ignite;
use rest::ReverseProxyServer;
#[cfg(not(target_os = "windows"))]
use tikv_jemallocator::Jemalloc;
#[cfg(not(target_os = "windows"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
ignite!(ReverseProxyServer);

View file

@ -19,6 +19,3 @@ ed25519-dalek = "1"
twilight-model = { version = "0.14" }
async-nats = "0.26.0"
[target.'cfg(not(target_os = "windows"))'.dependencies]
tikv-jemallocator = "0.5"

View file

@ -1,11 +1,4 @@
use leash::ignite;
use webhook::WebhookServer;
#[cfg(not(target_os = "windows"))]
use tikv_jemallocator::Jemalloc;
#[cfg(not(target_os = "windows"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
ignite!(WebhookServer);

File diff suppressed because it is too large Load diff

View file

@ -1,10 +0,0 @@
apiVersion: 1
providers:
- name: 'OpenTelemetry Demo'
orgId: 1
folder: 'Demo'
type: file
disableDeletion: false
editable: true
options:
path: /etc/grafana/provisioning/dashboards/general

View file

@ -1,693 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 1,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 14,
"panels": [],
"title": "Metrics",
"type": "row"
},
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 1
},
"id": 6,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"editorMode": "code",
"expr": "rate(runtime_cpython_cpu_time{type=~\"system\"}[$__interval])*100",
"legendFormat": "__auto",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"editorMode": "code",
"expr": "rate(runtime_cpython_cpu_time{type=~\"user\"}[$__interval])*100",
"hide": false,
"legendFormat": "__auto",
"range": true,
"refId": "B"
}
],
"title": "Recommendation Service (CPU%)",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "decmbytes"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 1
},
"id": 8,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"editorMode": "code",
"expr": "rate(runtime_cpython_memory{type=~\"rss|vms\"}[$__interval])/1024/1024",
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Recommendation Service (Memory)",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "bars",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 9
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"editorMode": "code",
"expr": "rate(app_recommendations_counter{recommendation_type=\"catalog\"}[$__interval])",
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Recommendations Count",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 9
},
"id": 10,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"editorMode": "code",
"expr": "rate(calls_total{status_code=\"STATUS_CODE_ERROR\"}[$__interval])",
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Error Rate",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "dtdurationms"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 17
},
"id": 2,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"editorMode": "code",
"expr": "histogram_quantile(0.50, sum(rate(latency_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))",
"legendFormat": "__auto",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"editorMode": "code",
"expr": "histogram_quantile(0.95, sum(rate(latency_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))",
"hide": false,
"legendFormat": "__auto",
"range": true,
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"editorMode": "code",
"expr": "histogram_quantile(0.99, sum(rate(latency_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))",
"hide": false,
"legendFormat": "__auto",
"range": true,
"refId": "C"
},
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"editorMode": "code",
"expr": "histogram_quantile(0.999, sum(rate(latency_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))",
"hide": false,
"legendFormat": "__auto",
"range": true,
"refId": "D"
}
],
"title": "Service Latency (from SpanMetrics)",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "reqps"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 17
},
"id": 12,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"editorMode": "code",
"expr": "rate(latency_count{service_name=\"${service}\"}[$__rate_interval])",
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Endpoint Rate by Service",
"type": "timeseries"
}
],
"schemaVersion": 37,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": "",
"current": {
"selected": false,
"text": "recommendationservice",
"value": "recommendationservice"
},
"datasource": {
"type": "prometheus",
"uid": "webstore-metrics"
},
"definition": "latency_bucket",
"hide": 0,
"includeAll": false,
"multi": false,
"name": "service",
"options": [],
"query": {
"query": "latency_bucket",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "/.*service_name=\\\"([^\\\"]+)\\\".*/",
"skipUrlSync": false,
"sort": 1,
"type": "query"
}
]
},
"time": {
"from": "now-15m",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Demo Dashboard",
"uid": "W2gX2zHVk",
"version": 2,
"weekStart": ""
}

View file

@ -1,9 +0,0 @@
apiVersion: 1
datasources:
- name: Prometheus
uid: webstore-metrics
type: prometheus
url: http://prometheus:9090
editable: true
isDefault: true

View file

@ -1,9 +0,0 @@
apiVersion: 1
datasources:
- name: Jaeger
uid: webstore-traces
type: jaeger
url: http://jaeger:16686/jaeger/ui
editable: true
isDefault: false

View file

@ -1,2 +0,0 @@
# extra settings to be merged into OpenTelemetry Collector configuration
# do not delete this file

View file

@ -1,34 +0,0 @@
receivers:
otlp:
protocols:
grpc:
http:
cors:
allowed_origins:
- "http://*"
- "https://*"
exporters:
otlp:
endpoint: "jaeger:4317"
tls:
insecure: true
logging:
prometheus:
endpoint: "otelcol:9464"
processors:
batch:
spanmetrics:
metrics_exporter: prometheus
service:
pipelines:
traces:
receivers: [otlp]
processors: [spanmetrics, batch]
exporters: [logging, otlp]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [prometheus, logging]

View file

@ -1,12 +0,0 @@
global:
evaluation_interval: 30s
scrape_interval: 5s
scrape_configs:
- job_name: otel
static_configs:
- targets:
- 'otelcol:9464'
- job_name: otel-collector
static_configs:
- targets:
- 'otelcol:8888'

View file

@ -11,11 +11,11 @@ mkShell {
buildInputs = [
cargo
gcc
clang
go
gnumake
protobuf
rustc
zlib
mdbook
];
}