-
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.
ZED-13 replace Jaeger with Grafana & co.
- Loading branch information
1 parent
6a40014
commit 7789572
Showing
14 changed files
with
286 additions
and
31 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 |
---|---|---|
|
@@ -6,3 +6,4 @@ target/ | |
.env | ||
.env.production | ||
*.log | ||
tempo-data |
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,23 @@ | ||
{ | ||
log default { | ||
output stdout | ||
include http.log.access admin.api | ||
} | ||
} | ||
|
||
:4318 { | ||
@options { | ||
method OPTIONS | ||
} | ||
|
||
header Access-Control-Allow-Origin "http://localhost:5173" | ||
header Access-Control-Allow-Credentials "true" | ||
header Access-Control-Allow-Methods "GET, OPTIONS" | ||
header Access-Control-Allow-Headers "Priority,User-Agent,Content-Type" | ||
respond @options 204 | ||
|
||
reverse_proxy localhost:14318 { | ||
header_down -Access-Control-Allow-Origin | ||
header_down -Access-Control-Allow-Credentials | ||
} | ||
} |
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
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,19 +1,29 @@ | ||
import opentelemetry from '@opentelemetry/sdk-node'; | ||
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'; | ||
import { ConsoleSpanExporter } from '@opentelemetry/sdk-trace-base'; | ||
// import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'; | ||
import { Resource } from '@opentelemetry/resources'; | ||
import { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; | ||
import { RemixInstrumentation } from 'opentelemetry-instrumentation-remix'; | ||
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto'; | ||
|
||
// configure the SDK to export telemetry data to the console | ||
// enable all auto-instrumentations from the meta package | ||
const traceExporter = new ConsoleSpanExporter(); | ||
const traceExporter = new OTLPTraceExporter({ | ||
url: 'http://localhost:4318/v1/traces', | ||
}); | ||
|
||
const sdk = new opentelemetry.NodeSDK({ | ||
resource: new Resource({ | ||
[ATTR_SERVICE_NAME]: 'my-service', | ||
[ATTR_SERVICE_NAME]: 'deepdi.sh-frontend-server', | ||
}), | ||
traceExporter, | ||
instrumentations: [getNodeAutoInstrumentations(), new RemixInstrumentation()], | ||
instrumentations: [ | ||
/* getNodeAutoInstrumentations({ | ||
'@opentelemetry/instrumentation-fs': { | ||
enabled: false, | ||
}, | ||
}), */ | ||
new RemixInstrumentation(), | ||
], | ||
}); | ||
|
||
sdk.start(); |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,30 @@ | ||
apiVersion: 1 | ||
|
||
datasources: | ||
- name: Prometheus | ||
type: prometheus | ||
uid: prometheus | ||
access: proxy | ||
orgId: 1 | ||
url: http://prometheus:9090 | ||
basicAuth: false | ||
isDefault: false | ||
version: 1 | ||
editable: false | ||
jsonData: | ||
httpMethod: GET | ||
- name: Tempo | ||
type: tempo | ||
access: proxy | ||
orgId: 1 | ||
url: http://tempo:3200 | ||
basicAuth: false | ||
isDefault: true | ||
version: 1 | ||
editable: false | ||
apiVersion: 1 | ||
uid: tempo | ||
jsonData: | ||
httpMethod: GET | ||
serviceMap: | ||
datasourceUid: prometheus |
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 |
---|---|---|
|
@@ -5,3 +5,6 @@ procs: | |
frontend: | ||
cmd: ["task", "fe:dev"] | ||
stop: "SIGKILL" | ||
caddy: | ||
cmd: ["task", "proxy"] | ||
stop: "SIGKILL" |
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,14 @@ | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
exporters: | ||
otlp: | ||
endpoint: tempo:4317 | ||
tls: | ||
insecure: true | ||
service: | ||
pipelines: | ||
traces: | ||
receivers: [otlp] | ||
exporters: [otlp] |
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,11 @@ | ||
global: | ||
scrape_interval: 15s | ||
evaluation_interval: 15s | ||
|
||
scrape_configs: | ||
- job_name: 'prometheus' | ||
static_configs: | ||
- targets: [ 'localhost:9090' ] | ||
- job_name: 'tempo' | ||
static_configs: | ||
- targets: [ 'tempo:3200' ] |
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,67 @@ | ||
stream_over_http_enabled: true | ||
server: | ||
http_listen_port: 3200 | ||
log_level: info | ||
|
||
query_frontend: | ||
search: | ||
duration_slo: 5s | ||
throughput_bytes_slo: 1.073741824e+09 | ||
trace_by_id: | ||
duration_slo: 5s | ||
|
||
distributor: | ||
receivers: # this configuration will listen on all ports and protocols that tempo is capable of. | ||
jaeger: # the receives all come from the OpenTelemetry collector. more configuration information can | ||
protocols: # be found there: https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver | ||
thrift_http: # | ||
grpc: # for a production deployment you should only enable the receivers you need! | ||
thrift_binary: | ||
thrift_compact: | ||
zipkin: | ||
otlp: | ||
protocols: | ||
http: | ||
include_metadata: true | ||
cors: | ||
allowed_origins: | ||
- http://localhost:5173 | ||
allowed_headers: | ||
- Example-Header | ||
max_age: 7200 | ||
grpc: | ||
opencensus: | ||
|
||
ingester: | ||
max_block_duration: 5m # cut the headblock when this much time passes. this is being set for demo purposes and should probably be left alone normally | ||
|
||
compactor: | ||
compaction: | ||
block_retention: 1h # overall Tempo trace retention. set for demo purposes | ||
|
||
metrics_generator: | ||
registry: | ||
external_labels: | ||
source: tempo | ||
cluster: docker-compose | ||
storage: | ||
path: /var/tempo/generator/wal | ||
remote_write: | ||
- url: http://prometheus:9090/api/v1/write | ||
send_exemplars: true | ||
traces_storage: | ||
path: /var/tempo/generator/traces | ||
|
||
storage: | ||
trace: | ||
backend: local # backend configuration to use | ||
wal: | ||
path: /var/tempo/wal # where to store the wal locally | ||
local: | ||
path: /var/tempo/blocks | ||
|
||
overrides: | ||
defaults: | ||
metrics_generator: | ||
processors: [service-graphs, span-metrics, local-blocks] # enables metrics generator | ||
generate_native_histograms: both |