-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
87c608c
commit 13424e6
Showing
24 changed files
with
1,104 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM golang:1.16 AS build | ||
WORKDIR /app | ||
COPY go.mod ./ | ||
COPY go.sum ./ | ||
COPY *.go ./ | ||
COPY sls_store/*.go ./sls_store/ | ||
RUN go mod download && CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o /jaeger-sls-plugin | ||
|
||
FROM jaegertracing/all-in-one:1.25.0 | ||
ENV ACCESS_KEY_SECRET="" \ | ||
ACCESS_KEY_ID="" \ | ||
PROJECT="" \ | ||
ENDPOINT="" \ | ||
INSTANCE="" \ | ||
GRPC_STORAGE_PLUGIN_BINARY="/jaeger-sls-plugin" \ | ||
SPAN_STORAGE_TYPE=grpc-plugin \ | ||
JAEGER_DISABLED=true \ | ||
GRPC_STORAGE_PLUGIN_LOG_LEVEL=DEBUG | ||
COPY --from=build /jaeger-sls-plugin /jaeger-sls-plugin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ACCESS_KEY_SECRET: "" | ||
ACCESS_KEY_ID: "" | ||
PROJECT: "" | ||
ENDPOINT: "" | ||
INSTANCE: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
version: '3.3' | ||
|
||
services: | ||
mysql: | ||
image: mysql:5.6 | ||
ports: | ||
- "3306:3306" | ||
expose: | ||
- 3306 | ||
networks: | ||
- backend | ||
restart: always | ||
environment: | ||
MYSQL_ROOT_PASSWORD: "mysqlpwd" | ||
TZ: "Asia/Shanghai" | ||
volumes: | ||
- "./examples/database.sql:/docker-entrypoint-initdb.d/database.sql" | ||
|
||
jaeger: | ||
build: . | ||
networks: | ||
- backend | ||
ports: | ||
- "6831:6831" | ||
- "6832:6832" | ||
- "5778:5778" | ||
- "16686:16686" | ||
- "14268:14268" | ||
- "14250:14250" | ||
environment: | ||
TZ: "Asia/Shanghai" | ||
ACCESS_KEY_SECRET: "" | ||
ACCESS_KEY_ID: "" | ||
PROJECT: "" | ||
ENDPOINT: "" | ||
INSTANCE: "" | ||
|
||
tracing-poc: | ||
image: iqfarhad/medium-poc_tracing:latest | ||
ports: | ||
- "8080:8080" | ||
networks: | ||
- backend | ||
restart: always | ||
environment: | ||
PORT: ":8080" | ||
DEBUG: "true" | ||
TRACING_OPTION: "otel-collector" | ||
OTEL_EXPORTER_OTLP_ENDPOINT: "otel-agent:4317" | ||
MYSQL_URL: "root:mysqlpwd@tcp(mysql:3306)/sampleDB" | ||
JAEGER_AGENT_NAME: "jaeger" | ||
JAEGER_AGENT_PORT: "5775" | ||
JAEGER_COLLECTOR_URL: "http://jaeger:14268/api/traces" | ||
QUERYYER_URL: "http://tracing-queryyer:8081/getPerson/" | ||
FORMATTER_URL: "http://tracing-formatter:8082/formatGreeting?" | ||
TZ: "Asia/Shanghai" | ||
entrypoint: "/go/bin/tracing-poc" | ||
depends_on: | ||
- otel-collector | ||
- mysql | ||
- tracing-queryyer | ||
|
||
tracing-queryyer: | ||
image: iqfarhad/medium-poc_tracing:latest | ||
networks: | ||
- backend | ||
restart: always | ||
environment: | ||
PORT: ":8081" | ||
DEBUG: "true" | ||
TRACING_OPTION: "otel-collector" | ||
OTEL_EXPORTER_OTLP_ENDPOINT: "otel-agent:4317" | ||
JAEGER_AGENT_NAME: "jaeger" | ||
JAEGER_AGENT_PORT: "5775" | ||
MYSQL_URL: "root:mysqlpwd@tcp(mysql:3306)/sampleDB" | ||
JAEGER_COLLECTOR_URL: "http://jaeger:14268/api/traces" | ||
TZ: "Asia/Shanghai" | ||
entrypoint: "/go/bin/queryyer" | ||
depends_on: | ||
- otel-collector | ||
|
||
tracing-formatter: | ||
image: iqfarhad/medium-poc_tracing:latest | ||
networks: | ||
- backend | ||
restart: always | ||
environment: | ||
PORT: ":8082" | ||
DEBUG: "true" | ||
TRACING_OPTION: "otel-collector" | ||
OTEL_EXPORTER_OTLP_ENDPOINT: "otel-agent:4317" | ||
JAEGER_AGENT_NAME: "jaeger" | ||
JAEGER_AGENT_PORT: "5775" | ||
MYSQL_URL: "root:mysqlpwd@tcp(mysql:3306)/sampleDB" | ||
JAEGER_COLLECTOR_URL: "http://jaeger:14268/api/traces" | ||
TZ: "Asia/Shanghai" | ||
entrypoint: "/go/bin/formatter" | ||
depends_on: | ||
- otel-collector | ||
|
||
otel-agent: | ||
image: otel/opentelemetry-collector:latest | ||
command: [ "--config=/etc/otel-agent-config.yaml", "--log-level=DEBUG" ] | ||
volumes: | ||
- ./examples/config-agent.yaml:/etc/otel-agent-config.yaml | ||
ports: | ||
- "1777:1777" | ||
- "55679:55679" | ||
- "13133" | ||
- "4317:4317" | ||
- "55681:55681" | ||
networks: | ||
- backend | ||
environment: | ||
TZ: "Asia/Shanghai" | ||
|
||
otel-collector: | ||
image: otel/opentelemetry-collector:latest | ||
command: [ "--config=/etc/otel-collector-config.yaml", "--log-level=DEBUG" ] | ||
volumes: | ||
- ./examples/config-collector.yaml:/etc/otel-collector-config.yaml | ||
networks: | ||
- backend | ||
environment: | ||
TZ: "Asia/Shanghai" | ||
|
||
networks: | ||
backend: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
extensions: | ||
health_check: | ||
|
||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
endpoint: 0.0.0.0:4317 | ||
http: | ||
endpoint: 0.0.0.0:55681 | ||
|
||
processors: | ||
batch/traces: | ||
timeout: 1s | ||
send_batch_size: 50 | ||
|
||
exporters: | ||
otlp: | ||
endpoint: otel-collector:4317 | ||
insecure: true | ||
|
||
service: | ||
pipelines: | ||
traces: | ||
receivers: [otlp] | ||
processors: [batch/traces] | ||
exporters: [otlp] | ||
|
||
extensions: [health_check] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
endpoint: 0.0.0.0:4317 | ||
|
||
exporters: | ||
jaeger: | ||
endpoint: "jaeger:14250" | ||
insecure: true | ||
|
||
processors: | ||
batch: | ||
|
||
|
||
service: | ||
pipelines: | ||
traces: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [jaeger] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CREATE DATABASE IF NOT EXISTS sampleDB; | ||
|
||
USE sampleDB; | ||
|
||
CREATE TABLE IF NOT EXISTS sampleDB.people ( | ||
name VARCHAR(100), | ||
title VARCHAR(10), | ||
description VARCHAR(100), | ||
PRIMARY KEY (name) | ||
); | ||
|
||
DELETE FROM sampleDB.people; | ||
|
||
INSERT INTO sampleDB.people VALUES ('EQ', 'Tech', 'Where are the cakes?'); | ||
INSERT INTO sampleDB.people VALUES ('Farhad', 'Dr.', 'Why ... why are you so nice?'); | ||
INSERT INTO sampleDB.people VALUES ('Sonos', 'Mr.', 'you are so loud!'); | ||
INSERT INTO sampleDB.people VALUES ('Margo', 'Ms.', 'Privet!'); | ||
INSERT INTO sampleDB.people VALUES ('Trace', 'Mr.', 'This is so cool!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
module github.com/qiansheng91/jaeger-sls | ||
module github.com/aliyun/aliyun-log-jaeger | ||
|
||
go 1.16 | ||
|
||
require ( | ||
github.com/aliyun/aliyun-log-go-sdk v0.1.21 | ||
github.com/gogo/protobuf v1.3.2 | ||
github.com/hashicorp/go-hclog v0.16.2 | ||
github.com/jaegertracing/jaeger v1.24.0 | ||
github.com/spf13/cast v1.3.1 | ||
github.com/spf13/viper v1.8.1 | ||
) | ||
|
||
replace . => github.com/qiansheng91/jaeger-sls v0.0.0-20210803014446-26eb89a251e1 | ||
replace github.com/aliyun/aliyun-log-jaeger => ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.