style: inject ingestor url (otel config file) + aggregator/go-parser url (ingestor config file) through env vars (#241)

This commit is contained in:
Warren 2024-01-16 17:54:25 -08:00 committed by GitHub
parent ac667cd164
commit 499c537ea5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 26 additions and 7 deletions

View file

@ -0,0 +1,7 @@
---
'@hyperdx/api': patch
'@hyperdx/app': patch
---
style: inject ingestor url (otel config file) + aggregator/go-parser url
(ingestor config file) through env vars

View file

@ -11,7 +11,9 @@ services:
- 8002:8002 # http-generic
- 8686:8686 # healthcheck
environment:
AGGREGATOR_API_URL: 'http://aggregator:8001'
ENABLE_GO_PARSER: 'false'
GO_PARSER_API_URL: 'http://go-parser:7777'
RUST_BACKTRACE: full
VECTOR_LOG: ${HYPERDX_LOG_LEVEL}
VECTOR_OPENSSL_LEGACY_PROVIDER: 'false'
@ -25,6 +27,7 @@ services:
environment:
HYPERDX_API_KEY: ${HYPERDX_API_KEY}
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
INGESTOR_API_URL: 'http://ingestor:8002'
volumes:
- ./docker/otel-collector/config.yaml:/etc/otelcol-contrib/config.yaml
ports:

View file

@ -62,7 +62,9 @@ services:
- 8002:8002 # http-generic
- 8686:8686 # healthcheck
environment:
AGGREGATOR_API_URL: 'http://aggregator:8001'
ENABLE_GO_PARSER: 'false'
GO_PARSER_API_URL: 'http://go-parser:7777'
RUST_BACKTRACE: full
VECTOR_LOG: ${HYPERDX_LOG_LEVEL}
VECTOR_OPENSSL_LEGACY_PROVIDER: 'false'
@ -95,6 +97,7 @@ services:
environment:
HYPERDX_API_KEY: ${HYPERDX_API_KEY}
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
INGESTOR_API_URL: 'http://ingestor:8002'
volumes:
- ./docker/otel-collector/config.yaml:/etc/otelcol-contrib/config.yaml
ports:

View file

@ -48,7 +48,9 @@ services:
- 8002:8002 # http-generic
- 8686:8686 # healthcheck
environment:
AGGREGATOR_API_URL: 'http://aggregator:8001'
ENABLE_GO_PARSER: 'false'
GO_PARSER_API_URL: 'http://go-parser:7777'
RUST_BACKTRACE: full
VECTOR_LOG: ${HYPERDX_LOG_LEVEL}
VECTOR_OPENSSL_LEGACY_PROVIDER: 'false'
@ -78,6 +80,7 @@ services:
container_name: hdx-oss-otel-collector
environment:
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
INGESTOR_API_URL: 'http://ingestor:8002'
ports:
- '13133:13133' # health_check extension
- '1888:1888' # pprof extension

View file

@ -1,6 +1,6 @@
[sinks.go_parser]
type = "http"
uri = "http://go-parser:7777"
uri = "${GO_PARSER_API_URL}"
inputs = ["go_spans"] # only send spans for now
compression = "gzip"
encoding.codec = "json"
@ -11,7 +11,7 @@ batch.timeout_secs = 1
[sinks.dev_hdx_aggregator]
type = "http"
uri = "http://aggregator:8001"
uri = "${AGGREGATOR_API_URL}"
inputs = ["post_spans", "post_logs"]
compression = "gzip"
encoding.codec = "json"
@ -22,7 +22,7 @@ batch.timeout_secs = 1
[sinks.dev_hdx_metrics_aggregator]
type = "http"
uri = "http://aggregator:8001?telemetry=metric"
uri = "${AGGREGATOR_API_URL}?telemetry=metric"
inputs = ["metrics"]
compression = "gzip"
encoding.codec = "json"

View file

@ -2,4 +2,7 @@
directory="./docker/ingestor"
export AGGREGATOR_API_URL="http://aggregator:8001"
export GO_PARSER_API_URL="http://go-parser:7777"
vector validate --no-environment $directory/*.toml

View file

@ -58,15 +58,15 @@ exporters:
loglevel: ${env:HYPERDX_LOG_LEVEL}
logzio/traces:
account_token: 'X' # required but we don't use it
endpoint: 'http://ingestor:8002?hdx_platform=otel-traces'
endpoint: '${env:INGESTOR_API_URL}?hdx_platform=otel-traces'
logzio/logs:
account_token: 'X' # required but we don't use it
endpoint: 'http://ingestor:8002?hdx_platform=otel-logs'
endpoint: '${env:INGESTOR_API_URL}?hdx_platform=otel-logs'
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/splunkhecexporter
splunk_hec:
token: 'X' # required but we don't use it
# endpoint: 'http://ingestor:8002?hdx_platform=otel-metrics'
endpoint: 'http://ingestor:8002?hdx_platform=otel-metrics'
endpoint: '${env:INGESTOR_API_URL}?hdx_platform=otel-metrics'
# HTTP timeout when sending data. Defaults to 10s.
timeout: 10s
max_content_length_logs: 0

View file

@ -4994,7 +4994,7 @@
dependencies:
"@types/react" "*"
"@types/react@*", "@types/react@17.0.52", "@types/react@>=16", "@types/react@>=16.9.11", "@types/react@^17", "@types/react@^17.0.52":
"@types/react@*", "@types/react@>=16", "@types/react@>=16.9.11", "@types/react@^17", "@types/react@^17.0.52":
version "17.0.52"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.52.tgz#10d8b907b5c563ac014a541f289ae8eaa9bf2e9b"
integrity sha512-vwk8QqVODi0VaZZpDXQCmEmiOuyjEFPY7Ttaw5vjM112LOq37yz1CDJGrRJwA1fYEq4Iitd5rnjd1yWAc/bT+A==